我最近更新了我的 Miktex 包,正如预期的那样,这破坏了我之前使用的 Latex 页面模板。
在下面的 MWE 中,我可以混合拉丁字符和西里尔字符……但后者显示为丑陋的光栅化。
先前显示的矢量化字符会删除“%ERROR:”,但现在它们会抛出错误。
如何修复这个问题而不需要直接输入字符?
\documentclass[pdftex,12pt,russian,english,dutch]{article}
\usepackage[OT2,OT1]{fontenc}
\usepackage{babel}
\usepackage{xpatch}
% ERROR : \xpatchcmd{\cyrillictext}{\selectfont}{\fontfamily{wncyr}\selectfont}{}{}
% ERROR : \let\cyr\cyrillictext
\begin{document}
This is text in the Latin alphabet !\\
Next are the Cyrillic characters for Russian :\\
\begin{tabular}{@{}ll@{}}
\foreignlanguage{russian}{a} & \foreignlanguage{russian}{P}\\
\foreignlanguage{russian}{A} & \foreignlanguage{russian}{r}\\
\foreignlanguage{russian}{b} & \foreignlanguage{russian}{R}\\
\foreignlanguage{russian}{B} & \foreignlanguage{russian}{s}\\
\foreignlanguage{russian}{v} & \foreignlanguage{russian}{S}\\
\foreignlanguage{russian}{V} & \foreignlanguage{russian}{t}\\
\foreignlanguage{russian}{g} & \foreignlanguage{russian}{T}\\
\foreignlanguage{russian}{G} & \foreignlanguage{russian}{u}\\
\foreignlanguage{russian}{d} & \foreignlanguage{russian}{U}\\
\foreignlanguage{russian}{D} & \foreignlanguage{russian}{f}\\
\foreignlanguage{russian}{e} & \foreignlanguage{russian}{F}\\
\foreignlanguage{russian}{E} & \foreignlanguage{russian}{kh}\\
\foreignlanguage{russian}{\"{e}} & \foreignlanguage{russian}{Kh}\\
\foreignlanguage{russian}{\"{E}} & \foreignlanguage{russian}{ts}\\
\foreignlanguage{russian}{zh} & \foreignlanguage{russian}{Ts}\\
\foreignlanguage{russian}{Zh} & \foreignlanguage{russian}{ch}\\
\foreignlanguage{russian}{z} & \foreignlanguage{russian}{Ch}\\
\foreignlanguage{russian}{Z} & \foreignlanguage{russian}{sh}\\
\foreignlanguage{russian}{i} & \foreignlanguage{russian}{Sh}\\
\foreignlanguage{russian}{I} & \foreignlanguage{russian}{shch}\\
\foreignlanguage{russian}{\u{i}} & \foreignlanguage{russian}{Shch}\\
\foreignlanguage{russian}{\u{I}} & \foreignlanguage{russian}{\char"7F}\\
\foreignlanguage{russian}{k} & \foreignlanguage{russian}{\char"5F}\\
\foreignlanguage{russian}{K} & \foreignlanguage{russian}{y}\\
\foreignlanguage{russian}{l} & \foreignlanguage{russian}{Y}\\
\foreignlanguage{russian}{L} & \foreignlanguage{russian}{\char"7E}\\
\foreignlanguage{russian}{m} & \foreignlanguage{russian}{\char"5E}\\
\foreignlanguage{russian}{M} & \foreignlanguage{russian}{\char'13}\\
\foreignlanguage{russian}{n} & \foreignlanguage{russian}{\char'3}\\
\foreignlanguage{russian}{N} & \foreignlanguage{russian}{yu}\\
\foreignlanguage{russian}{o} & \foreignlanguage{russian}{Yu}\\
\foreignlanguage{russian}{O} & \foreignlanguage{russian}{ya}\\
\foreignlanguage{russian}{p} & \foreignlanguage{russian}{Ya}\\
\end{tabular}
\end{document}
答案1
自 2020 年 2 月起,LaTeX 内核内置了字体系列替换机制。
\documentclass[12pt,russian,english,dutch]{article}
\usepackage[OT2,OT1]{fontenc}
\usepackage{babel}
\DeclareFontFamilySubstitution{OT2}{cmr}{wncyr}
\begin{document}
This is text in the Latin alphabet!
Next are the Cyrillic characters for Russian:
\begin{tabular}{@{}ll@{}}
\foreignlanguage{russian}{a} & \foreignlanguage{russian}{P}\\
\foreignlanguage{russian}{A} & \foreignlanguage{russian}{r}\\
\foreignlanguage{russian}{b} & \foreignlanguage{russian}{R}\\
\foreignlanguage{russian}{B} & \foreignlanguage{russian}{s}\\
\foreignlanguage{russian}{v} & \foreignlanguage{russian}{S}\\
\foreignlanguage{russian}{V} & \foreignlanguage{russian}{t}\\
\foreignlanguage{russian}{g} & \foreignlanguage{russian}{T}\\
\foreignlanguage{russian}{G} & \foreignlanguage{russian}{u}\\
\foreignlanguage{russian}{d} & \foreignlanguage{russian}{U}\\
\foreignlanguage{russian}{D} & \foreignlanguage{russian}{f}\\
\foreignlanguage{russian}{e} & \foreignlanguage{russian}{F}\\
\foreignlanguage{russian}{E} & \foreignlanguage{russian}{kh}\\
\foreignlanguage{russian}{\"{e}} & \foreignlanguage{russian}{Kh}\\
\foreignlanguage{russian}{\"{E}} & \foreignlanguage{russian}{ts}\\
\foreignlanguage{russian}{zh} & \foreignlanguage{russian}{Ts}\\
\foreignlanguage{russian}{Zh} & \foreignlanguage{russian}{ch}\\
\foreignlanguage{russian}{z} & \foreignlanguage{russian}{Ch}\\
\foreignlanguage{russian}{Z} & \foreignlanguage{russian}{sh}\\
\foreignlanguage{russian}{i} & \foreignlanguage{russian}{Sh}\\
\foreignlanguage{russian}{I} & \foreignlanguage{russian}{shch}\\
\foreignlanguage{russian}{\u{i}} & \foreignlanguage{russian}{Shch}\\
\foreignlanguage{russian}{\u{I}} & \foreignlanguage{russian}{\char"7F}\\
\foreignlanguage{russian}{k} & \foreignlanguage{russian}{\char"5F}\\
\foreignlanguage{russian}{K} & \foreignlanguage{russian}{y}\\
\foreignlanguage{russian}{l} & \foreignlanguage{russian}{Y}\\
\foreignlanguage{russian}{L} & \foreignlanguage{russian}{\char"7E}\\
\foreignlanguage{russian}{m} & \foreignlanguage{russian}{\char"5E}\\
\foreignlanguage{russian}{M} & \foreignlanguage{russian}{\char'13}\\
\foreignlanguage{russian}{n} & \foreignlanguage{russian}{\char'3}\\
\foreignlanguage{russian}{N} & \foreignlanguage{russian}{yu}\\
\foreignlanguage{russian}{o} & \foreignlanguage{russian}{Yu}\\
\foreignlanguage{russian}{O} & \foreignlanguage{russian}{ya}\\
\foreignlanguage{russian}{p} & \foreignlanguage{russian}{Ya}\\
\end{tabular}
\end{document}
没有栅格化字符: