Latex 词汇表希腊符号:不按字母顺序排列

Latex 词汇表希腊符号:不按字母顺序排列

我正在写一篇论文,我有一个希腊符号列表章节。列表可以成功生成,但我发现希腊符号的顺序不正确。这是我的代码:

\documentclass{article}
\usepackage[utf8]{inputenc}


\usepackage[hidelinks]{hyperref} % hyperlinks
\usepackage[toc, nopostdot, nonumberlist, nogroupskip, acronym, order=letter]{glossaries} 

\newglossary[ch1]{greekstyle}{ch2}{ch3}{List of Greek Symbols}

\setglossarystyle{long} % left align
\makeglossaries


\include{glossary_entries} % define all your symbols in a separated file. 


\title{My title}
\author{Name}
\date{November 2020}

\begin{document}

\maketitle

% print all the symbols without referencing them
\glsaddall
% remove the left vacant space of long style
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\glsdescwidth{1.0\hsize}

\printglossary[title=List of Symbols]


\printglossary[type=greekstyle]

\section{Introduction}
Some words...

\end{document}

我的glossary_entries.tex文件:

\newglossaryentry{latex}
{
    name=latex,
    description={Is a mark up language specially suited 
    for scientific documents}
}

\newglossaryentry{maths}
{
    name=mathematics,
    description={Mathematics is what mathematicians do}
}


% greek -------------------------------------------------------
\newglossaryentry{gls:phi}{name={$\phi_i, \phi_n$},description={basis function, orthogonal basis functions}, type=greekstyle}

\newglossaryentry{gls:tau}{name={$\tau$},description={truncation error}, type=greekstyle}

\newglossaryentry{gls:delta}{name={$\delta_{i, j}$},description={Kronecker delta}, type=greekstyle}

\newglossaryentry{gls:psi}{name={$\psi$},description={intermediate term in barycentric Lagrange interpolation}, type=greekstyle}

\newglossaryentry{gls:Omega}{name={$\Omega$},description={element representation, computational domain}, type=greekstyle}

\newglossaryentry{gls:Omega_e}{name={$\Omega_e$},description={domain of element $e$}, type=greekstyle}

\newglossaryentry{gls:lambda}{name={$\lambda, \lambda_i $},description={eigenvalue}, type=greekstyle}

\newglossaryentry{gls:Lambda}{name={$\Lambda$},description={diagonal matrix of coefficient matrix $\mathbf{A}$}, type=greekstyle}

\newglossaryentry{gls:xi}{name={$\xi$},description={reference space coordinate in $x$ direction}, type=greekstyle}

\newglossaryentry{gls:eta}{name={$\eta$},description={reference space coordinate in $y$ direction}, type=greekstyle}

\newglossaryentry{gls:sigma}{name={$\sigma$},description={error decay rate}, type=greekstyle}

\newglossaryentry{gls:alpha}{name={$\alpha$},description={the offset of linear least squares best fit}, type=greekstyle}

\newglossaryentry{gls:beta}{name={$\beta$},description={the slope of linear least squares best fit}, type=greekstyle}

\newglossaryentry{gls:estimated_error}{name={$\epsilon_{est}$},description={estimated error}, type=greekstyle}

\newglossaryentry{gls:discretization_tol}{name={$\epsilon$},description={discretization tolerance, balance ratio}, type=greekstyle}

\newglossaryentry{gls:Xi}{name={$\Xi$},description={mortar element}, type=greekstyle}

\newglossaryentry{gls:Psi}{name={$\Psi$},description={solution projection on the mortar}, type=greekstyle}

\newglossaryentry{gls:Phi}{name={$\Phi$},description={numerical flux on mortar}, type=greekstyle}

\newglossaryentry{gls:Gamma}{name={$\Gamma $},description={adjacent vertices set, domain boundary}, type=greekstyle}

\newglossaryentry{gls:test_function}{name={$\varphi, \varphi_j$},description={test function}, type=greekstyle}

它会产生什么: 舞会图

但这不是按字母顺序排列的。例如,\Xi应该放在 之前\Omega。大写字母顺序和小写字母顺序都是错误的。我该如何解决这个问题?非常感谢。

答案1

这里有一个简单的解决方法:手动排列希腊字母。

可以sort向 中添加一个参数。我按如下方式\newglossaryentry{}对希腊字母进行编号:glossary_entries.tex

\newglossaryentry{gls:phi}{name={$\phi_i, \phi_n$},description={basis function, orthogonal basis functions}, sort = {b21}, type=greekstyle}

\newglossaryentry{gls:tau}{name={$\tau$},description={truncation error}, sort = {b19}, type=greekstyle}

...

并将命令更改为打印词汇表:

\printnoidxglossary[sort=standard, type=greekstyle] 

然后我就得到了想要的订单。

相关内容