每章命名法

每章命名法

我想在我的论文的每一章末尾添加一个术语,包括该章的参数。

\documentclass{report}
\usepackage[intoc]{nomencl}
\makenomenclature

\begin{document}

\chapter{First Chapter}
\section{Introduction 1}
Only $a$ will be discussed in this chapter. So, i do not need $N$ in the nomenclature. Besides I would like to have the nomenclature as a non numbered section (not a chapter).
\nomenclature{$a$}{The number of angels per unit area}%
\printnomenclature

\chapter{Second chapter}
\section{Introduction 2}
Only $N$ will be discussed in this chapter. So, i do not need $a$ in the nomenclature. Besides I would like to have the nomenclature as a non numbered section (not a chapter).
\nomenclature{$N$}{The number of angels per needle point}%
\printnomenclature

\end{document}

感谢大家的帮助。

答案1

我可以使用另一个命名包“nomentbl”来“手动”完成此操作。您必须配置 tex 编译器。我使用了 Texstudio,因此我添加了一个用户命令:

选项>配置Texstudio>构建>用户命令然后将这些命令放入

makeindex -s nomentbl.ist -o %.nls %.nlo 在此处输入图片描述 通常,您必须执行以下步骤才能进行命名:

编译 > 建立索引 > 重新编译

原理是一样的:当你运行 make index 时,Latex 会生成一个 .nls 文件。下次编译时,命名规则就会出现。

因此,您无需运行第二次编译,只需创建一个文件名nomen_chap0x然后将 .nls 文件中的内容复制到nomen_chap0x然后输入命令:\input{nomen_chap0x}。编译时,命名规则将出现在该部分中。

重要的是您必须删除.nls 文件并注释掉本章中的所有术语,以避免下一章中出现相同的术语。

在第二章中,你必须创建另一个仅用于本章的命名法,并重复上述过程

她对我所说的内容表示感谢:

\documentclass[openany]{book}

\usepackage{booktabs}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{amssymb, amsmath, mathtools}    % math formulations
\usepackage{siunitx}
\usepackage[intoc,noprefix]{nomentbl}
    \makeatletter % to put nomenclature in the section range of the TOC
    \def\thenomenclature{%
        \section*{\nomname}
        \if@intoc\addcontentsline{toc}{section}{\nomname}\fi%
        \nompreamble
        \list{}{%
            \labelwidth\nom@tempdim
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \itemsep\nomitemsep
            \let\makelabel\nomlabel}}
    \makeatother
    \makenomenclature

\begin{document}
    \tableofcontents
\chapter{blabla1}
\section{Example 01}
\lipsum[2]
\begin{equation}
\mathbf{J_i} =  - {D_i}\left( {\nabla} {c_i} + \dfrac{{{z_i}F}}{{RT}}{c_i} {\nabla} \varphi  \right)
\label{eq505}
\end{equation}
where $ \mathbf{J_i} $ is the ion flux, $ D_i $ is the bulk diffusion coefficient of the ionic species, $ F $ is the Faraday constant, $ R $ is the universal gas constant and $ T $ is the temperature

\nomenclature[A]{$ D_{i} $}{Bulk diffusion coefficient of the species}{\si{\square\m / \s}}{}
\nomenclature[A]{$ F $}{Faraday constant}{\si{\coulomb / \mole}}{}
\nomenclature[A]{$ R $}{ Universal gas constant}{\si{\J / \kelvin \mole}}{}
\nomenclature[A]{$ T $}{Temperature}{\si{\kelvin}}{}
\nomenclature[A]{$ z $}{Charge number of the ionic species }{}{}
\nomenclature[A]{$ J $}{ Flux of the ionic species}{\si{\mole / \m^2 \s}}{}
\nomenclature[G]{$ \varphi $}{Total electric potential}{\si{\volt}}{}
\input{nomen_chap1}
\chapter{blabla2}
\section{Example 02}
\lipsum[1]
The Ohm's law:
\begin{equation}
R_{s}= \frac{U}{I}
\end{equation}
where $ R_s $ is the resistance (\si{\ohm}), $ U $ is the voltage (\si{\volt}) and $ I $ is the electric current (\si{\ampere})
\nomenclature[A]{$ R_s $}{Resistance}{\si{\ohm}}{}
\nomenclature[A]{$ U $}{Voltage}{\si{\volt}}{}
\nomenclature[A]{$ I $}{Electric current}{\si{\ampere}}{}
\input{nomen_chap2}
\end{document}

结果如下:

在此处输入图片描述

我还把整个mwe 文件夹信息和通信管理局: 在此处输入链接描述

相关内容