LaTeX forum ⇒ 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, ...)
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

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

Postby Mini » Wed Dec 08, 2010 3:54 am

Hello,

Here's my code:

  1. \documentclass[12pt, a4paper, fleqn, leqno]{article}
  2.  
  3. \pagestyle{empty}
  4. \linespread{1.5}
  5. \usepackage{polynom}
  6. \usepackage{amsmath}
  7. \usepackage{amssymb}
  8. \usepackage{pstricks}
  9. \usepackage[lmargin=1cm, rmargin=1cm, tmargin=1cm, bmargin=1cm]{geometry}
  10.  
  11. \begin{document}
  12. 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.
  13.  
  14.  
  15. \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 70 times

Link:
BBcode:
HTML:
Hide post links
Show post links

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

Postby Mini » Wed Dec 08, 2010 4:05 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Wed Dec 08, 2010 4:12 am

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 67 times

Link:
BBcode:
HTML:
Hide post links
Show post links

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

Postby Mini » Fri Dec 10, 2010 4:23 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Fri Dec 10, 2010 4:54 am

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.

Link:
BBcode:
HTML:
Hide post links
Show post links

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

Postby Mini » Fri Dec 10, 2010 5:06 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Postby shadgrind » Sat Dec 11, 2010 12:35 pm

I think it's in the DVI to PS conversion. Because when I ran your example in Linux, using TeXLive 2009, like this
  1. latex a4example.tex
  2. dvips -Ppdf -t a4 -G0 -z a4example.dvi
  3. 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

Link:
BBcode:
HTML:
Hide post links
Show post links

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

Postby Mini » Sun Dec 12, 2010 2:05 am

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

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Text Formatting”

Who is online

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