Math & Science ⇒ Sans for text, Roman for Equations?
Sans for text, Roman for Equations?
Ideally without having to change every equation in a document...
Thanks!
Edit: Solved below.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Sans for text, Roman for Equations?
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?
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?
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10