如何让两个角色活跃起来?

如何让两个角色活跃起来?

在俄语 babel 中,可以编写<<来获取俄语开头的引号字符。但是,某些具有此类字符的字体(例如 anttor 包提供的字体)不会使用该字符,最终会得到丑陋的输出,例如 << this is my quote>>。我尝试激活<并说出类似

%\def << {\guillemotleft}%

但制造了<活跃的混乱,它不是作为的一部分使用<<。我试图搜索<<在 babel 中搜索 的定义,但找不到。那么,有没有一种优雅的方式来制作顺序如果角色处于活动状态,那么可以\def吗?或者,也许有一个更优雅的解决方案可以解决我的问题,但我不知道......

答案1

我怀疑<<在那些字体中将其定义为连字,类似于fi(产生一个字形)或破折号-----

\makeatletter
% store `<` with the original catcode
\let\old@lt<
\let\old@gt>
% make `<` active
\catcode`\<\active
\catcode`\>\active
% test for 2nd `<` and if present, print quotation marks and gobble the 2nd `<`
\def<{\@ifnextchar<{\guillemotleft\@gobble}\old@lt}
\def>{\@ifnextchar>{\guillemotright\@gobble}\old@gt}
\makeatother

这 100% 肯定beamer会破坏表格<>的规范。

相关内容