Skip to content

Commit

Permalink
定义\SymbolGroupStyle命令,用于修改符号说明分组格式
Browse files Browse the repository at this point in the history
  • Loading branch information
YanMing-lxb committed May 5, 2024
1 parent 5d62859 commit b78279b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 25 deletions.
Binary file modified Build/main.pdf
Binary file not shown.
58 changes: 34 additions & 24 deletions GUET-Thesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
% -----------------------------------------------------------------------
% Author : 焱铭
% Date : 2024-04-17 20:49:49 +0800
% LastEditTime : 2024-05-05 19:01:42 +0800
% LastEditTime : 2024-05-05 19:29:56 +0800
% Github : https://github.com/YanMing-lxb/
% FilePath : /GUET_Thesis_LaTeX/GUET-Thesis.cls
% Description :
Expand Down Expand Up @@ -1079,33 +1079,39 @@ keys
\setlength{\nomitemorigsep}{\nomitemsep}
\setlength{\nomitemsep}{-1\parsep} % Baseline skip between items

% 创建符号说明分组,这里的修改可以考虑采用,或许会更符合实际情况
% \renewcommand{\nomgroup}[1]{
% \ifthenelse
% {\equal{#1}{A}}
% {\vspace{9pt} \item[\textbf{希腊字符}]}
% {
% \ifthenelse
% {\equal{#1}{B}}
% {\vspace{9pt} \item[\textbf{下标}]}
% {
% \ifthenelse
% {\equal{#1}{C}}
% {\vspace{9pt} \item[\textbf{缩略语}]}
% {}
% }
% }
% \itemsep\nomitemsep % 应用上面设置的术语垂直行间距
% }

% 创建符号说明分组,
\newcommand{\SymbolGroupStyleIn}{位置分类} % 定义\SymbolGroupStyle命令,用于修改符号说明分组格式
\newcommand{\SymbolGroupStyle}[1]{\renewcommand{\SymbolGroupStyleIn}{#1}}
\renewcommand{\nomgroup}[1]{
\ifthenelse
{\equal{#1}{A}}
{\vspace{9pt} \item[\textbf{各章共用}]}
\ifthenelse{\equal{\SymbolGroupStyleIn}{位置分类}}
{
\ifthenelse
{\equal{#1}{A}}
{\vspace{9pt} \item[\textbf{希腊字符}]}
{
\ifthenelse
{\equal{#1}{B}}
{\vspace{9pt} \item[\textbf{第三章}]}
{\vspace{9pt} \item[\textbf{下标}]}
{
\ifthenelse
{\equal{#1}{C}}
{\vspace{9pt} \item[\textbf{缩略语}]}
{}
}
}
}
{
\ifthenelse{\equal{\SymbolGroupStyleIn}{章节分类}}
{
\ifthenelse
{\equal{#1}{A}}
{\vspace{9pt} \item[\textbf{各章共用}]}
{
\ifthenelse
{\equal{#1}{B}}
{\vspace{9pt} \item[\textbf{第三章}]}
{
\ifthenelse
{\equal{#1}{C}}
{\vspace{9pt} \item[\textbf{第四章}]}
Expand All @@ -1115,12 +1121,16 @@ keys
{\vspace{9pt} \item[\textbf{第五章}]}
{}
}
}
}
}
{\typeout{无效的输入,请使用使用 位置分类 或 章节分类 作为参数}% 如果既不是A也不是B,则输出错误信息在log文件中
}
}

\itemsep\nomitemsep % 应用上面设置的术语垂直行间距
}


\makenomenclature % 应用符号表


Expand Down
3 changes: 2 additions & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
% -----------------------------------------------------------------------
% Author : 焱铭
% Date : 2023-07-18 08:50:38 +0800
% LastEditTime : 2024-05-05 19:02:30 +0800
% LastEditTime : 2024-05-05 19:30:40 +0800
% Github : https://github.com/YanMing-lxb/
% FilePath : /GUET_Thesis_LaTeX/main.tex
% Description : Version 2.10.2 更新请关注 https://github.com/YanMing-lxb/GUET_Thesis_LaTeX
Expand Down Expand Up @@ -73,6 +73,7 @@
\Secrets{} % 密级,不涉密请空着
\Date{\today} % 可更换为具体日期如:\date{2023年5月28日}
% \subCrefNameSet % 子图、表、算法等引用名称格式设置为 子图 2-1(a) 的样式
\SymbolGroupStyle{位置分类} % 符号分组样式,可选参数为“位置分类”或“章节分类”
\theAlgoSet{algorithmicx} % 设置算法环境,默认为algorithmicx,可选参数为algorithm2e或algorithmicx
% ------------------------------------------------------------------------------------------
% 正文
Expand Down

0 comments on commit b78279b

Please sign in to comment.