Fonts & Character Sets ⇒ Different Math/Text fonts
-
stantestco
- Posts: 8
- Joined: Tue Jul 21, 2009 12:13 pm
Different Math/Text fonts
I have a question. I'm relatively new to Matrix-- I'm quite familiar with it, but some things still elude me. I've been trying to figure out how to do the following, and I was wondering if somebody could assist me:
1) How do I have a separate font for Math (I'd like to use the default latex font), and use cmbright for text (it looks sharp)? I'd also like to use a different font for headings.
I'm using cmbright as follows right now:
\usepackage[T1]{fontenc}
\usepackage{cmbright}
Thanks guys!
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Different Math/Text fonts
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
stantestco
- Posts: 8
- Joined: Tue Jul 21, 2009 12:13 pm
Re: Different Math/Text fonts
Thanks for your reply, and I have looked over the guide. I am still wondering how to use one font for general text, and another for specifically Math equations only? The commands for the Math fonts in that guide lock normal and math fonts to the one specified.
And that's interesting, I never thought about that. However, I'm not writing a novel-- it's going to be short paragraphs peppered with equations/diagrams (standardized exam book). If it would be a lot of information, then yes.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Different Math/Text fonts
This is exactly the kind of document which should not be done with a sans serif font. But if you insist ...stantestco wrote:[...] And that's interesting, I never thought about that. However, I'm not writing a novel-- it's going to be short paragraphs peppered with equations/diagrams (standardized exam book). If it would be a lot of information, then yes.
Just load the package affecting the math mode font additionally.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{cmbright,fourier}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\parindent0em
\DeclareMathOperator{\Res}{Res}
\begin{document}
\begin{theorem}[Residue Theorem]
Let $f$ be analytic in the region $G$ except for the isolated
am . If $\gamma$ is a closed rectifiable curve in $G$ which does not pass through any
singularities $a_1,a_2,\ldots,a_m$. If $\gamma$ is a closed rectifiable curve which does not pass through any of the points $a_k$ and if $\gamma\approx 0$ in G then
\[
\frac{1}{2\pi i}\int_\gamma f=\sum_{k=1}^m n(\gamma;a_k)\Res(f;a_k)
\]
\end{theorem}
\end{document}Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
stantestco
- Posts: 8
- Joined: Tue Jul 21, 2009 12:13 pm
Re: Different Math/Text fonts
Interesting. And even more so considering he uses a sans-serif font,
I find sans-serif easier on the eyes personally. It's also easier to scan in on information quickly with a sans-serif font as you can make out the word shape easier (imo at least). Standardized exam books once read through are frequently used as a reference and that involves a lot of finding information quickly in random parts of the book.
Interesting sample-- but why does it work with fourier? I don't get what's going on there. cmbright loads, then fourier (I'm assuming a math-only font) comes in and overrides the default math fonts. Is there a way to pick one font, then just to insert the math font from another font? Or will the latter font completely override the first? I'd like to mix sans-serif for text and serif for math. I'm still kind of at a loss, your example works, I'm using that for now but I don't know how to switch it to other math fonts.
Thanks.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Different Math/Text fonts
His arguments are very weak and finally he comes to the result of a 6:4 win for serif fonts.stantestco wrote:http://www.alexpoole.info/academic/literaturereview_fr.html
Interesting. And even more so considering he uses a sans-serif font, [...]
I take it with last paragraph of the Conclusions section. Sans serif fonts in my eyes are simply horrible and my eyes get tired when reading longer texts typeset of printed material with these kinds of fonts.stantestco wrote:I find sans-serif easier on the eyes personally. It's also easier to scan in on information quickly with a sans-serif font as you can make out the word shape easier (imo at least). Standardized exam books once read through are frequently used as a reference and that involves a lot of finding information quickly in random parts of the book. [...]
I am generally not a friend of mixing different fonts in one document. The right choice is a very sensible matter. That's the reason why I never worried about that.stantestco wrote:[...] Interesting sample-- but why does it work with fourier? I don't get what's going on there. cmbright loads, then fourier (I'm assuming a math-only font) comes in and overrides the default math fonts. Is there a way to pick one font, then just to insert the math font from another font? Or will the latter font completely override the first? I'd like to mix sans-serif for text and serif for math. I'm still kind of at a loss, your example works, I'm using that for now but I don't know how to switch it to other math fonts. [...]
I'm not aware of another method to use different fonts for text and math like the one described in the document I mentioned. Other math-only fonts are described in the same document. Theoretically it should work with every font and a math-only font loaded subsequently. Just try out.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10