Skip to content

Commit

Permalink
Make nom and abbr envs act as normal chapter (#34)
Browse files Browse the repository at this point in the history
* Make nom and abbr envs act as normal chapter

* Update test for nomenclature

* Update docs

---------

Co-authored-by: LogCreative <logcreative@outlook.com>
  • Loading branch information
AlexaraWu and LogCreative authored Mar 2, 2023
1 parent c07e1db commit 124e1d8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
45 changes: 23 additions & 22 deletions sjtutex/source/sjtutex.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1265,26 +1265,6 @@
% \end{threeparttable}
% \end{table}
%
% \begin{function}[rEXP,updated=2022-02-24]{nomenclature,nomenclature*}
% \begin{sjtusyntax}[emph={[2]nomenclature,nomenclature*}]
% \begin{nomenclature}(*\oarg{标题}*)
% (*\meta{符号对照表}*)
% \end{nomenclature}
% \end{sjtusyntax}
% 符号对照表环境。带星号的版本不会出现在目录中。可以使用可选参数手动设置标题。
% 符号对照表环境仅设置标题,内部实现可由用户自行决定。
% 可以使用 \pkg{longtable},也可以使用 \pkg{nomencl} 宏包。
% \end{function}
%
% \begin{function}[rEXP,updated=2022-02-24]{abbreviation,abbreviation*}
% \begin{sjtusyntax}[emph={[2]abbreviation,abbreviation*}]
% \begin{abbreviation}(*\oarg{标题}*)
% (*\meta{缩略语对照表}*)
% \end{abbreviation}
% \end{sjtusyntax}
% 缩略语对照表环境。带星号的版本不会出现在目录中。可以使用可选参数手动设置标题。
% 缩略语对照表环境仅设置标题,内部实现可由用户自行决定。
% \end{function}
%
% \subsection{正文部分}
%
Expand Down Expand Up @@ -1351,6 +1331,27 @@
%^^A 标准新模板将附录编号置于章节标题之后。
% \end{function}
%
% \begin{function}[rEXP,updated=2022-03-02]{nomenclature,nomenclature*}
% \begin{sjtusyntax}[emph={[2]nomenclature,nomenclature*}]
% \begin{nomenclature}(*\oarg{标题}*)
% (*\meta{符号对照表}*)
% \end{nomenclature}
% \end{sjtusyntax}
% 符号对照表环境。带星号的版本不会出现在目录中。可以使用可选参数手动设置标题。
% 符号对照表环境仅设置标题,内部实现可由用户自行决定。
% 可以使用 \pkg{longtable},也可以使用 \pkg{nomencl} 宏包。
% \end{function}
%
% \begin{function}[rEXP,updated=2022-03-02]{abbreviation,abbreviation*}
% \begin{sjtusyntax}[emph={[2]abbreviation,abbreviation*}]
% \begin{abbreviation}(*\oarg{标题}*)
% (*\meta{缩略语对照表}*)
% \end{abbreviation}
% \end{sjtusyntax}
% 缩略语对照表环境。带星号的版本不会出现在目录中。可以使用可选参数手动设置标题。
% 缩略语对照表环境仅设置标题,内部实现可由用户自行决定。
% \end{function}
%
% \subsection{后文部分}
%
% \begin{function}[rEXP]{\backmatter}
Expand Down Expand Up @@ -4135,7 +4136,7 @@
%<*thesis>
\NewDocumentEnvironment { abbreviation } { O{ \SJTU@abbrname } }
{
\@@_head_aux:n {#1}
\chapter {#1}
\tl_clear:N \SJTU@style@float@font
} { }
\NewDocumentEnvironment { abbreviation* } { O{ \SJTU@abbrname } }
Expand All @@ -4149,7 +4150,7 @@
% \begin{macrocode}
\NewDocumentEnvironment { nomenclature } { O{ \SJTU@nomname } }
{
\@@_head_aux:n {#1}
\chapter {#1}
\tl_clear:N \SJTU@style@float@font
} { }
\NewDocumentEnvironment { nomenclature* } { O{ \SJTU@nomname } }
Expand Down
4 changes: 3 additions & 1 deletion sjtutex/support/common-nomenclature-en.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\chapter{Symbols and Marks}
\begin{nomenclature}

\begin{longtable}{rl}
$\epsilon$ & dielectric constant \\
Expand Down Expand Up @@ -56,3 +56,5 @@ \chapter{Symbols and Marks}
$\epsilon$ & dielectric constant \\
$\mu$ & magnetic conductivity \\
\end{longtable}

\end{nomenclature}
4 changes: 3 additions & 1 deletion sjtutex/support/common-nomenclature-zh.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\chapter{符号与注记}
\begin{nomenclature}

\begin{longtable}{rl}
$\epsilon$ & 介电常数 \\
Expand Down Expand Up @@ -56,3 +56,5 @@ \chapter{符号与注记}
$\epsilon$ & 介电常数 \\
$\mu$ & 磁导率 \\
\end{longtable}

\end{nomenclature}

0 comments on commit 124e1d8

Please sign in to comment.