%3F.png)
私は用語集の altlist スタイルがとても気に入っていましたが、複数行の名前を処理する方法が見つからなかったため、代替案を探して、複数行の名前を許可するものの見た目が醜いインデックス スタイルを思いつきました。基本的に、名前ではなく説明をインデントし、名前と説明の間にスペースを入れたいのです (altlist スタイルのように)。
これはおそらく、「\glstreepredesc」を回避すれば簡単に実現できるはずですが、私にはできませんでした。誰かが助けてくれれば完璧です。(あるいは、代わりに、altlist スタイルで複数行の名前を持つ解決策があるでしょうか?)
MWEはこちら
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
\documentclass[fontsize=10pt]{scrbook}
\usepackage{geometry}
\geometry{
paperheight=213mm,
paperwidth=140mm,
left=16mm,
right=16mm,
top=21mm,
bottom=16mm,
heightrounded,
}
\usepackage[
nopostdot]{glossaries}
\makeglossaries
\newglossaryentry{long-long-long-argument}
{
name={The Name for the Very Long and the Most Important Argument in the Text},
text={The Name for the Very Long and the Most Important Argument in the Text},
description={The Very Long Description of the Very Long and the Most Important Argument in the Text. The Very Long Description of the Very Long and the Most Important Argument in the Text.}
}
\newglossaryentry{short-argument}
{
name={Very Short argument.},
text={Very Short argument.},
description={Description of a very short argument. Description of a very short argument.},
}
\renewcommand{\glstreepredesc}{%
\glstreeitem\parindent\hangindent}
\begin{document}
\gls{long-long-long-argument} \gls{short-argument}
\printglossary[style=index,nonumberlist]
\end{document}
答え1
list
(そしてaltlist
)はdescription
用語集をタイプセットするためにリストを使用するだけなので、 を使用してenumitem
その動作を調整することができます。このパッケージをロードして を使用するとaltlist
、次のようにするだけで名前を分割できます。
\setlist[description]{style=unboxed}
名前のすべての行を左揃えにするには (これが良いアイデアかどうかはわかりませんが)、カスタム配置を定義します。
\SetLabelAlign{horstfuchs}{\parbox[b]{\textwidth}{#1}}
\setlist[description]{style=unboxed, align=horstfuchs, labelsep=0pt}
定義が変わらないように全て description
ドキュメント内のリストを変更する場合は、設定を全体的に変更するのではなく、適切な用語集スタイルを作成する必要があります。
\SetLabelAlign{horstfuchs}{\parbox[b]{\textwidth}{#1}}%
\newglossarystyle{horstfuchs}{%
\setglossarystyle{altlist}%
\renewenvironment{theglossary}%
{\glslistinit\begin{description}[style=unboxed, align=horstfuchs, labelsep=0pt]}%
{\end{description}}%
}