问题
小写字母通常用于排版首字母缩略词(见例如,#9534)我个人认为这是很好的排版风格,使缩写词不那么突兀。
然而,使用小型大写字母也存在一个问题。表示首字母缩略词复数形式的小写字母“s”现在与可能成为首字母缩略词一部分的小型大写字母“s”难以区分。
以下是在 Minion Pro 中排版的示例:
(请注意,在其他字体(例如 CMR)中,这不是什么大问题)。
问题
我的问题由两部分组成:
您建议如何解决这个问题?(注意:我承认这是一个设计问题,而与 TeX 直接相关,但它非常适合该页面的范围。
我如何使用该
glossaries
包自动实现这一点?
平均能量损失
\documentclass{article}
\usepackage{textcase}
\usepackage{fontspec}
\setmainfont{Minion Pro}
\usepackage[%
xindy,
acronym,
smallcaps,
shortcuts,
nomain,
]{glossaries}
% Automatically use smallcaps in lower case for acronyms!
\renewcommand*{\firstacronymfont}[1]{\MakeTextLowercase{\textsc{#1}}}
\renewcommand*{\acronymfont}[1]{\MakeTextLowercase{\textsc{#1}}}
\newacronym{ode}{ODE}{ordinary differential equation}
\makeglossaries
\begin{document}
\printglossaries
Acronyms, such as \ac{ode}, blend in well with the text when typeset in small
caps. Doesn't this \ac{ode} look good? Surely it is less obtrusive than ODE.
However, we now have the problem with the plural: \acp{ode}. Is the ``s'' part of
the acronym or not? My professor doesn't see the difference between a lower
case ``s'' and a small caps ``\textsc{s}''. Maybe this becomes more clear when
adding a thin space, as in: \ac{ode}\,s. Or is there a better solution?
\end{document}
您的解决方案 →
答案1
我无法回答你问题的第一部分,因为我认为这更适合设计网站,但我可以回答第二部分,如何在 中自动实现你选择的设计glossaries
。首字母缩略词使用的复数后缀由 给出\acrpluralsuffix
。小型首字母缩略词样式(例如long-sc-short
)将其重新定义为:
\renewcommand*{\acrpluralsuffix}{\glstextup{\glspluralsuffix}}
其中\glstextup
定义为:
\newrobustcmd*{\glstextup}[1]{\ifdef\textulc{\textulc{#1}}{\textup{#1}}}
因此,一旦您决定了设计,就可以通过重新定义来实现它\acrpluralsuffix
。例如,添加一个非常薄的空间(如 tohecz 所建议的):
\renewcommand*{\acrpluralsuffix}{\hspace{0.05556em}\glspluralsuffix}
完整示例(我没有 Minion Pro,因此我使用了不同的字体):
\documentclass{article}
\usepackage{textcase}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage[%
xindy,
acronym,
smallcaps,
shortcuts,
nomain,
]{glossaries}
\renewcommand*{\firstacronymfont}[1]{\MakeTextLowercase{\textsc{#1}}}
\renewcommand*{\acronymfont}[1]{\MakeTextLowercase{\textsc{#1}}}
\renewcommand*{\acrpluralsuffix}{\hspace{0.05556em}\glstextup{\glspluralsuffix}}
\makeglossaries
\newacronym{ode}{ODE}{ordinary differential equation}
\begin{document}
\printglossaries
Acronyms, such as \ac{ode}, blend in well with the text when typeset
in small
caps. Doesn't this \ac{ode} look good? Surely it is less obtrusive
than ODE.
However, we now have the problem with the plural: \acp{ode}. Is the
``s'' part of
the acronym or not? My professor doesn't see the difference between
a lower
case ``s'' and a small caps ``\textsc{s}''. Maybe this becomes more
clear when
adding a thin space, as in: \ac{ode}\,s. Or is there a better
solution?
\end{document}
使用扩展包glossaries-extra
,你只需要重新定义\glsxtrabbrvpluralsuffix
:
\renewcommand*{\glsxtrabbrvpluralsuffix}{\hspace{0.05556em}\glspluralsuffix}
预定义样式\glsxtrabbrvpluralsuffix
在其自定义复数后缀命令的定义中使用。例如,long-short-sc
缩写样式使用\glsxtrscsuffix
定义为:
\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}}
或者,您也可以修改此命令,因为问题在于使用小型大写字母。
\documentclass{article}
\usepackage{textcase}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage[%
xindy,
acronym,
smallcaps,
shortcuts,
nomain,
]{glossaries-extra}
\renewcommand*{\glsxtrscfont}[1]{\MakeTextLowercase{\textsc{#1}}}
\renewcommand*{\glsxtrscsuffix}{\hspace{0.05556em}\glstextup{\glsxtrabbrvpluralsuffix}}
\providecommand{\glsabbvfont}{\glsabbrvfont}% patch for pre 1.15
\makeglossaries
\setabbreviationstyle[acronym]{long-short-sc}
\newacronym{ode}{ODE}{ordinary differential equation}
\begin{document}
\printglossaries
Acronyms, such as \ac{ode}, blend in well with the text when typeset
in small
caps. Doesn't this \ac{ode} look good? Surely it is less obtrusive
than ODE.
However, we now have the problem with the plural: \acp{ode}. Is the
``s'' part of
the acronym or not? My professor doesn't see the difference between
a lower
case ``s'' and a small caps ``\textsc{s}''. Maybe this becomes more
clear when
adding a thin space, as in: \ac{ode}\,s. Or is there a better
solution?
\end{document}