答案1
这可以通过使用主词汇表listdotted
作为词汇表样式或为此定义另一个特殊词汇表来实现。
但请注意,listdotted
忽略了键的值symbol
。
\documentclass{article}
\usepackage{glossaries}
\makeglossaries
\newglossaryentry{energy}{name={$E$}, description={Energy}}
\newglossaryentry{speedoflight}{name={$c$}, description={Speed of light}}
\newglossaryentry{mass}{name={$m$}, description={Mass}}
\begin{document}
\glsaddall
\setglossarystyle{listdotted}
\printglossary[title={Symbols}]
\end{document}
答案2
使用的示例acro
包(借用 Christian 的回答):
\documentclass{article}
\usepackage{acro}
% use KOMA-Script's `labeling' list:
\usepackage{scrextend}
\newenvironment{mylist}
{\labeling[ \dotfill]{alongwordthatdeterminesthewidth}}
{\endlabeling}
% declare a list style for acro using the new list:
\DeclareAcroListStyle{dotted-list}{list}{
list = mylist
}
% tell acro to use the new list style:
\acsetup{
list-style = dotted-list
}
% declare the acronyms:
\DeclareAcronym{energy}{
short = {$E$},
long = {energy}
}
\DeclareAcronym{speedoflight}{
short = {$c$},
long = {speed of light}
}
\DeclareAcronym{mass}{
short = {$m$},
long = {mass}
}
\begin{document}
\acuseall
\printacronyms[name=Notation]
\end{document}
更新 2021/ acro
v3:
对于acro
v3 及更高版本,序言中的以下定义将产生相同的输出:
% use KOMA-Script's `labeling' list:
\usepackage{scrextend}
\newenvironment{mylist}
{\labeling[ \dotfill]{alongwordthatdeterminesthewidth}}
{\endlabeling}
% make acro's default list use the new list:
\SetupAcroTemplate[list]{description}{%
\let\description\mylist
\let\enddescription\endmylist
}