是否可以在\texit
文本中显示首字母缩略词,但通常在列表中格式化?
梅威瑟:
\documentclass[
fontsize=11pt,
paper=a4,
]{scrartcl}
\usepackage[
acronym,
automake,
nopostdot,
toc,
nomain,
shortcuts,
nogroupskip,
]{glossaries}
\makeglossaries
\newacronym[
longplural={\textit{Alternating current}},
shortplural={\textit{AC}},
sort={AC},
]{AC}{\textit{AC}}{\textit{Alternating current}}
\newacronym[
]{BAU}{BAU}{Business as usual}
\begin{document}
\printglossary[
type=\acronymtype,
nonumberlist,
style=super,
]
\bigskip
\noindent Textit: \gls{AC}\\
Normal text: \gls{BAU}.
\end{document}
结果:
但我想要的是,在文本中应该是斜体,但在列表中不是AC
。Alternating current
提前致谢!
答案1
更新答案比前一个简单得多。
\documentclass[
fontsize=11pt,
paper=a4,
]{scrartcl}
\usepackage[
acronym,
automake,
nopostdot,
toc,
nomain,
shortcuts,
nogroupskip,
]{glossaries}
\makeglossaries
\newcommand{\glsi}[1]{\textit{\gls{#1}}} % <<<< added
\newacronym[
longplural={Alternating current},
shortplural={AC},
sort={AC},
]{AC}{AC}{Alternating current}
\newacronym[sort={BAU},
]{BAU}{BAU}{Business as usual}
\begin{document}
\printglossary[
type=\acronymtype,
nonumberlist,
style= super,
]
\bigskip
\noindent Textit: \glsi{AC}\\ % using glsi here <<<<
Normal text: \gls{BAU}.
\bigskip
\noindent \textit{AC and Alternating current} are italic in the text but not in the list.
\end{document}