• Forcing tabular rows to have an exact height?

    From Adam Funk@a24061@ducksburg.com to comp.text.tex on Thu Oct 23 16:27:32 2025
    From Newsgroup: comp.text.tex

    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).

    Thanks
    --
    FORTRAN: You shoot yourself in each toe, iteratively, until you run
    out of toes, then you read in the next foot and repeat. If you run out
    of bullets, you continue anyway because you have no exception-handling facility.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Richard Heathfield@rjh@cpax.org.uk to comp.text.tex on Thu Oct 23 18:33:59 2025
    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 pasted the above paragraph unmodified into ChatGPT, and it gave
    me three promising-looking suggestions. Worth a look, perhaps?
    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Holger Schieferdecker@spamless@gmx.de to comp.text.tex on Fri Oct 24 09:06:02 2025
    From Newsgroup: comp.text.tex

    Am 23.10.2025 um 17:27 schrieb Adam Funk:
    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).

    You could try to mimic the table with TikZ. There you have precise
    control of the position of elements like text or lines.

    Holger
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Adam Funk@a24061@ducksburg.com to comp.text.tex on Mon Oct 27 10:52:21 2025
    From Newsgroup: comp.text.tex

    On 2025-10-24, Holger Schieferdecker wrote:

    Am 23.10.2025 um 17:27 schrieb Adam Funk:
    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).

    You could try to mimic the table with TikZ. There you have precise
    control of the position of elements like text or lines.

    Great suggestion --- it took some trial and error along with the
    documentation, but it worked well for programatically generating (with
    Python) the table I wanted (as a file to \input).

    Even though the table is bounded by

    \draw[black] (0, 20.000) -- (3.600, 20.000) ;
    ...
    \draw[black] (0, 0) -- (3.6, 0) ;
    \draw[black] (0.000, 0) -- (0.000, 20.0) ;
    \draw[black] (0.900, 0) -- (0.900, 20.0) ;
    \draw[black] (1.800, 0) -- (1.800, 20.0) ;
    \draw[black] (2.700, 0) -- (2.700, 20.0) ;
    \draw[black] (3.600, 0) -- (3.600, 20.0) ;

    and I carefully printed the PDF at 100% with Page Scaling: None, it
    comes out at 199 mm rather than 200, but I think that will work.

    Thanks.
    --
    Telekinetic, dynamite
    Psychic warfare is real
    You better believe me brother
    X-ray vision
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Peter Flynn@peter@silmaril.ie to comp.text.tex on Wed Nov 5 12:11:22 2025
    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