3

I have a tabular environment in which all the cells of some rows are \tiny; a minimal example:

\begin{tabular}{|l|}
\hline
Dexterity \\ \hline
\tiny Saving Throws: $+2$ \\
\tiny Acrobatics: $+4$ \\
\tiny Sleight of Hand: $+2$ \\
\tiny Stealth: $+6$ \\
\hline
\end{tabular}

enter image description here

The problem with the above is that there's too much vertical space between the tiny-sized rows; ideally, the interrow spacing should be scaled down proportionally to the \tiny size. However, I don't know how to do that. My best attempt was to try to store the tiny-sized baseline skip with {\tiny\setlength\tinybls{\baselineskip}} (after inserting \newlength\tinybls in the preamble) and then append [\tinybls] to each \\, but that didn't seem to change anything.

  • 1
    In my opinion, you should not use the \tiny font size – no one will read your table. The lower limit, I think? is \ footnotesize. – Bernard Sep 26 '19 at 22:51
  • 1
    The space needs to be negative, e.g., \\[-5pt]. – Marijn Sep 26 '19 at 22:54
  • @Bernard: This is solely for my own consumption, and if I use a larger size, the table in question overflows too much. – jwodder Sep 26 '19 at 22:56
  • You may have multiline cells to prevent overflowing. – Bernard Sep 26 '19 at 22:57
7

Set the sub-properties in its own tabular after choosing the appropriate font size :

enter image description here

\begin{tabular}{ | c | }
  \hline
  Dexterity \\ % Property
  \hline
  \tiny % Font size of sub-properties
  \begin{tabular}{ @{} r @{: } l @{} }
      Saving Throws & $+2$ \\
         Acrobatics & $+4$ \\
    Sleight of Hand & $+2$ \\
            Stealth & $+6$
  \end{tabular} \\
  \hline
\end{tabular}

Better yet, define a command that would set this for you. It will allow you to change things later on with much less hassle and more consistency... we all like the latter:

\documentclass{article}

\newcommand{\propertycard}[2]{%
  \begin{tabular}{ | c | }
    \hline
    #1 \\ % Property
    \hline
    \tiny % Sub-property font style
    \begin{tabular}{ @{} r @{: } l @{} }
      #2 % Sub-properties
    \end{tabular} \\
    \hline
  \end{tabular}
}

\begin{document}

\propertycard{Dexterity}{%
    Saving Throws & $+2$ \\
       Acrobatics & $+4$ \\
  Sleight of Hand & $+2$ \\
          Stealth & $+6$
}

\end{document}

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.