1

What are the fundamental TeX length names, corresponding to trim size and offsets?

I already know that \pdfpagewidth and \pdfpageheight will grab enough information to calculate the PDF MediaBox (in different units). These commands are independent of the latex document class, AFAIK.

And I know that if memoir class is used, I can grab the trim size and offsets from the values set using memoir commands: \paperwidth \paperheight \trimtop \trimedge. These can be used to calculate the size and position of the PDF TrimBox. I know how to do the calculations.

But the problem is that for the TrimBox, I rely on memoir-specific lengths. If memoir is not in use, no luck. So what I want to know is: Is there a universal set of lengths (by name) that latex uses regardless of document class, when it comes to the TrimBox? I don't need to know the values until AtBeginDocument.

Why I wish to know: I have improvements to pdfx package, which enable arbitrary document sizes. But my current solution relies on memoir to give me the lengths. I would like to make it more general.

  • See this posting for example of displaying the layout and parameter values for a given document. tex.stackexchange.com/questions/251215/… – R. Schumacher Jul 4 '15 at 17:15
  • I saw that earlier. I do not need to display the numerical values, or a diagram. What I need to know is the internal name of the TeX commands that are actually at the bottom of all that. The listed commands do not seem to be fundamental. – RobtA Jul 4 '15 at 19:00
  • Then you are really interested in the "plain TeX" parameters, as they are at the very base of LaTeX or other formats e.g. ConTeXt, lillypond, and even Memoir(which is only a style build on LaTeX). A good reference in here. Warning, it is very hard to understand unless you have a copy of "The TeXbook" in hand. tug.org/utilities/plain/cseq.html#type-fam – R. Schumacher Jul 4 '15 at 19:29
  • In addition to The TeXbook, you might want to look at TeX by Topic. – jon Jul 4 '15 at 21:28
  • ^I believe neither of those will tell you the answer because I think you're looking for pdf-specific primitives. So maybe those can be found in pdftex, dvipdfmx, or luatex manuals. – morbusg Jul 5 '15 at 7:20
0

The answer was not hard to find in documentation, but first I had to look in the right place, then verify that the info pertained to a wide variety of document setups, not just one. The info was in doc/latex/base/classes.pdf, in the base documents. Here is what I found:

\paperwidth and \paperheight are the trimmed width and height.

\topmargin \oddsidemargin \evensidemargin (minus 1in) are related to the trimmed offsets.

The above are set by memoir class using different commands. But they may also be set directly, regardless of class. Although memoir documentation (and others) show these lengths, it was not obvious whether or not they were universal, or package-specific.

The root of the problem is that the terminology used in TeX is not identical to the teminology used in commercial printing. In many cases, the same word means two different things. How many readers here really know the difference between "trim" and "crop"? I went through this in a different way two years ago, for a novel: I used terminology that pertained to commercial publication, but the person editing my text only knew the terminology of MS Word.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.