
阿霍吉,
我有一個關於特技包裹。我希望我的縮寫和術語保持一致。
假設我有這個程式碼:
\documentclass{article}
\usepackage{acro}
\acsetup{first-style=short}
\DeclareAcronym{ihp}{
short = IHP,
long = Inner Helmholtz Plane,
class = abbrev
}
\DeclareAcronym{ohp}{
short = OHP,
long = Outer Helmholtz Plane,
class = abbrev
}
\begin{document}
The layer of water dipoles and ions with hydrogen envelope, which forms
in this way at the boundary surface, is called the Helmholtz layer and
extend into an inner Helmholtz plane (\ac{ihp}) and an outer Helmholtz
plane (\ac{ohp}).
\printacronyms[include-classes=abbrev,name=Abbreviations]
\end{document}
但縮寫詞的長名稱應該對齊。有辦法對齊它們嗎?
答案1
\printacronyms
您可以將from description
(預設)使用的環境變更為longtable
fromlongtable
包裹。在\ac-setup
選項中list-style
控制這一點,將其放置在longtable
您可以簡單使用的環境中list-style=longtable
(或有許多替代選項)。
甚至\DeclareAcroListStyle
允許開發您自己的樣式以放置清單以進行進一步的自定義,如文件中所述acro
手動的。
With list-style=longtable
(在首字母縮寫中加入額外的 O 以強調對齊)
\documentclass{article}
\usepackage{longtable}
\usepackage{acro}
\acsetup{first-style=short,list-style=longtable}
\DeclareAcronym{ihp}{
short = IHP,
long = Inner Helmholtz Plane,
class = abbrev
}
\DeclareAcronym{ohp}{
short = OOHP,
long = Outer Helmholtz Plane,
class = abbrev
}
\begin{document}
The layer of water dipoles and ions with hydrogen envelope, which forms
in this way at the boundary surface, is called the Helmholtz layer and
extend into an inner Helmholtz plane (\ac{ihp}) and an outer Helmholtz
plane (\ac{ohp}).
\printacronyms[include-classes=abbrev,name=Abbreviations]
\end{document}
答案2
您可以使用以下其他選項來微調間距和位置。
% Abbreviations setup
\usepackage{acro}
\usepackage{longtable}
\setlength\LTleft{18pt} % Adjust the left margin
\setlength\LTpre{-6pt} % Adjust the space above the table
\acsetup{
list/template = longtable,
list/heading = none,
templates/colspec = {l@{\hspace{2cm}}l} % Adjust the space as needed
}
\DeclareAcronym{ihp}{
short = IHP,
long = Inner Helmholtz Plane,
class = abbrev
}
\DeclareAcronym{ohp}{
short = OOHP,
long = Outer Helmholtz Plane,
class = abbrev
}
\begin{document}
The layer of water dipoles and ions with hydrogen envelope, which forms
in this way at the boundary surface, is called the Helmholtz layer and
extend into an inner Helmholtz plane (\ac{ihp}) and an outer Helmholtz
plane (\ac{ohp}).
\chapter*{\centerline{List of Abbreviations and Terms}}\label{ch:terms}
\printacronyms[include-classes=abbrev,name=none]
\end{document}