我的尝试:为拉丁语创建(通常缺失的)自定义字距对“QV”。
我的期望是:自定义字距调整对能够适用于所有语言。
polyglossia
我得到的结果是:启用拉丁语言时,字距根本不改变。
任何想法如何解决这一问题?
梅威瑟:
\documentclass{article}
% Set language to Latin.
\usepackage{polyglossia}
%\setdefaultlanguage{french} % Works for German, English, French etc.
\setdefaultlanguage{latin} % DOES NOT work for Latin.
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclassq
\XeTeXcharclass `\Q \mycharclassq
\newXeTeXintercharclass \mycharclassv
\XeTeXcharclass `\V \mycharclassv
\XeTeXinterchartoks\mycharclassq\mycharclassv={\kern-4pt } % Exaggerated for this example.
\begin{document}
\huge\centering
QVINQVAGINTA
\end{document}
答案1
latin
除非调用模块,否则polyglossia
设置\XeTeXinterchartokenstate
为 0 variant=ecclesiastic
,因为 interchar 功能用于更改标点符号间距。
您可以在输入拉丁语时将状态设置为 1。
\documentclass{article}
% Set language to Latin.
\usepackage{polyglossia}
\setdefaultlanguage{latin}
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclassq
\XeTeXcharclass `\Q \mycharclassq
\newXeTeXintercharclass \mycharclassv
\XeTeXcharclass `\V \mycharclassv
\XeTeXinterchartoks\mycharclassq\mycharclassv={\kern-4pt } % Exaggerated for this example.
\makeatletter
\gappto\blockextras@latin{\XeTeXinterchartokenstate = 1 }
\gappto\inlineextras@latin{\XeTeXinterchartokenstate = 1 }
\makeatother
\begin{document}
\huge\centering
QVINQVAGINTA
\end{document}