Page LayoutPlain TeX question - exact page positioning

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
unclaimed
Posts: 1
Joined: Tue Mar 15, 2011 9:10 pm

Plain TeX question - exact page positioning

Post by unclaimed »

I learned enough TeX to be dangerous in the plain TeX days, before LaTeX. I only need to use TeX every couple years, and I know how to muddle through the kinds of documents I typically produce.

Now I want to generate some labels to put onto photo prints taken from old albums. I bought some 3M 3700-R blank label sheets. These sheets are letter sized, with 15 rows by 4 columns of labels. I only need very simple photo IDs, like "A-002" or "BX-125". 'A' and 'BX' are album indices, and '002' and '125' are photo numbers within their albums. I can fit 3 such IDs side-by-side per label, or 180 IDs per sheet. Two sheets per album ought to be enough. I will split the labels into their 3 parts with a paper cutter.

To do this, I need to be able to align the IDs precisely within TeX. I am having problems. The code below just experiments with one aspect of my task, drawing line segments across the width of the 4 labels in a row. The code contains all relevant dimensions, named (I hope) in an obvious way. I get too large a gap on the left side, lines that are too short, and a gap on the right that is shorter than the one on the left. Thanks for any help.

Process:
- tex labels (latest version packaged with openSUSE)
- dvipdf labels (ditto)
- then print the TeX files

labels.tex:

Code: Select all

\nopagenumbers%
%
\hsize=8.5in \hoffset=-1in%
\vsize=11in \voffset=-1in%
%
\newdimen\hMargin \hMargin=7mm%
\newdimen\vMargin \vMargin=9mm%
\newdimen\colGap \colGap=8mm% unused
\newcount\nRow \nRow=15%
\newcount\nCol \nCol=4%
\newdimen\hLabel \hLabel=1.75in%
\newdimen\vLabel \vLabel=.6666666666667in%
%
\ \vfill%
\vbox{%
	\hbox to\hsize{%
		\hfill%
		\hbox to\hLabel{\hrulefill}%
		\hbox to\colGap{\hfill}%
		\hbox to\hLabel{\hrulefill}%
		\hbox to\colGap{\hfill}%
		\hbox to\hLabel{\hrulefill}%
		\hbox to\colGap{\hfill}%
		\hbox to\hLabel{\hrulefill}%
		\hfill%
	}%
}%
\vfill\eject%
\end

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply