如何调整变音符号的倾斜角度

如何调整变音符号的倾斜角度

我正在尝试更改重音的倾斜角度。我已使用来fontdimen调整数量。以下代码的第一部分调整 fontdimen5(x 高度)。从示例中可以看出,这是有效的。但是,当我调整 fontdimen1(倾斜)时,没有任何变化。如果有人能解释一下,我将不胜感激。

\documentclass[10pt]{article}

\usepackage{graphicx} 


\begin{document}

\font \romanfont=cmr10
\font\specroman=cmr10
%% Next, the special registers
\newdimen\savedvalue
\savedvalue=\fontdimen5\romanfont
\newdimen\specialvalue
\specialvalue=4.75pt
%% Finally, definitions.

\def\specrm{%
  \aftergroup\restoredimen
  \fontdimen5\specroman=\specialvalue
  \specroman  }
\def\restoredimen{%
\fontdimen5\romanfont=\savedvalue }


 \scalebox{10}{\romanfont \'o}  {\scalebox{10}{\specrm \' o}}

\medskip
{\noindent\obeylines\specrm 
the value of fontdimen1 (slant)  is \the\fontdimen1\font
the value of fontdimen2 (interword space) is \the\fontdimen2\font  
the value of fontdimen3 (interword stretch) is \the\fontdimen3\font 
the value of fontdimen4 (interword shrink) is \the\fontdimen4\font 
the value of fontdimen5 (x-height) is \the\fontdimen5\font 
the value of fontdimen6 (quad width) is \the\fontdimen6\font 
the value of fontdimen7 (extra space)  is \the\fontdimen7\font 
}
\medskip

\font \romanfont=cmr10
\font\specroman=cmr10
%% Next, the special registers
\newdimen\savedvalue
\savedvalue=\fontdimen1\romanfont
\newdimen\specialvalue
\specialvalue=0.15pt
%% Finally, definitions.

\def\specrm{%
  \aftergroup\restoredimen
  \fontdimen1\specroman=\specialvalue
  \specroman  }
\def\restoredimen{%
\fontdimen1\romanfont=\savedvalue }


 \scalebox{10}{\romanfont \'o}  {\scalebox{10}{\specrm \' o}}

\medskip
{\noindent\obeylines\specrm 
the value of fontdimen1 (slant)  is \the\fontdimen1\font
the value of fontdimen2 (interword space) is \the\fontdimen2\font  
the value of fontdimen3 (interword stretch) is \the\fontdimen3\font 
the value of fontdimen4 (interword shrink) is \the\fontdimen4\font 
the value of fontdimen5 (x-height) is \the\fontdimen5\font 
the value of fontdimen6 (quad width) is \the\fontdimen6\font 
the value of fontdimen7 (extra space)  is \the\fontdimen7\font 
}


\end{document}

编辑:大量相关信息已由 zellyn 上传至 github。 https://github.com/zellyn/accentbx

答案1

要了解发生了什么,您必须阅读 TeXbook 第 54 页练习 9.7 之后的“双重危险弯曲”段落。那里说:“重音被认为正确定位在高度等于当前字体 x 高度的字符上;较高或较短的字符会导致重音升高或降低,同时充分考虑到重音符和被重音符的字体的倾斜度。”

让我稍微解释一下:如果您将\fontdimen1其更改为不同于 0 的值,那么仅当您放置重音的字符的高度与当前 x 高度不同时,这才会影响重音的水平位置。在您的示例中,您将重音放在“o”上,它的高度与“x”相同,因此您看不到任何效果。只需用字母“b”和“。”试试看。对于“b”,您会看到重音向右移动,因为“b”高于“x”;对于“。”,重音向左移动,因为“。”不如“x”高。

因此,如果你想将重音符号移到“o”的左侧或右侧,你就得费点功夫了。下面是一个快速而粗略的解决方案:

\leavevmode\rlap{\hspace{0.3ex}\'}o

\leavevmode如果这个“ó”位于段落开头,则需要 。)

相关内容