1

Using the cmbright package results in a complete change from serif to sans serif text and math fonts, including even lowercase, sans serif Greek letters.

However, I’d like to use the cmbright package only in a limited range of my document — for example, in the most recent edition of the Feynman Lectures on Physics, the cmbright package appears to be used for figures and their captions only:

enter image description here

How exactly can I achieve this? At the very least, I’d be interested in using the lowercase and uppercase sans serif Greek letters from the cmbright package whilst otherwise using the standard Computer Modern fonts for text and math.

9
  • 1
    Why don't you simply use \usepackage{cmbright}?
    – campa
    Nov 23, 2020 at 9:52
  • I want to use cmbright’s (imho) superior sans serif fonts but retain the CM serif fonts.
    – Rindler98
    Nov 23, 2020 at 10:11
  • cmbright doesn't change the serif font. I suspect you want to use cmbright without making the sans-serif font the default font.
    – campa
    Nov 23, 2020 at 10:13
  • Exactly, as described above.
    – Rindler98
    Nov 23, 2020 at 10:14
  • I’d like cmbright NOT to turn itself into the default font for math environments, too.
    – Rindler98
    Nov 23, 2020 at 10:15

1 Answer 1

1

In PDFLaTeX,

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{cmbright}
\usepackage[paperwidth=10cm]{geometry}

\renewcommand\familydefault{\rmdefault}

\begin{document}
Text in Computer Modern Roman,
\textsf{and Computer Modern Bright.}
\end{document}

Computer Modern Roman and Bright sample

To change only the sans-serif text font, and not the default font or the math fonts:

\documentclass{article}
\usepackage[T1]{fontenc}
\renewcommand{\sfdefault}{cmbr}

\begin{document}
Text in Computer Modern Roman,
\textsf{and Computer Modern Bright.}
\end{document}

Then add \sffamily to every type of text you want to appear in sans-serif, such as captions.

If you wanted to use CM Bright Greek letters in math mode, the simplest way to do that is probably to load it as the OML sans-serif math alphabet through isomath.

You could also do something like (untested):

\DeclareSymbolFont        {sans} {OML}{cmbrm}{m}{it}
\SetSymbolFont      {sans}{bold} {OML}{cmbrm}{b}{it}

\DeclareMathSymbol{\alpha}{\mathalpha}{sans}{11}
\DeclareMathSymbol{\beta}{\mathalpha}{sans}{12}
\DeclareMathSymbol{\gamma}{\mathalpha}{sans}{13}
\DeclareMathSymbol{\delta}{\mathalpha}{sans}{14}
\DeclareMathSymbol{\epsilon}{\mathalpha}{sans}{15}
\DeclareMathSymbol{\zeta}{\mathalpha}{sans}{16}
\DeclareMathSymbol{\eta}{\mathalpha}{sans}{17}
\DeclareMathSymbol{\theta}{\mathalpha}{sans}{18}
\DeclareMathSymbol{\iota}{\mathalpha}{sans}{19}
\DeclareMathSymbol{\kappa}{\mathalpha}{sans}{20}
\DeclareMathSymbol{\lambda}{\mathalpha}{sans}{21}
\DeclareMathSymbol{\mu}{\mathalpha}{sans}{22}
\DeclareMathSymbol{\nu}{\mathalpha}{sans}{23}
\DeclareMathSymbol{\xi}{\mathalpha}{sans}{24}
\DeclareMathSymbol{\pi}{\mathalpha}{sans}{25}
\DeclareMathSymbol{\rho}{\mathalpha}{sans}{26}
\DeclareMathSymbol{\sigma}{\mathalpha}{sans}{27}
\DeclareMathSymbol{\tau}{\mathalpha}{sans}{28}
\DeclareMathSymbol{\upsilon}{\mathalpha}{sans}{29}
\DeclareMathSymbol{\phi}{\mathalpha}{sans}{30}
\DeclareMathSymbol{\chi}{\mathalpha}{sans}{31}
\DeclareMathSymbol{\psi}{\mathalpha}{sans}{32}
\DeclareMathSymbol{\omega}{\mathalpha}{sans}{33}
\DeclareMathSymbol{\varepsilon}{\mathalpha}{sans}{34}
\DeclareMathSymbol{\vartheta}{\mathalpha}{sans}{35}
\DeclareMathSymbol{\varpi}{\mathalpha}{sans}{36}
\DeclareMathSymbol{\varrho}{\mathalpha}{sans}{37}
\DeclareMathSymbol{\varsigma}{\mathalpha}{sans}{38}
\DeclareMathSymbol{\varphi}{\mathalpha}{sans}{39}
\DeclareMathSymbol{\Gamma}{\mathalpha}{sans}{0}
\DeclareMathSymbol{\Delta}{\mathalpha}{sans}{1}
\DeclareMathSymbol{\Theta}{\mathalpha}{sans}{2}
\DeclareMathSymbol{\Lambda}{\mathalpha}{sans}{3}
\DeclareMathSymbol{\Xi}{\mathalpha}{sans}{4}
\DeclareMathSymbol{\Pi}{\mathalpha}{sans}{5}
\DeclareMathSymbol{\Sigma}{\mathalpha}{sans}{6}
\DeclareMathSymbol{\Upsilon}{\mathalpha}{sans}{7}
\DeclareMathSymbol{\Phi}{\mathalpha}{sans}{8}
\DeclareMathSymbol{\Psi}{\mathalpha}{sans}{9}
\DeclareMathSymbol{\Omega}{\mathalpha}{sans}{10}

In LuaTeX or XeTeX:

\documentclass{article}
\usepackage{unicode-math}
\usepackage[paperwidth=10cm]{geometry}

\setsansfont{CMU Bright}[Scale=MatchLowercase]

\begin{document}
Text in Computer Modern Roman,
\textsf{and Computer Modern Bright.}
\end{document}

To load only its Greek letters in math mode, you would do something like:

\setmathfont{Latin Modern Math}
\setmathfont{CMU Bright}[range=up/{Greek,greek}]
\setmathfont{CMU Bright Italic}[range=it/{Greek,greek}]
2
  • This leaves the math fonts sans serif, however. How can I reset the math fonts to serif when using the cmbright package?
    – Rindler98
    Feb 13, 2021 at 22:29
  • @JilalJahangir Edited with that use case.
    – Davislor
    Feb 14, 2021 at 3:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .