我的 MWE 如下所示:
\documentclass{scrartcl}
\usepackage[
nopostdot,
acronym,
nonumberlist,
nomain,
sort=def,
nostyles,
translate=babel,
]{glossaries}
\usepackage{lettrine}
\LettrineTextFont{\itshape}
\setcounter{DefaultLines}{3}
\renewcommand{\LettrineTextFont}{\normalfont}
\renewcommand{\LettrineFontHook}{\normalfont}
%---- glossaries
\newglossaryentry{MM}{%
type=\acronymtype,
name={MM},
first={Mickey Mouse (following MM)},
}
\newcommand\MM{\gls{MM}}
\begin{document}
\lettrine{M}{ickey} Mouse (following MM); \MM\\[5em]
\glsresetall
\lettrine{\MM}{}
\end{document}
我怎样才能将宏放在-command\MM
中\lettrine
,以便它成为名称的第一次出现。或者有没有办法省略 -option first
( Mickey Mouse (following MM)
),以便我可以像下面一样手动编写它?
答案1
作为英鸟说,关键是\glsdisp{label}{custom use}
:
\documentclass{scrartcl}
\usepackage[
nopostdot,
acronym,
nonumberlist,
nomain,
sort=def,
nostyles,
translate=babel,
]{glossaries}
\usepackage{lettrine}
\LettrineTextFont{\itshape}
\setcounter{DefaultLines}{3}
\renewcommand{\LettrineTextFont}{\normalfont}
\renewcommand{\LettrineFontHook}{\normalfont}
%---- glossaries
\newglossaryentry{MM}{%
type=\acronymtype,
name={MM},
description={comic figure},
first={Mickey Mouse (following MM)},
}
\newcommand\MM{\gls{MM}}
\begin{document}
\lettrine{M}{ickey} Mouse (following MM); \MM\\[5em]
\glsresetall
\glsdisp{MM}{\lettrine{M}{ickey} Mouse (following MM)}
\end{document}