Text FormattingLatex -> DVI to PS -> PS to PDF not working correctly

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

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

Post by Mini »

Hello,

Here's my code:

Code: Select all

\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
(9.28 KiB) Downloaded 308 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Re: Latex -> DVI to PS -> PS to PDF not working correctly

Post by Mini »

Actually I figured out what was wrong. If I remove 'a4paper' then it's fine... but why is that happening? :S
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Latex -> DVI to PS -> PS to PDF not working correctly

Post by frabjous »

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
(9.5 KiB) Downloaded 287 times
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: Latex -> DVI to PS -> PS to PDF not working correctly

Post by Mini »

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
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

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

Post by frabjous »

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

Re: Latex -> DVI to PS -> PS to PDF not working correctly

Post by Mini »

yeah same problem if I add a4paper in geometry... :S
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

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

Post by shadgrind »

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

latex a4example.tex
dvips -Ppdf -t a4 -G0 -z a4example.dvi
ps2pdf 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

Re: Latex -> DVI to PS -> PS to PDF not working correctly

Post by Mini »

Hmm okay... How would I fix this in WinEdit? :(
Post Reply