答案1
在 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}
仅更改无衬线文本字体,而不更改默认字体或数学字体:
\documentclass{article}
\usepackage[T1]{fontenc}
\renewcommand{\sfdefault}{cmbr}
\begin{document}
Text in Computer Modern Roman,
\textsf{and Computer Modern Bright.}
\end{document}
然后添加\sffamily
到您想要以无衬线字体显示的每种类型的文本,例如标题。
如果您想在数学模式中使用 CM Bright Greek 字母,最简单的方法可能是通过 将其作为 OML sans-serif 数学字母加载isomath
。
您还可以执行类似操作(未经测试):
\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}
在 LuaTeX 或 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}
要在数学模式中仅加载其希腊字母,您可以执行以下操作:
\setmathfont{Latin Modern Math}
\setmathfont{CMU Bright}[range=up/{Greek,greek}]
\setmathfont{CMU Bright Italic}[range=it/{Greek,greek}]