替换数学字体中的几个字母

替换数学字体中的几个字母

我需要用 排版整个文档sourcesanspro,包括公式。我知道有很多人反对这样做,但在这个特定情况下,这样做是有意义的。

我的问题是(就像网络上很多地方经常问到的那样),我没有找到合适的无衬线数学字体。我在网上搜索了几个小时,测试了很多种可能性(arec. cmbrightiwona...),但最终还是使用了sansmath

据我所知sansmath,它使用默认的无衬线字体系列来排版公式。问题是,它sourcesanspro不包括希腊字母或像黑板字体这样的符号。

是否可以手动用其他字体的希腊字母替换数学字体的几个符号,例如希腊字母?

到目前为止,这是我的 MWE:

\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}

无衬线文档

答案1

\DeclareSymbolFont这使用 Iwona 表示希腊语,如果您想要不同的字体,请更改字体系列。

\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}

在此处输入图片描述

个人想法无衬线数学只有在演示中才可以对齐。

相关内容