I'm using LuaTeX with a font that has proportional, lining and tabular numbers available.
Is it possible to set things up so tables automatically use tabular numbers – but proportional numbers are used in the text?
fontspecformattingluatextables
I'm using LuaTeX with a font that has proportional, lining and tabular numbers available.
Is it possible to set things up so tables automatically use tabular numbers – but proportional numbers are used in the text?
Best Answer
Yes, please provide an MWE so we know more about your specific situation. If for now we assume you're using
fontspec
like most people, what you're looking for is pretty easily done. I'd use the\AtBeginEnvironment
from theetoolbox
package to automatically invoke a font change at the begin of everytabular.
This is a matter of just one line:so, as figure style selection is already implemented in
fontspec
, there is no need for an additional package --etoolbox
is likely to get loaded by other common packages anyways (biblatex
etc.). Here's the complete example:NB: besides its simplicity, another nice thing here is you can insert additional table formatting as well. E.g., I usually want my tables
\footnotesize
: