7

I need to typeset a whole document sans serif with sourcesanspro, including formulas. I know that there are a lot of arguments against doing this, but in this particular case it makes sense.

My problem is (as often asked at several places of the web), that I don't find a proper sans serif math font. I searched the web for hours and tested a lot of possibilities (arec. cmbright, iwona ...) but ended up using sansmath.

As far as I understood sansmath, it uses the default sans serif family for typesetting formulas. The problem is, that sourcesanspro doesn't include greek letters or symbols like blackboard fonts.

Is it possible to replace several symbols of the math font, e. g. greek letters, by the greek letters of other fonts manually?

That's my MWE, so far:

\documentclass{scrartcl}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath, amssymb}

\usepackage[default]{sourcesanspro}

\usepackage{sansmath}
\sansmath

\begin{document}


\noindent
ABCDEFGHIJKLMNOPQRSTUVWXYZ \\
abcdefghijklmnopqrstuvwxyz \\
$abcdefghijklmnopqrstuvwxyz$ \\
$ABCDEFGHIJKLMNOPQRSTUVWXYZ$ \\
$\alpha\beta\gamma\delta\epsilon\varepsilon\zeta\eta\theta\vartheta\iota\kappa\varkappa\lambda\mu\nu\xi o\pi\varpi\rho\varrho\sigma\varsigma\tau\upsilon\phi\varphi\chi\psi\omega$ \\
$\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega$ \\
$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\[
  \frac{1}{2\pi i}\int_\gamma f = \sum_{k=1}^m n(\gamma;a_k) \cdot \text{Res}(f;a_k).
\]

\end{document}

Sans serif document

7

This uses Iwona for Greek, change the font family in \DeclareSymbolFont if you want a different font.

\documentclass{scrartcl}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath, amssymb}

\usepackage[default]{sourcesanspro}

\usepackage{sansmath}
\sansmath

\DeclareSymbolFont{Greekletters}{OT1}{iwona}{m}{n}
\DeclareSymbolFont{greekletters}{OML}{iwona}{m}{it}
\DeclareMathSymbol{\Delta}{\mathord}{Greekletters}{"01}
\DeclareMathSymbol{\Theta}{\mathord}{Greekletters}{"02}
\DeclareMathSymbol{\Lambda}{\mathord}{Greekletters}{"03}
\DeclareMathSymbol{\Xi}{\mathord}{Greekletters}{"04}
\DeclareMathSymbol{\Pi}{\mathord}{Greekletters}{"05}
\DeclareMathSymbol{\Sigma}{\mathord}{Greekletters}{"06}
\DeclareMathSymbol{\Upsilon}{\mathord}{Greekletters}{"07}
\DeclareMathSymbol{\Phi}{\mathord}{Greekletters}{"08}
\DeclareMathSymbol{\Psi}{\mathord}{Greekletters}{"09}
\DeclareMathSymbol{\Omega}{\mathord}{Greekletters}{"0A}

\DeclareMathSymbol{\alpha}{\mathord}{greekletters}{"0B}
\DeclareMathSymbol{\beta}{\mathord}{greekletters}{"0C}
\DeclareMathSymbol{\gamma}{\mathord}{greekletters}{"0D}
\DeclareMathSymbol{\delta}{\mathord}{greekletters}{"0E}
\DeclareMathSymbol{\epsilon}{\mathord}{greekletters}{"0F}
\DeclareMathSymbol{\zeta}{\mathord}{greekletters}{"10}
\DeclareMathSymbol{\eta}{\mathord}{greekletters}{"11}
\DeclareMathSymbol{\theta}{\mathord}{greekletters}{"12}
\DeclareMathSymbol{\iota}{\mathord}{greekletters}{"13}
\DeclareMathSymbol{\kappa}{\mathord}{greekletters}{"14}
\DeclareMathSymbol{\lambda}{\mathord}{greekletters}{"15}
\DeclareMathSymbol{\mu}{\mathord}{greekletters}{"16}
\DeclareMathSymbol{\nu}{\mathord}{greekletters}{"17}
\DeclareMathSymbol{\xi}{\mathord}{greekletters}{"18}
\DeclareMathSymbol{\pi}{\mathord}{greekletters}{"19}
\DeclareMathSymbol{\rho}{\mathord}{greekletters}{"1A}
\DeclareMathSymbol{\sigma}{\mathord}{greekletters}{"1B}
\DeclareMathSymbol{\tau}{\mathord}{greekletters}{"1C}
\DeclareMathSymbol{\upsilon}{\mathord}{greekletters}{"1D}
\DeclareMathSymbol{\phi}{\mathord}{greekletters}{"1E}
\DeclareMathSymbol{\chi}{\mathord}{greekletters}{"1F}
\DeclareMathSymbol{\psi}{\mathord}{greekletters}{"20}
\DeclareMathSymbol{\omega}{\mathord}{greekletters}{"21}
\DeclareMathSymbol{\varepsilon}{\mathord}{greekletters}{"22}
\DeclareMathSymbol{\vartheta}{\mathord}{greekletters}{"23}
\DeclareMathSymbol{\varpi}{\mathord}{greekletters}{"24}
\DeclareMathSymbol{\varrho}{\mathord}{greekletters}{"25}
\DeclareMathSymbol{\varsigma}{\mathord}{greekletters}{"26}
\DeclareMathSymbol{\varphi}{\mathord}{greekletters}{"27}


\begin{document}


\noindent
ABCDEFGHIJKLMNOPQRSTUVWXYZ \\
abcdefghijklmnopqrstuvwxyz \\
$abcdefghijklmnopqrstuvwxyz$ \\
$ABCDEFGHIJKLMNOPQRSTUVWXYZ$ \\
$a\alpha\beta\gamma\delta\epsilon\varepsilon\zeta\eta\theta\vartheta\iota\kappa\varkappa\lambda\mu\nu\xi o\pi\varpi\rho\varrho\sigma\varsigma\tau\upsilon\phi\varphi\chi\psi\omega$ \\
$\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega$ \\
$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\[
  \frac{1}{2\pi i}\int_\gamma f = \sum_{k=1}^m n(\gamma;a_k) \cdot \text{Res}(f;a_k).
\]
\end{document}

enter image description here

Personal opinion Sans serif math can be justified only in a presentation.

|improve this answer|||||
  • That's exactly what I looked for, thank you very much! Just to be clear: – dawu Aug 12 '14 at 9:41
  • Just to be clear: \DeclareSymbolFont{Greekletters}{OT1}{iwona}{m}{n} declares the new symbol font Greekletters using iwona and \DeclareMathSymbol{\Delta}{\mathord}{Greekletters}{"01} (re)declares the command \Delta to be typeset in Greekletters font? One more question: Where do I find the numbers, e. g. "01 for the large delta? Personal answer I totally agree with you! I create a document class (my first, by the way) for overhead transparencies I want to use at school. – dawu Aug 12 '14 at 9:52
  • The numbers are the standard ones for OT1 (uppercase Greek) and OML (lowercase Greek) encoded fonts; you find them in fontmath.ltx. Note that I changed the default \mathalpha for the uppercase Greek into \mathord or the letters would respect the \sansmath declaration. – egreg Aug 12 '14 at 9:56
  • Okay! Thank you very much! Fonts are a really big topic (despite or maybe because of the many information in the web), so it is really helpful to get some support here. :o) – dawu Aug 12 '14 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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