Is there an easy way to specify sans serif fonts for text in LaTeX and Roman / Times for equations?
Ideally without having to change every equation in a document...
Thanks!
Edit: Solved below.
Math & Science ⇒ Sans for text, Roman for Equations?
Sans for text, Roman for Equations?
Last edited by EdGatzke on Thu Dec 09, 2010 5:50 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Sans for text, Roman for Equations?
This can be done very easily. See, e.g., this thread, but it would help to know exactly what fonts you want!
For Computer Modern Roman math and Computer Modern sans text:
For Times math with Helvetica text:
If you want some other combination, let us know which.
For Computer Modern Roman math and Computer Modern sans text:
Code: Select all
\documentclass{article}
\usepackage[english]{babel} % required for blindtext
\usepackage{blindtext} % for auto-generating a document
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
\blindmathpaper % auto-generate math document
\end{document}
Code: Select all
\documentclass{article}
\usepackage[english]{babel} % required for blindtext
\usepackage{blindtext} % for auto-generating a document
\usepackage[T1]{fontenc}
\usepackage{txfonts}
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
\blindmathpaper % auto-generate math document
\end{document}
Re: Sans for text, Roman for Equations?
Thanks a ton for helping me out! I had troubles with the blindtext, but your link to the other thread and some more googling got me fixed. I though I had searched on this adequately, but apparently not.
I am a big idiot. I am using Beamer which defaults to sans for all fonts. I finally found a nice example with a variety of example pages, and one of them pointed out the beamer class takes a option of mathserif that does exactly what I needed, equations are in serif and text is in sans.
In case you want to see some nice beamer font combo examples, here it is:
http://math.ecnu.edu.cn/~latex/beamer/MathFonts.pdf
Thanks again!
I am a big idiot. I am using Beamer which defaults to sans for all fonts. I finally found a nice example with a variety of example pages, and one of them pointed out the beamer class takes a option of mathserif that does exactly what I needed, equations are in serif and text is in sans.
In case you want to see some nice beamer font combo examples, here it is:
http://math.ecnu.edu.cn/~latex/beamer/MathFonts.pdf
Thanks again!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Sans for text, Roman for Equations?
Now that the problem is solved, please be so kind and mark the topic accordingly as written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.
Thorsten
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