## LaTeX forum ⇒ Text Formatting ⇒ Latex -> DVI to PS -> PS to PDF not working correctly

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

### Latex -> DVI to PS -> PS to PDF not working correctly

Hello,

Here's my code:

\documentclass[12pt, a4paper, fleqn, leqno]{article} \pagestyle{empty}\linespread{1.5}\usepackage{polynom}\usepackage{amsmath}\usepackage{amssymb}\usepackage{pstricks}\usepackage[lmargin=1cm, rmargin=1cm, tmargin=1cm, bmargin=1cm]{geometry} \begin{document}Dairy cows may be found either in herds on dairy farms where dairy farmers own, manage, care for, and collect milk  from them, or on commercial farms. Dairy cow herds range in size from small farms of fewer than five cows to large herds of about 20,000. The average dairy farmer in the United States  manages about one hundred cows but this varies from an average of 800 cows in California to under 80 in the North East states. Herd sizes vary around the world depending on landholding culture and social structure. In many European countries the average herd size is well below 50. In the UK it is over 100 in New Zealand 350 and Australia 280.  \end{document}

I'm using WinEDT and I'm using 'Latex -> DVI to PS -> PS to PDF' for use with PSTricks but when I view the PDF the top margin's alignment is not correct. (Attached)

It looks fine in the previewer in WinEDT and it's fine when I just do PDFLatex (but I can't use this if I want to use pstricks unfortunately).

What is wrong
Attachments
Test_DVI.pdf

Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm
Actually I figured out what was wrong. If I remove 'a4paper' then it's fine... but why is that happening? :S

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA
Oddly enough, I don't get the same problem when I try myself. But one thing I noticed is that the PDF you posted uses letter sized paper, even though you have the a4paper option in the document class options. Does it help to put a4paper also in the geometry package options?

Did you check out the intermediate dvi and ps files? Where in the sequence does the problem emerge?

P.S. Didn't see your follow-up. The problem is that with that option it's being formatted for a4paper but the page size is still letterpaper. Do you want a4paper or letterpaper?
Attachments
scratch.pdf

Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm
Hi,

I would like a4paper.

It's happening when I convert to PDF (or possibly PS). It's fine when I preview the DVI file.

I'm using WinEdit.

Thanks

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA
Mini wrote:It's happening when I convert to PDF (or possibly PS). It's fine when I preview the DVI file.

Try to figure out which, i.e., whether the problem is already in the PS file or just the PDF.

Also, answer my question as to whether it makes a difference if you add a4paper to the geometry package options.

Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm
yeah same problem if I add a4paper in geometry... :S

Posts: 140
Joined: Thu Jul 16, 2009 12:39 am
I think it's in the DVI to PS conversion. Because when I ran your example in Linux, using TeXLive 2009, like this
latex a4example.texdvips -Ppdf -t a4 -G0 -z a4example.dvips2pdf a4example.ps

I got a PDF in A4 paper size when opening in Acrobat Reader. The "-t a4" paper size option to dvips is what did the trick for me.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2

Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm
Hmm okay... How would I fix this in WinEdit?