### LaTeX users online

In total there are 6 users online :: 1 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Google [Bot] and 5 guests

### LaTeX Friends

Sponsored by DANTE e.V.: The German speaking TeX Users Group

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

### LaTeX Forum: Text Formatting

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Hello,

Here's my code:

Code: Select all  •  Open in online LaTeX editor
\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 6th, 2009

Actually I figured out what was wrong. If I remove 'a4paper' then it's fine... but why is that happening? :S
Mini

Posts: 73
Joined: Thu Aug 6th, 2009

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

frabjous

Posts: 2065
Joined: Fri Mar 6th, 2009
Location: Amherst, MA

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
Mini

Posts: 73
Joined: Thu Aug 6th, 2009

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.

frabjous

Posts: 2065
Joined: Fri Mar 6th, 2009
Location: Amherst, MA

yeah same problem if I add a4paper in geometry... :S
Mini

Posts: 73
Joined: Thu Aug 6th, 2009

I think it's in the DVI to PS conversion. Because when I ran your example in Linux, using TeXLive 2009, like this
Code: Select all  •  Open in online LaTeX editor
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

Posts: 140
Joined: Thu Jul 16th, 2009

Hmm okay... How would I fix this in WinEdit?
Mini

Posts: 73
Joined: Thu Aug 6th, 2009