使用 \nomencl 命名,单位位于最右侧,参考

使用 \nomencl 命名,单位位于最右侧,参考

我一直在努力使用 \nomencl 包来制定命名法,该包在最右边有单位,但也有对方程式或页面的引用。

以下是自动插入方程式引用的 MWE:

\documentclass[a4paper, 12pt, oneside, openany, final, pdftex]{book}

% Options for Acronyms and Nomenclature
% adapted from here:https://tex.stackexchange.com/questions/166556/how-to-make-a-clean-and-grouped-nomenclature-list
\usepackage{hyperref}

\usepackage{siunitx}
\sisetup{%
  inter-unit-product=\ensuremath{{}\cdot{}},
  per-mode=symbol
  }

\usepackage[norefeq]{nomencl}
\usepackage{ifthen}
\renewcommand\nomgroup[1]{%
  \ifthenelse{\equal{#1}{A}}{%
    \item[\textbf{Acronyms and Abbreviations}]}{%   A - Acronyms
  \ifthenelse{\equal{#1}{R}}{%
    \item[\textbf{Roman Symbols}]}{%                R - Roman
  \ifthenelse{\equal{#1}{C}}{%
    \item[\textbf{Calligraphy symbols}]}{%          C - Calligraphy
  \ifthenelse{\equal{#1}{G}}{%
    \item[\textbf{Greek symbols}]}{%                G - Greek
  \ifthenelse{\equal{#1}{S}}{%
    \item[\textbf{Superscripts}]}{%                 S - Superscripts
  \ifthenelse{\equal{#1}{U}}{%
    \item[\textbf{Subscripts}]}{%                   U - Subscripts
  \ifthenelse{\equal{#1}{X}}{%
    \item[\textbf{Other Symbols}]}{%                X - Other Symbols
  {}}}}}}}}}
\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}

% Something I have stumbled upon that uses "Section" numbers but I don't know how to implement
%\newcommand{\mynomencl}[3][section]{%
%  \begingroup\edef\x{\endgroup
%  \unexpanded{\nomenclature{#2}}%
%    {\unexpanded{#3} (\csname the#1\endcsname)}}\x}

\newcommand{\nomunit}[1]{%
  \renewcommand{\nomentryend}{\hspace*{\fill}#1}%
  }

% To change from ", see equation 1" to only ", see (1)"
\renewcommand{\eqdeclaration}[1]{, see (#1)}
  
% for left aligning the units, comment few upper lines if used
%\newcommand{\nomunit}[1]{%
%  \renewcommand{\nomentryend}{\hspace*{\fill}\makebox[1cm][l]{#1}}%
%  }

% To change the title (from "Nomenclature" to "Acronyms and Nomenclature")
\renewcommand{\nomname}{Acronyms and Nomenclature}


% As suggested by Barbara
\usepackage{parskip}
\usepackage{setspace}

\topskip=40pt
\parskip=10pt
\parindent=0pt
\baselineskip=15pt

\makenomenclature


\begin{document}

\section*{Main equations}
We often use some very neat abbreviations (VNAs) in our text.%
\nomenclature[a]{VNA(s)}{Very Neat Abbreviation(s)}

But then again we want to make a nomenclature in our document as well.

Consider the following equation.
\begin{equation}
\sigma =\frac{N}{A}.
\end{equation}%
\nomenclature[g]{$\sigma$}{normal stress\nomunit{\si{\pascal}}}
\nomenclature[r]{$N$}{axial force\nomunit{\si{\newton}}}
\nomenclature[r]{$A$}{\parbox[t]{.75\textwidth}{area (to explain this simple concept one needs to understand the complicated mathematics behind the integrals... this would take so much space and text to do...)}\nomunit{\si{\meter\squared}}}

Consider also this next equation
\begin{equation}
F_{R}=m a
\end{equation}%
\nomenclature[r]{$F$}{force\nomunit{\si{\newton}}}
\nomenclature[r]{$a$}{acceleration\nomunit{\si{\meter\per\second\squared}}}
\nomenclature[u]{\textsubscript{$R$}}{resultant}%\refeq}

\printnomenclature[1.8cm] % this makes wider column for acronyms/abbreviations to fit better


\end{document}

下图显示了我所得到的以及我所教的可能是一种很好做法的想法。

第一页,仅供参考查看方程式。


在此处输入图片描述

如果我尝试使用\usepackage[eqref]{nomencl},显然所有条目都会得到引用。但这不是我想要的(例如,我不希望所有条目都有引用,尤其是缩写)。请参见图片中的粉红色文本。(此外,对于以这种方式插入的长文本,插入的引用位置看起来不太好。它会插入到顶部\parbox

如果我可以创建一个自定义命令,以便它只能用于应该引用的项目,那就太好了。

我还建议了几个不错的选择:

  1. 对我来说,按照想象中的方式实现它才是最有意义的:在描述末尾加上“,参见(1)”。请参见图片中的红色文字。
  2. 另一个可能看起来不错的建议是在描述的开头。请参见绿色文本。
  3. 或者在单位旁边。之前(或者之后?)。请参见图片中的蓝色文本。

欢迎提出任何解决问题的建议,或有关如何更好地实现这一目标的建议(即符号、描述、使用、参考)。

祝好,布鲁诺

相关内容