2

I'm making a table of line spacings to assist with aligning vertical skips. Here's a condensed version:

\documentclass[11pt]{memoir}
\pagestyle{empty}

\usepackage{fontspec}
\defaultfontfeatures[\rmfamily,\sffamily]{Ligatures=TeX}
\setmainfont{baskervillef}

\newlength{\normallead}

% --- DOCUMENT ---
\begin{document}

\normalsize % 11pt
\setlength{\normallead}{\baselineskip}

\ttfamily
\large

\begin{tabular}{l l l l l l}
normal & \the\normallead & \the2\normallead & \the3\normallead & \the4\normallead & \the5\normallead \\
\end{tabular}

\end{document}

For the real thing, I repeat what I do with \normalsize and \normallead for all other font sizes (i.e. \large, \small, etc.) I need my table to contain multiples of the different leading values: \normallead, 2\normallead, 3\normallead, etc, but it seems I can't use a multiplier with the \the command. Is there any way to do this other than hard-coding the lead values or creating \newlength's for every multiple?

1 Answer 1

3

Use \the\dimexpr...

\documentclass[11pt]{memoir}
\pagestyle{empty}

%\usepackage{fontspec}
%\defaultfontfeatures[\rmfamily,\sffamily]{Ligatures=TeX}
%\setmainfont{baskervillef}

\newlength{\normallead}

% --- DOCUMENT ---
\begin{document}

\normalsize % 11pt
\setlength{\normallead}{\baselineskip}

\ttfamily
\large

\begin{tabular}{l l l l l l}
normal & \the\normallead & \the\dimexpr2\normallead & 
\the\dimexpr3\normallead & \the\dimexpr4\normallead & 
\the\dimexpr5\normallead \\
\end{tabular}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .