yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

top margin is too small on Linux #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using Latex --> dvips --> ps2pdf method, since the paper size is define by 
the style file, the system default of a4 is used in dvips, which causes too 
small top margin in the pdf file. Actually, the command: "dvips -t letter -Ppdf 
-G0 $(latexfile).dvi -o" should be used in this case.

Is there a way to pass the paper type into the makefile other than from the 
\documentclass?

Original issue reported on code.google.com by veranopl...@gmail.com on 3 Nov 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Which makefile version are you using?

Original comment by shib...@google.com on 4 Nov 2010 at 1:19

GoogleCodeExporter commented 9 years ago
2.2.0-rc5

Original comment by veranopl...@gmail.com on 4 Nov 2010 at 9:19

GoogleCodeExporter commented 9 years ago
Ah.  I have to admit, you're the first person I've heard of to use 2.2.0 for a 
dvips workflow, which is probably why you found a bug with it :)

Thanks for submitting the bug.  Now, to make sure I understand everything 
you're telling me, can you help clarify a few things that confused me about 
this?

- It seems like you don't want -Ppdf for dvips, since it really should be 
producing postscript output, right?  You probably want dvips to read config.ps, 
so -Pps is more appropriate here.

- Which documentclass are you using?  Is it something that doesn't understand 
letterpaper?  If it does, the makefile should extract that and pass the 
appropriate option to dvips.

When you say that the paper size is defined in the style file, do you mean that 
it is requiring something like the geometry package and setting it there?  In 
that case, *also* specifying it in the documentclass is how I have gotten 
around things like that in the past.

The old makefile used to support a special %%PAPERSIZE comment, which would let 
you specify things like %%PAPERSIZE=letter.  Ultimately I discarded that 
because it meant a lot of repetition.  However, we could add it back in as an 
optional way of specifying paper size - I don't think it would be too hard to 
do.

Finally, in order to get the dvips -> ps2pdf behavior, you had to set a 
variable in the makefile.  Should we just make dvips options available as such 
a variable, too?  Then you could do relatively arbitrary things to it....

Anyway, lots of thoughts.  Let me know what you think.

Original comment by shiblon on 5 Nov 2010 at 2:11

GoogleCodeExporter commented 9 years ago
Thanks for your reply.

I am writing paper using the journal's template. Because the figures are all in 
EPS format, I chose the traditional dvips method to produce PDF files. I don't 
know much about how dvips works, but I was told the -Ppdf option to dvips was 
required to make it include Type 1 (scalable) fonts in the PS file.

I think the easiest way to express the problem I have is to give an example. 
The latex template and the style file from the journal are attached. When I 
make it with your makefile, the top margin appears too small. But if I use

dvips -t letter -Ppdf -G0 agutmpl.dvi -o
ps2pdf agutmpl.ps

The top margin shows correctly. Thanks.

Original comment by veranopl...@gmail.com on 6 Nov 2010 at 3:46

Attachments:

GoogleCodeExporter commented 9 years ago
Two things:

1) You can just convert the .eps files to .pdf and then include them (without 
specifying the .pdf extension) in your document.  Then you can use the default 
and better tested pdflatex toolchain.

2) I'm having a hard time reproducing your problem :(.  I tried compiling it as 
you sent it, and with the (ignored by the class file) "letterpaper" option in 
the documentclass.  I used

  make BUILD_STRATEGY=latex agutmpl

and got the same result both times.  I also built the .dvi file both ways and 
ran dvips with the -tletter option and didn't see any difference in margins.

3) I actually went to great lengths to make sure that, even if you are only 
building to .ps, all fonts are embedded.  I use 'gs' directly to create the 
.pdf file from the .ps file, and have verified that fonts are embedded.  If 
they aren't, that's a bug, so I'd definitely like to know if that isn't 
happening.

Original comment by shiblon on 7 Nov 2010 at 1:46

GoogleCodeExporter commented 9 years ago
It is true that using the pdflatex gives correct pdf file. One solution, as you 
said, is convert all the eps files to the formats pdflatex accepts.

When using latex, however, the dvi and ps files look the same as those created 
by pdflatex. But the pdf files are different (attached). Did you look at the 
pdf files? I used

BUILD_STRATEGY      ?= latex

to create the agutmpl_latex.pdf file.

BTW, I am using redhat EL5. If you cannot reproduce the problem, is that 
because you are using different version of linux?

Original comment by veranopl...@gmail.com on 10 Nov 2010 at 1:37

Attachments:

GoogleCodeExporter commented 9 years ago
Yes, I looked at the pdf output for both toolchains.  What LaTeX distribution 
is used by RHEL5?  I'm using TexLive 2010, and I'm guessing that the version of 
ghostscript is different (I have GPL Ghostscript 8.70).

Either way, if using the pdflatex toolchain (with .eps converted to .pdf) works 
for you, I would just go with that.

Original comment by shiblon on 11 Nov 2010 at 2:59