頭字語と用語集の説明の間のスペースを調整する

頭字語と用語集の説明の間のスペースを調整する

私は用語集パッケージを使用していますが、頭字語の説明をその上の命名法セクションと揃えたいと思っています。用語集の列スタイルを使用してみましたが、どれも最初の列 (頭字語を含む) を調整できません。位置ずれについては画像を参照してください。これを回避する方法はありますか?

ずれ

答え1

これは解決策です。

発行時には固定幅を使用します\printnomenclature(例2cm):

\printnomenclature[2cm] % <-- change the value here

mylong同じ幅(2cm)を使用する新しい用語集スタイルを定義します。

\newglossarystyle{mylong}{%
  \setglossarystyle{long}%
  \renewenvironment{theglossary}%
     {\begin{longtable}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}% <-- change the value here
     {\end{longtable}}%
 }

用語集を印刷するときは、上記のスタイルを使用します。

\printglossary[style=mylong,type=\acronymtype]

MWE:

\documentclass{article}

\usepackage{nomencl}
\usepackage[nonumberlist,acronym]{glossaries}

\newglossarystyle{mylong}{%
  \setglossarystyle{long}%
  \renewenvironment{theglossary}%
     {\begin{longtable}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}% <-- change the value here
     {\end{longtable}}%
 }

\makenomenclature

\makeglossaries

\newacronym{BWB}{BWB}{Blended Wing Body}
\newacronym{DOE}{DOE}{Design of Experiments}
\newacronym{FEA}{FEA}{Finite Element Analysis}

\begin{document}
$t_{wb}$ and $w_{fg}$
\newpage

\nomenclature{$t_{wb}$}{Thickness of Stiffener Web (in)}
\nomenclature{$w_{fg}$}{Width of Stiffener Flange (in)}

\printnomenclature[2cm] % <-- change the value here

\glsaddall

\printglossary[style=mylong,type=\acronymtype]

\end{document} 

出力:

ここに画像の説明を入力してください

答え2

最小限の実用的な例があると便利ですが、alttree用語集スタイルを使用して、名前が占める幅を次のように設定することもできます\glssetwidest

\documentclass{article}

\usepackage[acronym,nopostdot,nonumberlist]{glossaries}

\makeglossaries

\newglossaryentry{twb}{%
  name={\ensuremath{t_{wb}}},
  description={Thickness of Stiffener Web (in)}
}

\newglossaryentry{wfg}{%
  name={\ensuremath{w_{fg}}},
  description={Width of Stiffener Flange (in)}
}

\newacronym{bwb}{BWB}{Blended Wing Body}
\newacronym{doe}{DOE}{Design of Experiments}
\newacronym{fea}{FEA}{Finite Element Analysis}

\setglossarystyle{alttree}
\glssetwidest{BWB}
\renewcommand{\glsnamefont}[1]{\textmd{#1}}

\begin{document}
\glsaddall

\printglossaries
\end{document}

これにより、次のものが生成されます。

結果として得られる用語集の画像

関連情報