shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

dvips using wrong paper size (e.g. a4 instead of letter) #175

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 162

Using Makefile 2.2.0, Ubuntu Linux 12.04, in Europe.
I have to have a PS file so I am using "BUILD_STRATEGY = latex", and not "BUILD_STRATEGY
= pdflatex" (no, the latter one or pdf2ps is not an option).

In line 2498, in the dvips command, there should be a "-t $(PAPERSIZE)" command option,
with somewhere above:

# Papersize: letter, a4 or other dvips compatible option.
PAPERSIZE           ?= letter

Reason: In the latex build chain, dvips is the only one that ignores the paper size
given in the ".tex" file. If you want a PS in a "foreign" format (e.g. letter on European
Ubuntu installs), you need to specify the paper size to dvips, using the "-t" option.

My adapted Makefile is attached.

Reported by kai.ruhl on 2012-07-16 12:39:42


shiblon commented 8 years ago
FWIW, I would never presume to tell you that dvips is a bad option.  :-)

By the way, dvips should be automatically determining the papersize from your documentclass
option.  Have you tried doing this?

\documentclass[letterpaper]{article}

If you look closely at the dvips invocation in the stock makefile, you'll see that
-t is, in fact, used, whenever it can be.  Check out the make-ps function and the places
that call it.

The papersize is discovered by the get-source-specials function, which outputs some
metadata to a file, including inferred paper size, use of beamer, and document orientation.
 All of this to make dvips work better without explicit knowledge of the document source.

By the way, this is mentioned in the built-in help, but it's easy to miss.  It's under
the %.ps section, which has some other details about how these metadata extraction
options work.

For now I'm marking this Invalid.  If the problem persists after including a suitable
letterpaper marker in your documentclass options, let me know and I'll look into it.

Reported by shiblon on 2012-07-17 07:34:54

shiblon commented 8 years ago
Confirmed. My problem can also be solved by adding [letterpaper] to:

\documentclass[letterpaper]{article}

I retract me previous statements %-)

Reported by kai.ruhl on 2012-07-17 14:58:55