左对齐,而不是居中的符号列表

左对齐,而不是居中的符号列表

默认情况下,我的符号列表居中:

在此处输入图片描述

我如何才能使它像上面的图表列表一样左对齐?以下是我在序言中使用的方法:

\usepackage[symbols,nogroupskip,sort=use]{glossaries-extra}

\makenoidxglossaries
\glsxtrnewsymbol[description={Cumulative distribution function attached to the point process}]{F(x)}{\ensuremath{F(x)}}  
\glsxtrnewsymbol[description={Same as $F(x/s)$}]{F_s(x)}{\ensuremath{F_s(x)}}  
\glsxtrnewsymbol[description={Density attached to $F$}]{f(x)}{\ensuremath{f(x)}}
\glsxtrnewsymbol[description={Density attached to $f_s$}]{f_s(x)}{\ensuremath{f_s(x)}}

在主文档中:

\listoffigures
\hypersetup{linkcolor=red}
\printnoidxglossary[type=symbols,style=long,title={List of Symbols}]  % list of symbols

答案1

由于long样式基于longtable,因此您会自动得到一个水平居中的列表。要将其左对齐,您可以根据样式的原始定义定义自己的自定义样式long

\newglossarystyle{mylong}{%
  \renewenvironment{theglossary}%
     {\begin{longtable}[l]{@{}lp{\glsdescwidth}}}%     %<-------------- added [l] and @{} here
     {\end{longtable}}%
  \renewcommand*{\glossaryheader}{}%
  \renewcommand*{\glsgroupheading}[1]{}%
  \renewcommand{\glossentry}[2]{%
    \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
    \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
  }%
  \renewcommand{\subglossentry}[3]{%
     &
     \glssubentryitem{##2}%
     \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription\space
     ##3\tabularnewline
  }%
  \ifglsnogroupskip
    \renewcommand*{\glsgroupskip}{}%
  \else
    \renewcommand*{\glsgroupskip}{ & \tabularnewline}%
  \fi
}

相关内容