我使用acro
带有表格样式的包来打印首字母缩略词。当我这样做时,它会在首字母缩略词列表末尾添加一行,因此\vspace{-\baselineskip}
解决了问题。但是,不应该添加那行额外的行,如果您使用类似环境,则不会发生这种情况description
。
\documentclass{article}
\usepackage{acro}
\acsetup{list-style=tabular} % commented gives the list style
\DeclareAcronym{UHF}{%
short={UHF},
long={Ultra High Frequency},
}
\DeclareAcronym{RF}{%
short={RF},
long={Radio Frequency},
}
\begin{document}
\section{Introduction}
\ac{UHF}\ac{RF}
\printacronyms[heading=section]
%\vspace{-\baselineskip} % fixes spacing with 'list-style=tabular'
\section{Conclusion}
\end{document}
答案1
此问题已在 v2.6e (2016/09/04) 中修复:
\documentclass{article}
\usepackage{acro}[2016/09/04]
\acsetup{list-style=tabular}
\DeclareAcronym{UHF}{
short = {UHF} ,
long = {Ultra High Frequency}
}
\DeclareAcronym{RF}{
short={RF},
long={Radio Frequency}
}
\begin{document}
\section{Introduction}
\ac{UHF}\ac{RF}
\printacronyms[heading=section]
\section{Conclusion}
\end{document}
答案2
使用下面的代码似乎可以按预期工作。
\documentclass{article}
\usepackage{tabu,longtable}
\usepackage{acro}[2016/09/04]
\DeclareAcroListStyle{longtabu}{table}{
table = longtabu ,
table-spec = @{}lX@{},
before={%
\setlength{\LTpre}{0pt}%
\setlength{\LTpost}{0pt}%
}
}
\DeclareAcroListStyle{newtabular}{table}{
table = tabular ,
table-spec = @{}lp{.7\linewidth},
}
\DeclareAcronym{UHF}{
short = {UHF} ,
long = {Ultra High Frequency}
}
\DeclareAcronym{RF}{
short={RF},
long={Radio Frequency}
}
\begin{document}
\section{Introduction}
\ac{UHF} \ac{RF}
\acsetup{list-style=newtabular}
\printacronyms
\section*{Acronyms}
\begin{tabular}{@{}lp{.7\linewidth}}
RF & Radio Frequency \\
UHF & Ultra High Frequency
\end{tabular}
\acsetup{list-style=longtabu}
\printacronyms
\section*{Acronyms}
\setlength{\LTpre}{0pt}
\setlength{\LTpost}{0pt}
\begin{longtabu}{@{}lX@{}}
RF & Radio Frequency \\
UHF & Ultra High Frequency
\end{longtabu}
\end{document}