破解默认数学字母表(-s?),适用于普通和粗体 \mathversion

破解默认数学字母表(-s?),适用于普通和粗体 \mathversion

我正在尝试用另一种字体替换希腊数学字母,同时保持数学字体的其余部分不变。到目前为止,我的解决方案对普通数学版本很有效,但对粗体无效。我知道该字体有两种斜体粗细。我如何让此更改\mathversion{bold}也适用于?

PDF 输出

\documentclass{article}
\usepackage[LGR,T1]{fontenc}

\DeclareSymbolFont{custom}{LGR}{bodoni}{m}{it}

\newcommand*{\msym}[2]{\DeclareMathSymbol{#1}{\mathord}{custom}{#2}}

\msym{\alpha}{"61}
\msym{\beta}{"62}
\msym{\gamma}{"67}
\msym{\delta}{"64}
\msym{\epsilon}{"65}
\msym{\zeta}{"7A}
\msym{\eta}{"68}
\msym{\theta}{"6A}
\msym{\iota}{"69}
\msym{\kappa}{"6B}
\msym{\lambda}{"6C}
\msym{\mu}{"6D}
\msym{\nu}{"6E}
\msym{\xi}{"78}
\msym{\omicron}{"6F}
\msym{\pi}{"70}
\msym{\rho}{"72}
\msym{\sigma}{"73}
\msym{\tau}{"74}
\msym{\upsilon}{"75}
\msym{\phi}{"66}
\msym{\chi}{"71}
\msym{\psi}{"79}
\msym{\omega}{"77}
\msym{\varsigma}{"63}

\newcommand*{\mylgralphabet}{\alpha\beta\gamma\delta
\epsilon\zeta\eta\theta\iota\kappa\lambda\mu\nu\xi(o)
\pi\rho\sigma\tau\upsilon\phi\chi\psi\omega\varsigma}

\begin{document}

{\mathversion{normal}$\mylgralphabet - (normal)$}

{\mathversion{bold}$\mylgralphabet - (bold)$}

\end{document}

答案1

在此处输入图片描述

\documentclass{article}
\usepackage[LGR,T1]{fontenc}

\DeclareSymbolFont{custom}{LGR}{bodoni}{m}{it}
\SetSymbolFont{custom}{bold}{LGR}{bodoni}{b}{it}

\newcommand*{\msym}[2]{\DeclareMathSymbol{#1}{\mathalpha}{custom}{#2}}

\msym{\alpha}{"61}
\msym{\beta}{"62}
\msym{\gamma}{"67}
\msym{\delta}{"64}
\msym{\epsilon}{"65}
\msym{\zeta}{"7A}
\msym{\eta}{"68}
\msym{\theta}{"6A}
\msym{\iota}{"69}
\msym{\kappa}{"6B}
\msym{\lambda}{"6C}
\msym{\mu}{"6D}
\msym{\nu}{"6E}
\msym{\xi}{"78}
\msym{\omicron}{"6F}
\msym{\pi}{"70}
\msym{\rho}{"72}
\msym{\sigma}{"73}
\msym{\tau}{"74}
\msym{\upsilon}{"75}
\msym{\phi}{"66}
\msym{\chi}{"71}
\msym{\psi}{"79}
\msym{\omega}{"77}
\msym{\varsigma}{"63}

\newcommand*{\mylgralphabet}{\alpha\beta\gamma\delta
\epsilon\zeta\eta\theta\iota\kappa\lambda\mu\nu\xi(o)
\pi\rho\sigma\tau\upsilon\phi\chi\psi\omega\varsigma}

\begin{document}

{\mathversion{normal}$\mylgralphabet - (normal)$}

{\mathversion{bold}$\mylgralphabet - (bold)$}

\end{document}

相关内容