使命名法正確地將數學排序

使命名法正確地將數學排序

我正在按照包文檔的建議對命名法進行排序nomencl,但在和\dot{q}之前進行排序,其中所需的排序是:av

  • a
  • \dot{q}
  • v

預設前綴的存在沒有幫助,因此noprefix被使用。前綴用於分隔羅馬變數[1]和希臘[2]變數。

\documentclass[oneside,paper=a4,fontsize=12pt,english]{scrreprt}
\usepackage[noprefix]{nomencl}
\makenomenclature
\begin{document}
\printnomenclature
\nomenclature[1]{\(a\)}{Semimajor axis}
\nomenclature[1]{\(v\)}{Velocity}
\nomenclature[1]{\(\dot{q}\)}{Heat flux}
\nomenclature[2]{\(\rho\)}{Density}
% makeindex.exe Test.nlo -s nomencl.ist -o Test.nls
Lorem ipsum.
\end{document}

用作[1q]前綴會導致\dot{q}在羅馬變數的末尾進行排序。我怎樣才能nomenclature忽略\dot{}

答案1

只需添加到全部具有用於排序的 ASCII 版本 math 的條目:

% arara: pdflatex
% arara: nomencl
% arara: pdflatex

\documentclass[oneside,paper=a4,fontsize=12pt,english]{scrreprt}
\usepackage[noprefix]{nomencl}
\makenomenclature

\begin{document}

\printnomenclature
\nomenclature[1a]{\(a\)}{Semimajor axis}
\nomenclature[1v]{\(v\)}{Velocity}
\nomenclature[1q]{\(\dot{q}\)}{Heat flux}
\nomenclature[2rho]{\(\rho\)}{Density}

Lorem ipsum.
\end{document}

在此輸入影像描述

有了它,arara您無需記住生成文件的命令.nls。 :)

答案2

為了防止符號被周圍的命令排序,例如\dot{q},請在前綴後附加符號的數學模式,而不需要任何其他命令,如下所示:

\nomenclature[1\(q\)]{\(\dot{q}\)}{Heat flux}

在完整的範例中,我們看到只有單一問題變數需要此附加語法:

輸出

\documentclass[oneside,paper=a4,fontsize=12pt,english]{scrreprt}
\usepackage[noprefix]{nomencl}
\makenomenclature
\begin{document}
    \printnomenclature
    \nomenclature[1]{\(a\)}{Semimajor axis}
    \nomenclature[1]{\(v\)}{Velocity}
    \nomenclature[1\(q\)]{\(\dot{q}\)}{Heat flux}
    \nomenclature[2]{\(\rho\)}{Density}
    % makeindex.exe Test.nlo -s nomencl.ist -o Test.nls
    Lorem ipsum.
\end{document}

相關內容