From Newsgroup: comp.text.tex
On 23/10/2025 16:27, Adam Funk wrote:
Is there a way to force a tabular environment to set all the rows at
exactly 4-amm intervals? (I'm trying to print something to glue onto a 3D-printed base.)
I've tried searching the web for this and found things that don't work
at all or cause weird errors (like unknown command \rowheight).
Just change the \baselineskip (second argument to \fontsize).
\documentclass{article}
\usepackage[left=5mm,right=5mm]{geometry}
\usepackage{array,anyfontsize}
\begin{document}
\typeout{Baseline=\the\baselineskip}
\begin{tabular}{|c|r|l|r|}\hline
Date&Quantity&Item&Cost\\\hline
02-02-2002&25,000&Left-hand widgets&32,786\\\hline
03-03-2003&5,000&Right-hand widgets&32,786\\\hline
04-04-2004&2,000&Dual-hand widgets&32,786\\\hline
05-05-2005&250,000&Hands-free widgets&32,786\\\hline
06-06-2006&1&Left-hand screwdriver&32,786\\\hline
\end{tabular}
\begingroup
% 4mm |+ 25.4 (mm per inch) |u 72.27 (pt per inch) = 11.38pt \fontsize{9}{11.38}\selectfont
\typeout{Baseline=\the\baselineskip}
\begin{tabular}{|c|r|l|r|}\hline
Date&Quantity&Item&Cost\\\hline
02-02-2002&25,000&Left-hand widgets&32,786\\\hline
03-03-2003&5,000&Right-hand widgets&32,786\\\hline
04-04-2004&2,000&Dual-hand widgets&32,786\\\hline
05-05-2005&250,000&Hands-free widgets&32,786\\\hline
06-06-2006&1&Left-hand screwdriver&32,786\\\hline
\end{tabular}
\endgroup
\end{document}
But be aware that using any character that is taller or deeper than this
will push the baseline down.
Peter
--- Synchronet 3.21a-Linux NewsLink 1.2