I absolutely love inches


I like TeX. It suits most of my needs and it’s overall quite nice (let’s not talk about the directory structure, ok?). I use pdftex because most people can easily read pdf files.
I want to do a really simple thing: make a page that is 148mm wide and 210mm high. Not so difficult with \pdfpagewidth and \pdfpageheight. Then set the “text area” to 170×115, not so difficult with \hsize and \vsize. And finally, as I’d like to have the text horizontally centered, I count that 148-116=32, divide by two and we get 16mm borders.

Now the big question arises: how do I tell TeX that it should start typesetting 16mm from the left side? \hoffset cleverly starts 1 inch from the left and any value that you input adds (or substracts) to the 1 inch.

I think I must be missing something… maybe there’s a way to write it differently? Or I can somehow tell TeX: “substract 1inch and add 16mm”?

Of course it would be the best if the “reference point” (or whatever it’s called) was at 0, 0, not at 1inch, 1inch. Or it could be at least reset to 0 when you call \hoffset.

Any help, anyone? (don’t tell me to count what I need to substract from the inch, that’s what I’m currently doing and it’s completely inelegant and pain in the ass).

Posted on 2006-12-26 at 6:08 pm, filed under computers. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “I absolutely love inches”

  1. tasuki says:

    thanks for all the helpful answers :kiss:

    the answer is: \advance\hoffset -1in

Leave a Reply

Because this post is too old and I'm getting a lot of spam on old posts, only registered users can post a comment here.