词汇表 - 如何更改子条目名称的左缩进?

词汇表 - 如何更改子条目名称的左缩进?

我正在尝试构建一个具有相对较长、多段描述的分层词汇表。我希望描述从父条目和子条目名称后面的行开始(altlist 样式)。

我想象它是这样的:

索引样式经过调整,看起来像 altlist 样式

为了实现带缩进的多段描述,我尝试使用indexhypergroup 样式以及所需的调整对于我在Dickimaw Books - 画廊 > 词汇表树 > 索引

但是,这些调整对子条目名称的缩进不起作用。(它们看起来离左边距太远了。)我猜子条目名称的缩进需要额外的命令,还是我使用了错误的样式?

有人知道怎么做吗?如果能得到任何帮助我将非常感激。

平均能量损失

\documentclass[ngerman,]{scrbook}
\usepackage[inner=2.5cm,outer=2.5cm,tmargin=3cm,bmargin=4cm]{geometry}
\usepackage{hyperref} 
\hypersetup{colorlinks,citecolor=cyan,linkcolor=black}
\usepackage[toc,acronym,xindy,nopostdot,style=indexhypergroup,title=Begriffserklärungen]{glossaries}

\longnewglossaryentry{Nervoussystem}{
name={Nervous system},
text={nervous system},
description={no description needed for parent entry}
}

\longnewglossaryentry{central}{
parent={Nervoussystem},
name={central (CNS)},
text={central nervous system (CNS)},
description={Multi-paragraph explanation of central nervous system, with small indentation between paragraphs. Multi-paragraph explanation of central nervous system.

Multi-paragraph explanation of central nervous system, with small indentation between paragraphs. Multi-paragraph explanation of central nervous system.}
}

\longnewglossaryentry{peripheral}{
parent={Nervoussystem},
name={peripheral (PNS)},
text={peripheral nervous system (PNS)},
description={Multi-paragraph explanation of peripheral nervous system, with small indentation between paragraphs. Multi-paragraph explanation of peripheral nervous system.

Multi-paragraph explanation of peripheral nervous system, with small indentation between paragraphs. Multi-paragraph explanation of peripheral nervous system.}
}

% to increase space btw glossary entry using index style: 
\renewcommand*{\glspostdescription}{\medskip}

% adjustments from Dickimaw Books:
\renewcommand{\glstreeitem}{%
    \parindent0pt\par\hangindent30pt
    \everypar{\parindent50pt\hangindent30pt}}
\renewcommand{\glstreepredesc}{\par
    \glstreeitem\parindent\hangindent}
\makeglossaries
\begin{document}
I'd like to define both \gls{Nervoussystem} parts, the \gls{central} and the \gls{peripheral} in the main glossary. 

\printglossary

\end{document}

答案1

实际上,这个问题在词汇表用户手册请参阅 13.1.7 树状样式 (p.218)。

因此,为了更改第一和第二个子条目(分别是 subitem 和 subsubitem)的缩进,需要在序言中使用以下命令:

\renewcommand{\glstreesubitem}{% for 1st child entry
    \parindent25pt% left margin to child name
    \par% newline
    \hangindent45pt% left margin to paragraph margin
    \everypar{\parindent55pt\hangindent45pt}}

\renewcommand{\glstreesubsubitem}{% for 2nd child entry
    \parindent50pt\par\hangindent70pt
    \everypar{\parindent60pt\hangindent70pt}} 

相关内容