Fonts & Character SetsDifferent Math/Text fonts

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
stantestco
Posts: 8
Joined: Tue Jul 21, 2009 12:13 pm

Different Math/Text fonts

Post by stantestco »

Hi Guys,

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!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Different Math/Text fonts

Post by localghost »

You should think well about typesetting a whole document in a sans serif font. These fonts are good for screen presentation but are inappropriate for printed material. Serifs of a font are guidelines for the eye to ease legibility. Nevertheless you can take a look at the "Free Math Font Survey" document.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
stantestco
Posts: 8
Joined: Tue Jul 21, 2009 12:13 pm

Re: Different Math/Text fonts

Post by stantestco »

Hi Thorsten,

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.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Different Math/Text fonts

Post by localghost »

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.
This is exactly the kind of document which should not be done with a sans serif font. But if you insist ...

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}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
stantestco
Posts: 8
Joined: Tue Jul 21, 2009 12:13 pm

Re: Different Math/Text fonts

Post by stantestco »

http://www.alexpoole.info/academic/lite ... ew_fr.html

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.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Different Math/Text fonts

Post by localghost »

stantestco wrote:http://www.alexpoole.info/academic/literaturereview_fr.html

Interesting. And even more so considering he uses a sans-serif font, [...]
His arguments are very weak and finally he comes to the result of a 6:4 win for serif 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 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:[...] 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 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.

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.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply