我正在使用 acro 包来定义和引用文档中的首字母缩略词。这一直运行良好,列表可以打印。但是,列表中的所有内容都是双倍行距,我希望名称很长的首字母缩略词只使用单倍行距。我正在使用的代码示例是
\documentclass[12pt]{report}
\usepackage[letterpaper,verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in]{geometry}
\usepackage{setspace}
\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{-18pt}{\baselineskip}
\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}
\usepackage{acro}
\acsetup{list-style=tabular, only-used=false, sort=false}
\DeclareInstance{acro-title}{empty}{sectioning}{name-format =}
\DeclareAcronym{VLA}{
short = VLA,
long = This acronym is so long that the long from requires two lines to display it
}
\DeclareAcronym{EVIL}{
short = EVIL,
long = Every Villain is Lemons
}
\begin{document}
\doublespacing
\chapter*{NOMENCLATURE}
\pagestyle{plain}
\printacronyms[heading = empty]
\pagebreak{}
\end{document}
输出如下
我希望 VLA 首字母缩略词为单倍行距,但 VLA 和 EVIL 首字母缩略词之间有双倍行距。
最好的!
答案1
添加
\DeclareAcroListStyle{tabular}{table}{
table = tabular ,
before = \singlespacing\renewcommand\arraystretch{1.655}
}
你的 MWE 给予
\singlespacing
\baselineskip
还添加了一个您可能想要删除的额外垂直跳跃:
\DeclareAcroListStyle{tabular}{table}{
table = tabular ,
before = \singlespacing\vspace*{-\baselineskip}\renewcommand\arraystretch{1.655}
}
1.655
setspace
是字体大小为 12pt 时双倍行距使用的拉伸值。
答案2
一个粗略的解决方案是删除该\doublespacing
命令并在每个长定义中添加一个\newline
,如下所示:
\documentclass[12pt]{report}
\usepackage[letterpaper,verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in]{geometry}
\usepackage{setspace}
\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{-18pt}{\baselineskip}
\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}
\usepackage{acro}
\acsetup{list-style=tabular, only-used=false, sort=false}
\DeclareInstance{acro-title}{empty}{sectioning}{name-format =}
\DeclareAcronym{VLA}{
short = VLA,
long = This acronym is so long that the long from requires two lines to display it\newline
}
\DeclareAcronym{EVIL}{
short = EVIL,
long = Every Villain is Lemons\newline
}
\begin{document}
\chapter*{NOMENCLATURE}
\pagestyle{plain}
\printacronyms[heading = empty]
\pagebreak{}
\end{document}
输出: