General ⇒ formatting text within tables
formatting text within tables
I was wondering if there was a way to define a certain font face and size for text within tables. For instance, the main text is in Times Roman but I would like to put a sans serif font in some tables (preferably something that has the same characteristics as Arial). Is this possible?
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: formatting text within tables
Have you tried
{\sffamily
\begin{tabular}{....}
...
\end{tabular}
} ?
Regards.
{\sffamily
\begin{tabular}{....}
...
\end{tabular}
} ?
Regards.
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
formatting text within tables
The approach of mas goes in the right direction. Usually a tabular environment appears inside a table environment.workerbee wrote:I was wondering if there was a way to define a certain font face and size for text within tables. For instance, the main text is in Times Roman but I would like to put a sans serif font in some tables (preferably something that has the same characteristics as Arial). Is this possible?
Code: Select all
\begin{table}[!ht]
\centering
\sffamily
% The table itself
\caption{Sans serif table}\label{tab:sans-serif}
\end{table}
Code: Select all
\usepackage{mathptmx} % set main (and math) font to Times
\usepackage[scaled]{helvet} % set sans serif font to Helvetica (Arial like)
\usepackage{luximono} % set mono spaced font to Luxi
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10