Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For creating the graphics for my thesis (function graphs, flow charts, line art sketches) I've chosen to use the sans serif font by

\renewcommand\familydefault{\sfdefault} 

However when I use mathematical symbols like $p_{s}$, they are still typeset in roman font and that looks weird:

screenshot of example

So I wonder:

  • how could I force mathematical expressions also be typeset in \sfdefault
  • if I do, are there any negative sideeffects to expect (with greek signs or other special symbols?)

  • OR should I typeset all "mathematical" graphs (axis labels etc.) in roman font, and only make the other graphics like flow charts and sketches with sans serif font?

share|improve this question

4 Answers 4

up vote 9 down vote accepted

I've been looking into this myself as well, but it seems a lot trickier to get it working for math fonts than for regular text font. Apparently the math fonts have some 'metric' used for kerning that is not present in regular fonts. Some (partial) solutions I found:

Like this:

\setmathrm{Arial}
\setmathsf{Arial}
\setmathtt{Arial}
\setboldmathrm[BoldFont={Optima ExtraBlack}]{Optima Bold}

However this does not change the italic math font for some reason (and there does not seem to be an option to do this(?)).

  • Use sfmath, which comes with a couple of pre-packaged fonts

\usepackage[cm]{sfmath}

\usepackage{cmbright}

This works fairly well, but the choice of fonts is limited.

For example:

\usepackage{unicode-math}
%\usepackage[math-style=ISO]{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
%\setmathfont[range=\mathit/{latin,Latin}]{Adobe Garamond Pro}

Although this has the problem that \setmathfont{} gives a bug when used in combination with amsmath...

share|improve this answer
    
(sorry, can't post more hyperlinks...) –  Tim Jul 25 '11 at 10:27
1  
If you put two spaces after each link, there will be a linebreak an it becomes a little more readable –  Tobi Jul 25 '11 at 10:37
    
@Tobi: thanks, didn't know that –  Tim Jul 25 '11 at 11:01

I use the sansmath package. It has the advantage that I can switch back and forth between serif and sans math within a single document. Here http://dtrx.de/od/tex/sfmath.html#comparison is a comparison of the different methods of doing math in sans serif.

share|improve this answer

For whole document:

\usepackage{arev}

or

\usepackage{cmbright}

See A Survey of Free Math Fonts for TeX and LaTeX

For only some letters and numbers in part of a document, use \mathsf.

share|improve this answer

The easiest way I've found to do this is to use \mathsf. So I write

$ 7\times \rho = \mathsf{c_1} $

share|improve this answer
    
dropbox.com/s/wj816ehuw3594gr/1.PNG –  Papiro Jul 12 '13 at 10:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.