summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mitthesis/mitthesis.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/mitthesis/mitthesis.cls')
-rw-r--r--macros/latex/contrib/mitthesis/mitthesis.cls1072
1 files changed, 647 insertions, 425 deletions
diff --git a/macros/latex/contrib/mitthesis/mitthesis.cls b/macros/latex/contrib/mitthesis/mitthesis.cls
index 8acd3e6358..b98528e532 100644
--- a/macros/latex/contrib/mitthesis/mitthesis.cls
+++ b/macros/latex/contrib/mitthesis/mitthesis.cls
@@ -7,8 +7,8 @@
%% MIT Libraries' requirements as of 2023.
%%
%% This file's version and date:
- \def\versionno{1.05}
- \def\versiondate{2023/07/21\space}
+ \def\versionno{1.06}
+ \def\versiondate{2023/08/29\space}
%%
%% Author: John H. Lienhard, V
%% Department of Mechanical Engineering
@@ -47,48 +47,26 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mitthesis}[\versiondate MIT Thesis Template (JHL)]
-\LoadClass[12pt]{report}% [twoside] option can be issued in the .tex file; point size must be set here.
+\LoadClass[12pt,openright]{report}% [twoside] option can be issued in the .tex file; point size must be set here.
-\RequirePackage{etoolbox}% provides \ifblank, \patchcmd, \apptocmd, etc.
-\RequirePackage{ifthen} % provides \whiledo, etc.
+\ExplSyntaxOn
+ \str_const:Nn \ClassName {mitthesis}
+\ExplSyntaxOff
-\def\ClassName{mitthesis}
+\RequirePackage{iftex}[2019/11/07]% provides \ifpdftex, etc.
%%%%%%%%%%%%% Some compatibility for older latex distributions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date
-\providecommand\IfPackageAtLeastTF{\@ifpackagelater}% compare version to date
-
-\ifdefined\NewDocumentCommand\else
- \RequirePackage{xparse}% enable pre-10/2020 formats to access essential macros later moved into LaTeX kernel
-\fi
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}% compare version to date; \If... added to latex 2020/10/01
+\providecommand\IfPackageAtLeastTF{\@ifpackagelater}% compare version to date; \If... added to latex 2020/10/01
\IfFormatAtLeastTF{2020/02/25}{%
\typeout{^^JYour LaTeX format is dated \fmtversion. LaTeX distributions from 2022/11/01 or later are strongly recommended for best results^^J}
}{%
- \ClassError{\ClassName}{Your LaTeX format is dated \fmtversion. Formats dated 2022/11/01 or later are recommended for this class. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. You can try to click past the errors for now...}%
+ \ClassError{\ClassName}{Your LaTeX format is dated \fmtversion. Formats dated 2022/11/01 or later are strongly recommended for this class. Older formats may generate errors}{Please UPDATE your LaTeX distribution to obtain best results. TeX Live is available for download at no charge: \string https://www.tug.org/texlive/. You can try to click past the errors for now...}%
}
-\IfFileExists{iftex.sty}{%
- \RequirePackage{iftex}% check whether pdftex or another engine is used
- }{%
- \ClassWarning{\ClassName}{This class requires the missing package iftex.sty---trying a work-around.}
- % Code copied from iftex package written by the LaTeX3 Project (used under LPPL).
- % \csname and \let construct useful for hiding \ifzzz tokens from outer level \if tests.
- \def\IFTEX@let#1#2{%
- \expandafter\let\csname if#1\expandafter\endcsname
- \csname if#2\endcsname}
- % pdftex (including in dvi mode)
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdftexversion\endcsname\relax
- \IFTEX@let{pdftex}{false}
- \else
- \IFTEX@let{pdftex}{true}
- \fi
- \IFTEX@let{PDFTeX}{pdftex}
- }
-
-% check whether pdfmanagement (\DocumentMetadata) has been loaded (to fallback on hyperxmp)
+% check whether pdfmanagement (\DocumentMetadata) has been loaded (if not, fall back to hyperxmp)
\newif\ifmit@pdfmanagement
% As of 2021/07/23 we could instead do:\IfPDFManagementActiveTF{\mit@pdfmanagementtrue}{\mit@pdfmanagementfalse}
\ExplSyntaxOn
@@ -96,20 +74,21 @@
\bool_if:nTF
{
\bool_lazy_and_p:nn
- {\cs_if_exist_p:N \pdfmanagement_if_active_p:}
+ { \cs_if_exist_p:N \pdfmanagement_if_active_p: }
{ \pdfmanagement_if_active_p: }
}
- {
- \mit@pdfmanagementtrue
- }
- {
- \mit@pdfmanagementfalse
- }
- }{\mit@pdfmanagementfalse}
+ { \mit@pdfmanagementtrue }
+ { \mit@pdfmanagementfalse }
+ }{ \mit@pdfmanagementfalse }
\ExplSyntaxOff
-%% Old installations may want textcomp load, but we only require copyright character:
-\ifdefined\textcopyright\else %\def\textcopyright{©}\fi. % 2023/06/26
+% Enable pre-2020/10 formats to access essential macros later moved into LaTeX kernel
+\ifdefined\NewDocumentCommand\else
+ \RequirePackage{xparse}
+\fi
+
+%% Pre-2020/02 installations may need textcomp to be loaded, but we require only the copyright character:
+\ifdefined\textcopyright\else
\ifpdftex
\DeclareTextSymbol{\textcopyright}{TS1}{'251}
\DeclareTextSymbolDefault{\textcopyright}{TS1}
@@ -133,7 +112,7 @@
\SetKeys[\ClassName]{fontset=defaultfonts}%
\DeclareUnknownKeyHandler[\ClassName]{\relax}% suppress warning about unused keys
\ProcessKeyOptions
-}{%
+}{% Compatibility code for distributions pre-2022/11
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=\ClassName,
@@ -141,39 +120,33 @@
setkeys=\kvsetkeys,
}
% set key [fontset] for font selection
- \DeclareStringOption[defaultfonts]{fontset}[]% fixed 2023/06/26
+ \DeclareStringOption[defaultfonts]{fontset}[]
+ %
+ % set key [lineno] to load package lineno
+ \DeclareBoolOption{lineno}
+ %
+ % set key [mydesign] to input file mydesign.tex
+ \DeclareBoolOption{mydesign}
%
\ProcessKeyvalOptions{\ClassName}
%
%% Turn off these keys now that we're done with them
- \def\@KeyFamily{\ClassName}
\NewDocumentCommand\mit@DisableOption{m}{%
\DisableKeyvalOption[%
action=ignore,%
class=\ClassName%
- ]{#1}{\@KeyFamily}%
+ ]{#1}{\ClassName}%
}
- \NewDocumentCommand\@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\mit@DisableOption}}
+ \NewDocumentCommand\mit@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\mit@DisableOption}}
+ %
+ \mit@DisableKeys{fontset;lineno;mydesign}%
%
- \@DisableKeys{fontset;}%
-
-
- %%%%%%%% more options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- %%% option to obtain line numbers [lineno]
- \newif\ifmit@lineno\mit@linenofalse
- \DeclareOption{lineno}{\mit@linenotrue}
-
- %%% option for to load packages that customize the design [mydesign] (caption, subcaption, titlesec, itemenum)
- \newif\ifmit@mydesign\mit@mydesignfalse
- \DeclareOption{mydesign}{\mit@mydesigntrue}
-
%% Suppress warnings about unused global options
- \DeclareOption*{}
-
+ \DeclareOption*{}
\ProcessOptions \relax
}
+
%%%%%%%%%%%%% Line numbering (class option) %%%%%%%%%%%%%%%%%%%%%%%%%
%%% Adjustments when lineno option is used
@@ -187,21 +160,19 @@
\providecommand{\@LN@col}[1]{\relax}
\providecommand{\@LN}[2]{\relax}
+
%%%%%%%%%%%%% Patch table of contents, list of figures, and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% We'd like these to have pdf bookmarks and to have the lists appear in the table of contents
+\RequirePackage{etoolbox}% provides \patchcmd
+
+% We'd like these sections to have pdf bookmarks and to have the two lists appear in the table of contents
-\pretocmd{\tableofcontents}{\pdfbookmark[0]{Table of Contents}{toc}}{}{}
-\apptocmd{\tableofcontents}{\cleardoublepage}{}{}
-\pretocmd{\listoffigures}{\phantomsection}{}{}
+\patchcmd{\tableofcontents}{\@starttoc{toc}}{\pdfbookmark[0]{Table of Contents}{toc}\@starttoc{toc}}{}{}
\patchcmd{\listoffigures}{\chapter*{\listfigurename}}{\chapter*{\listfigurename}\addcontentsline{toc}{chapter}{\protect\textbf{\listfigurename}}}{}{}
-\apptocmd{\listoffigures}{\cleardoublepage}{}{}
-\pretocmd{\listoftables}{\phantomsection}{}{}
\patchcmd{\listoftables}{\chapter*{\listtablename}}{\chapter*{\listtablename}\addcontentsline{toc}{chapter}{\protect\textbf{\listtablename}}}{}{}
-\apptocmd{\listoftables}{\cleardoublepage}{}{}
-%%%%%%%%%%%%% Geometry, mathtools, design, graphics, bibliography, hyperrefs, bookmarks %%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%% Geometry, mathtools, design, graphics, bibliography, hyperrefs, bookmarks, footnotes %%%%%%%%%%%%
\RequirePackage[letterpaper,top=1in,bottom=1in,left=1in,right=1in,marginparwidth=50pt,headsep=12pt,footskip=0.5in]{geometry}
@@ -243,7 +214,7 @@
% ==> NOT every font includes a bold math version, so you may need to use other math macros in the headings to get bold math <==
\fi
-%% Font loading
+%% Font loading %%%%%%%%%%
\typeout{^^JFontset key is \mit@fontset.^^J}
\IfFileExists{fontsets/\ClassName-\mit@fontset.tex}{% 2023/07/03
\input{fontsets/\ClassName-\mit@fontset.tex}
@@ -261,7 +232,7 @@
\fi
}
-\RequirePackage{graphicx}
+\RequirePackage{graphicx}
\ifmit@pdfmanagement
\ClassInfo{\ClassName}{pdfmanagement is defined. Will not load hyperxmp}%
@@ -275,16 +246,36 @@
% authors should use hypersetup to set details, in root .tex file
\urlstyle{same} % this changes font for \url to the current text font
-\providecommand\hrefurl[2]{\href{#1}{#2}}% in case new pdf management has not been loaded
+\providecommand\hrefurl[2]{\href{#1}{#2}}% in case \DocumentMetadata has not been loaded
\RequirePackage{doi} % create macro for hyperlinking doi numbers
-% Directly add the xmp property that shows work is copyrighted. See l3pdfmeta.pdf.
-% This is not automatic with \DocumentMetadata. "True" must be capitalized.
-\ExplSyntaxOn
- \cs_if_exist:NTF \pdfmeta_xmp_add:n {\pdfmeta_xmp_add:n{<xmpRights:Marked>True</xmpRights:Marked>}}{}
-\ExplSyntaxOff
-
-
+% the user can override all these design choices in the preamble,
+% or by using \AtBeginDocument{ \hypersetup{..} } in mydesign.tex
+\hypersetup{
+ colorlinks=true,
+ linkcolor=Blue3,% from xcolor package
+ citecolor=Blue3,% from xcolor package
+ urlcolor=violet,% from xcolor package
+ filecolor=red,
+% anchorcolor=yellow,% not all pdf viewers recognize this field (although Firefox does): hyperref issues a warning
+% colorscheme=phelype,% overrides link, cite, url, file colors with a preset scheme, through \DocumentMetadata
+ pdfborder={0 0 0},
+ bookmarksnumbered=true,
+ bookmarksopen=true,
+ bookmarksopenlevel=1,
+% pdfpagemode=UseNone,% this option means don't open bookmarks panel
+ pdfpagelayout=SinglePage,
+ pdfdisplaydoctitle=true,
+ pdfstartview=Fit,
+ pdfnewwindow=true,
+%
+ pdfcontactaddress={Massachusetts Institute of Technology, 77 Massachusetts Avenue},
+ pdfcontactcity={Cambridge, MA},
+ pdfcontactpostcode={02139-4307},
+ pdfcontactcountry={USA},
+ pdfcontacturl={https://dspace.mit.edu/handle/1721.1/7582},% DSPACE@MIT theses page
+}
+
%%%%%%%%%%%%% Stuff related to PDF bookmarks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Since \bm may be useful in headings, this fix will reduce frequency with which
@@ -292,435 +283,666 @@
\pdfstringdefDisableCommands{%
\def\bm#1#{\relax}%
}
-%
%%% Let's disable \( and \) in pdf bookmarks
\pdfstringdefDisableCommands{%
\def\({\relax}%
\def\){\relax}%
}
-%
%%% Let's also make sure \NoCaseChange in section headings won't break pdf bookmarks
\pdfstringdefDisableCommands{%
- \let\NoCaseChange\relax%
+ \let\NoCaseChange\relax%
}
-%
%%% Let's just remove citations from pdf bookmarks
\pdfstringdefDisableCommands{%
\def\cite{\@gobble}%
}
-%
%%% Let's fix \eqref in pdf bookmarks
\pdfstringdefDisableCommands{%
\def\eqref#1{(\ref{#1})}%
-%
-%%% Let's make sure footnotes in section headings don't break pdf bookmarks.
-\robustify{\footnote}
+}
+%%% Let's make sure footnotes in section headings don't break pdf bookmarks. (Note: redefined \footnote below is protected)
% \patchcmd{\section}{\sectionmark}{\let\footnote\@gobble\sectionmark}{}{}% <== not needed unless you implement running heads
\pdfstringdefDisableCommands{%
\def\footnote#1{}%
}
-}
-%%% Let's have commas separate successive footnotes
-\let\oldfootnote\footnote
-\renewcommand\footnote[1]{%
- \oldfootnote{#1}\futurelet\nextToken\isOtherfnote}
-
-\newcommand\isOtherfnote{%
- \ifx\footnote\nextToken\textsuperscript{\mdseries,}%
- \fi%
-}
+
+\ExplSyntaxOn
+%\debug_on:n {all}
+
+%%%%%%%%%% Put comma between successive footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new:Npn \__mitthesis_NoteComma:n { \peek_meaning:NTF \footnote {\textsuperscript{\mdseries,}} { } }
+\cs_new_eq:NN \__savefootnote \footnote
+\cs_gset_protected:Npn \footnote #1 { \__savefootnote{#1}\__mitthesis_NoteComma:n }
+
+%%%%%%%%%% End Footnote comma %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% MACROS FOR HANDLING TITLE AND ABSTRACT PAGES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%% Dates %%%%%%%%%%%%%%%
-
-\ExplSyntaxOn
-\NewExpandableDocumentCommand\MonthCheck{mm}{%
- \str_case_e:nnF {#1}{ {May}{} {June}{} {September}{} {February}{}
- {\space May}{} {\space June}{} {\space September}{} {\space February}{}
- {May\space}{} {June\space}{} {September\space}{} { February\space}{}
- {\space May\space}{} {\space June\space}{} {\space September\space}{} {\space February\space}{}
- }{#2}
+%%%%%%%%%% Degree Date Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\tl_new:N \g__dd_month_tl
+\tl_new:N \g__dd_year_tl
+\cs_generate_variant:Nn \msg_error:nnn {nne}
+\cs_generate_variant:Nn \str_casefold:n {e}
+\cs_generate_variant:Nn \tl_gremove_all:Nn {No}
+\cs_new_protected:Nn \__dd_setdates:nn {
+ \tl_gset:Nn \g__dd_month_tl {#1}
+ \tl_gset:Nn \g__dd_year_tl {#2}
+ \tl_gremove_all:No \g__dd_month_tl { \space }
+ \tl_gremove_all:No \g__dd_year_tl { \space }
+ \str_case_e:nnF
+ { \str_casefold:e { \tl_to_str:N \g__dd_month_tl } }
+ { {february}{} {may}{} {june}{} {september}{}}
+ { \msg_error:nne {\ClassName} {wrong_month} { \text_titlecase:n {\g__dd_month_tl} } }
}
-\ExplSyntaxOff
+\msg_new:nnnn {\ClassName} {wrong_month} {The\ degree\ month\ must\ be\ one\ of\ February,\ May,\ June,\ or\ September.} {You\ cannot\ use\ #1\ as\ the\ degree\ month.}
-\NewDocumentCommand\DegreeDate{mm}{%
- \def\@DegreeMonth{\ignorespaces#1}%
- \def\@@DegreeMonth{#1}%
- \def\@DegreeYear{\ignorespaces#2}%
- \def\DegreeYear{\ignorespaces#2}%
+\cs_generate_variant:Nn \text_titlecase:n {o,V}
+\NewDocumentCommand\DegreeDate{mm}{% {month}{year}
+ \__dd_setdates:nn {#1}{#2}
+ \cs_new:Npn \DegreeMonth { \text_titlecase:V { \g__dd_month_tl } }
+ \cs_new:Npn \DegreeYear { \text_titlecase:V { \g__dd_year_tl } }
+}
+\msg_new:nnnn {\ClassName} {no_degree_date} {Missing\ degree\ date!}{
+ You\ MUST\ issue\ the\ \DegreeDate{month}{year}\ command\ between\ \string\begin{document}\ and\ \string\maketitle.}
+
+\NewDocumentCommand\ThesisDate{m}{
+ \tl_if_exist:NTF \g_dd_thesisdate_tl { \g_dd_thesisdate_tl } { \__dd_thesisdate:n {#1} }% will use only value given first
+}
+\cs_new_protected:Nn \__dd_thesisdate:n {
+ \tl_new:N \g_dd_thesisdate_tl
+ \tl_gset:Nx \g_dd_thesisdate_tl { \tl_trim_spaces:n {#1} }
}
-\NewDocumentCommand\ThesisDate{m}{%
- \def\@ThesisDate{\ignorespaces#1}%
+%%%%%%%%%% End Degree Date Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%% Author Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\seq_new:N \g_author_name_seq
+\seq_new:N \g_author_department_seq
+\seq_new:N \g_author_prevdegree_seq
+\seq_new:N \g_author_secondprevdegree_seq
+\seq_new:N \g_author_thirdprevdegree_seq
+\seq_new:N \g_author_fourthprevdegree_seq
+\int_gzero_new:N \g_author_authorcnt_int
+
+\NewDocumentCommand\Author{mm O{}O{}O{}O{} }
+ {
+ \tl_if_blank:nTF{#1}{
+ \msg_error:nn {\ClassName} {blank_author}
+ }{
+ \__author_data_add:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { #6 }
+ }
+ \tl_if_blank:nTF{#2}{\msg_error:nn {\ClassName} {blank_author_dep}}{}
+ }
+\cs_new_protected:Nn \__author_data_add:nnnnnn
+ {
+ \int_gincr:N \g_author_authorcnt_int
+ \seq_gput_right:cx { g_author_name_seq } { \tl_trim_spaces:n {#1} }
+ \seq_gput_right:cx { g_author_department_seq } { \tl_trim_spaces:n {#2} }
+ \seq_gput_right:cx { g_author_prevdegree_seq } { \tl_trim_spaces:n {#3} }
+ \seq_gput_right:cx { g_author_secondprevdegree_seq } { \tl_trim_spaces:n {#4} }
+ \seq_gput_right:cx { g_author_thirdprevdegree_seq } { \tl_trim_spaces:n {#5} }
+ \seq_gput_right:cx { g_author_fourthprevdegree_seq } { \tl_trim_spaces:n {#6} }
+ }
+\msg_new:nnnn {\ClassName} {blank_author} {Missing\ author\ name,\ check\ for\ blank\ in\ \Author\ command.}{%
+ You\ MUST\ provide\ an\ author\ name\ using\ the\ \Author{name}{department}\ command.}
+\msg_new:nnnn {\ClassName} {blank_author_dep} {Missing\ author\ department,\ check\ for\ blank\ in\ \Author\ command.}{%
+ You\ MUST\ provide\ the\ author's\ department\ using\ the\ \Author{name}{department}\ command.}
+
+\NewExpandableDocumentCommand\CopyrightAuthor{}{
+ \tl_if_exist:NTF \g__author_ca_tl
+ { \g__author_ca_tl }
+ { \__author_copyrightauthor: \g__author_ca_tl }
}
-%%%%%%%%%%%%%% Author, supervisor, acceptor, titles, and departments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\newcounter{authorcnt}
-\setcounter{authorcnt}{0}% this counter's final value is used repeatedly.
-
-\NewDocumentCommand\Author{m m oooo}{%
- \ifblank{#1}{%
- \ClassError{\ClassName}{Missing author name, check for blank in Author command}{%
- You MUST provide an author name using the \Author{name}{department} command.}%
- }{%
- \addtocounter{authorcnt}{1}%
- \expandafter\xdef\csname aut@\theauthorcnt\endcsname{\ignorespaces#1}%
- \expandafter\xdef\csname autdep@\theauthorcnt\endcsname{\ignorespaces#2}%
- \IfNoValueF{#3}{\expandafter\xdef\csname prevdegree@\theauthorcnt\endcsname{\ignorespaces#3}}%
- \IfNoValueF{#4}{\expandafter\xdef\csname secondprevdegree@\theauthorcnt\endcsname{\ignorespaces#4}}%
- \IfNoValueF{#5}{\expandafter\xdef\csname thirdprevdegree@\theauthorcnt\endcsname{\ignorespaces#5}}%
- \IfNoValueF{#6}{\expandafter\xdef\csname fourthprevdegree@\theauthorcnt\endcsname{\ignorespaces#6}}%
- }%
- \ifblank{#2}{\ClassWarning{\ClassName}{Missing author department, check for blank in Author command}}{}%
-}% defines \aut@authorcnt as Name #1 and \autdep@authorcnt as Name #1's department
-
-\newcounter{authorno}
-\setcounter{authorno}{0}
-
-\NewDocumentCommand\@AuthorBlock{}{% Revised 2023/06/23
- \setcounter{authorno}{1}%
- \ifnum\value{authorcnt}=0
- \ClassError{\ClassName}{Missing author! You must issue the \Author{name}{department} command}{%
- You MUST issue the \Author{name}{department} command after \begin{document} and before \maketitle.}%
- \fi
- {by\par
- \whiledo{\value{authorno}<\value{authorcnt}}{%
- \ignorespaces\csname aut@\theauthorno\endcsname\par
- \ifcsundef{prevdegree@\theauthorno}{\relax}{\normalsize\csname prevdegree@\theauthorno\endcsname}%
- \ifcsundef{secondprevdegree@\theauthorno}{\relax}{\linebreak\normalsize\csname secondprevdegree@\theauthorno\endcsname}%
- \ifcsundef{thirdprevdegree@\theauthorno}{\relax}{\linebreak\normalsize\csname thirdprevdegree@\theauthorno\endcsname}%
- \ifcsundef{fourthprevdegree@\theauthorno}{\relax}{\linebreak\normalsize\csname fourthprevdegree@\theauthorno\endcsname}%
- \par and\par
- \addtocounter{authorno}{1}%
- }%
- \ignorespaces\csname aut@\theauthorno\endcsname
- \ifcsundef{prevdegree@\theauthorno}{\relax}{\par\normalsize\csname prevdegree@\theauthorno\endcsname}%
- \ifcsundef{secondprevdegree@\theauthorno}{\relax}{\linebreak \normalsize\csname secondprevdegree@\theauthorno\endcsname}%
- \ifcsundef{thirdprevdegree@\theauthorno}{\relax}{\linebreak \normalsize\csname thirdprevdegree@\theauthorno\endcsname}%
- \ifcsundef{fourthprevdegree@\theauthorno}{\relax}{\linebreak \normalsize\csname fourthprevdegree@\theauthorno\endcsname}%
- \par\medskip
- }%
+\cs_new_protected:Nn \__author_copyrightauthor: {
+ \tl_new:N \g__author_ca_tl
+ \int_zero_new:N \l__author_autcrcnt_int
+ \int_incr:N \l__author_autcrcnt_int
+ \tl_gset:Nx \g__author_ca_tl { \seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
+ \int_incr:N \l__author_autcrcnt_int
+ \int_while_do:nNnn { \l__author_autcrcnt_int } < { \g_author_authorcnt_int }
+ {
+ \tl_gput_right:Nx \g__author_ca_tl {,\ \seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
+ \int_incr:N \l__author_autcrcnt_int
+ }
+ \int_compare:nNnT { \l__author_autcrcnt_int } = { \g_author_authorcnt_int } {
+ \tl_gput_right:Nx \g__author_ca_tl {\ and\ \seq_item:cn { g_author_name_seq } { \l__author_autcrcnt_int } }
+ }
+ \tl_set:Nn \l_tmpa_tl {\tl_item:Nn \g__author_ca_tl {-1} }% get last token
+ \str_case_e:nnT
+ { \l_tmpa_tl }
+ { {.}{} }
+ { \__copyright_remove_period:N { \g__author_ca_tl } }% remove last token if it is a period
+ \__author_pdfcopyrightauthor:
+}
+\cs_new:Nn \__copyright_remove_period:N
+ {
+ \tl_gset:Nx #1 { \tl_range:Nnn #1 { 1 } { \tl_count:N #1 - 1 } }
+ }
+\cs_new_protected:Nn \__author_pdfcopyrightauthor: {
+ \tl_new:N \g__author_pdfca_tl
+ \int_set:Nn \l_tmpa_int {1}
+ \tl_gset:Nx \g__author_pdfca_tl { { \seq_item:cn { g_author_name_seq } { \l_tmpa_int } } }
+ \int_until_do:nNnn { \l_tmpa_int } = { \g_author_authorcnt_int }
+ {
+ \int_incr:N \l_tmpa_int
+ \tl_gput_right:Nx \g__author_pdfca_tl {,\ { \seq_item:cn { g_author_name_seq } { \l_tmpa_int } } }
+ }
}
-\NewDocumentCommand\@AbstractAuthorBlock{}{% Revised 2023/07/20
- \setcounter{authorno}{1}%
+
+\cs_new:Nn \__author_block: {
+ \int_zero_new:N \l__author_authorno_int
+ \int_incr:N \l__author_authorno_int
+ \int_compare:nNnTF { \g_author_authorcnt_int } = {0} {
+ \msg_error:nn {\ClassName} {no_author}
+ }
{by\par
- \whiledo{\value{authorno}<\value{authorcnt}}{%
- \ignorespaces\csname aut@\theauthorno\endcsname
+ \int_until_do:nNnn { \l__author_authorno_int } = { \g_author_authorcnt_int } {
+ \seq_item:cn { g_author_name_seq } { \l__author_authorno_int } \par
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_prevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \normalsize \l_tmpa_tl }% no linebreak or par for empty items
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_secondprevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \linebreak\normalsize \l_tmpa_tl }
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_thirdprevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \linebreak\normalsize \l_tmpa_tl }
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_fourthprevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \linebreak\normalsize \l_tmpa_tl }
\par and\par
- \addtocounter{authorno}{1}%
- }%
- \ignorespaces\csname aut@\theauthorno\endcsname
+ \int_incr:N \l__author_authorno_int
+ }
+ \seq_item:cn { g_author_name_seq } { \l__author_authorno_int } \par
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_prevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \normalsize \l_tmpa_tl }% no linebreak or par for empty items
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_secondprevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \linebreak\normalsize \l_tmpa_tl }
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_thirdprevdegree_seq } { \l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \linebreak\normalsize \l_tmpa_tl }
+ \tl_set:Nx \l_tmpa_tl { \seq_item:cn { g_author_fourthprevdegree_seq } {\l__author_authorno_int} }
+ \tl_if_empty:NF \l_tmpa_tl { \linebreak\normalsize \l_tmpa_tl }
+ \par\medskip
+ }
+}
+\msg_new:nnnn {\ClassName} {no_author}
+ { Missing\ author!\ You\ must\ issue\ the\ \Author{name}{department}\ command. }{
+ You\ MUST\ issue\ the\ \Author{name}{department}\ command\ after\ \string\begin{document}\ and\ before\ \string\maketitle. }
+
+\cs_new:Nn \__author_abstractblock: {
+ \int_zero_new:N \l__author_authorno_int
+ \int_incr:N \l__author_authorno_int
+ \int_compare:nNnTF { \g_author_authorcnt_int } = {0} {
+ \msg_error:nn {\ClassName} {no_author}
+ }
+ {by\par
+ \int_until_do:nNnn { \l__author_authorno_int } = { \g_author_authorcnt_int } {
+ \seq_item:cn { g_author_name_seq } { \l__author_authorno_int }
+ \par and\par
+ \int_incr:N \l__author_authorno_int
+ }%
+ \seq_item:cn { g_author_name_seq } { \l__author_authorno_int }
}%
}
-\newcounter{autcrcnt}
-\setcounter{autcrcnt}{1}
+%%%%%%%%%% End Author Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NewDocumentCommand\@CopyrightAuthor{}{%
- \csname aut@\theautcrcnt\endcsname
- \addtocounter{autcrcnt}{1}%
- \whiledo{\value{autcrcnt}<\value{authorcnt}}{%
- , \ignorespaces\csname aut@\theautcrcnt\endcsname
- \addtocounter{autcrcnt}{1}%
- }%
- \ifnum\value{autcrcnt}=\value{authorcnt}%
- \space and\space\csname aut@\theauthorcnt\endcsname\ignorespaces
- \fi
- \setcounter{autcrcnt}{1}% reset so we can use this command more than once
+
+%%%%%%%%%% Supervisor Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\seq_new:N \g_supervisor_name_seq
+\seq_new:N \g_supervisor_title_seq
+\int_gzero_new:N \g_supervisor_supervisorcnt_int
+
+\NewDocumentCommand\Supervisor{mm}{
+ \tl_if_blank:nTF{#1}{
+ \msg_error:nn {\ClassName} {blank_supervisor}
+ }{
+ \__supervisor_data_add:nn { #1 } { #2 }
+ }
+ \tl_if_blank:nTF{#2}{\msg_error:nn {\ClassName} {blank_supervisor_title}}{}
}
+\msg_new:nnnn {\ClassName} {blank_supervisor}
+ { Missing\ supervisor\ name, check\ for\ blank\ in\ \Supervisor{name}{title}\ command.}{
+ You\ MUST\ provide\ the\ supervisor's\ name\ using\ the\ \Supervisor{name}{title}\ command.}
+\msg_new:nnnn {\ClassName} {blank_supervisor_title}
+ { Missing\ supervisor\ title, check\ for\ blank\ in\ \Supervisor{name}{title}\ command. }{
+ You\ MUST\ provide\ the\ supervisor's\ title\ using\ the\ \Supervisor{name}{title}\ command.}
+
+\cs_new_protected:Nn \__supervisor_data_add:nn
+ {
+ \int_gincr:N \g_supervisor_supervisorcnt_int
+ \seq_gput_right:cx { g_supervisor_name_seq } { \tl_trim_spaces:n {#1} }
+ \seq_gput_right:cx { g_supervisor_title_seq } { \tl_trim_spaces:n {#2} }
+ }
+
+
+\cs_new:Nn \__supervisor_abstractblock: {
+ \int_zero_new:N \l__supervisor_supervisorno_int
+ \int_incr:N \l__supervisor_supervisorno_int
+ \setlength{\parindent}{0pt}
+ \par\bigskip
+ \int_compare:nNnTF { \g_supervisor_supervisorcnt_int } = {0} {
+ \msg_error:nn {\ClassName} {no_supervisor}
+ }
+ {\int_until_do:nNnn { \l__supervisor_supervisorno_int } = { \g_supervisor_supervisorcnt_int } {
+ Thesis\ supervisor:\space \seq_item:cn { g_supervisor_name_seq } { \l__supervisor_supervisorno_int }\par
+ Title:\space \seq_item:cn { g_supervisor_title_seq } { \l__supervisor_supervisorno_int }\par\medskip
+ \int_incr:N \l__supervisor_supervisorno_int
+ }
+ Thesis\ supervisor:\space \seq_item:cn { g_supervisor_name_seq } { \l__supervisor_supervisorno_int }\par
+ Title:\space \seq_item:cn { g_supervisor_title_seq } { \l__supervisor_supervisorno_int }\ignorespaces
+ }
+}
+\msg_new:nnnn {\ClassName} {no_supervisor}
+ { Missing\ supervisor!\ You\ must\ issue\ the\ \Supervisor{name}{title}\ command. }{
+ You\ MUST\ issue\ the\ \Supervisor{name}{title}\ command\ after\ \string\begin{document}\ and\ before\ \string\maketitle. }
-\newcounter{degcnt}
-\setcounter{degcnt}{0}
-\newcounter{depflag}
-\setcounter{depflag}{0}
-\NewDocumentCommand\Degree{mm}{% Revised 2023/06/23
- \ifblank{#1}{%
- \ClassError{\ClassName}{Missing degree name, check for blank \Degree{name}{department} command}{%
- Check for blank name \Degree{name}{department} command.}%
- }{%
- \addtocounter{degcnt}{1}%
- \expandafter\xdef\csname deg@\thedegcnt\endcsname{\ignorespaces#1}%
- \expandafter\xdef\csname degdep@\thedegcnt\endcsname{\ignorespaces#2}%
- }%
- \ifblank{#2}{%
- \setcounter{depflag}{\value{degcnt}}%
- \ClassWarning{\ClassName}{Missing degree department for Degree command number \thedegcnt. Assuming to be a duplicate of previous department}}{}%
-}% defines \deg@degcnt as Name #1 and \degdep@degcnt as associated dept.
-
-\newcounter{degno}
-\newcounter{depno}
-\NewDocumentCommand\@DegreeBlock{}{% extensive revision 2023/06/23
- \ifnum\value{degcnt}=0
- \ClassError{\ClassName}{Missing degree! You must issue the \Degree{name}{department} command}{%
- You MUST issue the \Degree{name}{department} command after \begin{document} and before \maketitle. You do want the degree, don't you?}%
- \fi
- \setcounter{degno}{1}
- \setcounter{depno}{1}
- \newcommand*\PrevDept{\csname degdep@\thedepno\endcsname}
- \newcommand*\CurrDept{}
- Submitted to the \mbox{\PrevDept}%
- \whiledo{\value{depno}<\value{degcnt}}{%
- \addtocounter{depno}{1}%
- \renewcommand*\CurrDept{\csname degdep@\thedepno\endcsname}%
- \ifnum\value{depflag}=\value{depno}\relax\else
- \space and the\linebreak
- \mbox{\CurrDept}%
- \fi%
- }%
- \linebreak \mbox{in partial fulfillment of the requirements for the\space
- \ifnum\value{degcnt}>1 degrees\else degree\fi\space of}%
+
+%%%%%%%%%% End Supervisor Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%% Acceptor Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\seq_new:N \g_acceptor_name_seq
+\seq_new:N \g_acceptor_department_seq
+\seq_new:N \g_acceptor_title_seq
+\int_gzero_new:N \g_acceptor_acceptorcnt_int
+
+\bool_new:N \g__acceptor_title_tf_bool
+\bool_gset_false:N \g__acceptor_title_tf_bool
+
+\NewDocumentCommand\Acceptor{mmm}{
+ \tl_if_blank:nTF{#1}{
+ \msg_error:nn {\ClassName} {blank_acceptor}
+ }{
+ \__acceptor_data_add:nnn {#1} {#2} {#3}
+ }
+ \tl_if_blank:nTF{#2}{\msg_error:nn {\ClassName} {blank_acceptor_dep}}{}
+ \tl_if_blank:nTF{#3}{
+ \bool_gset_true:N \g__acceptor_title_tf_bool
+ \msg_warning:nn {\ClassName} {blank_acceptor_title}}{}
+}
+\msg_new:nnnn {\ClassName} {blank_acceptor}
+ { Missing\ acceptor\ name, check\ for\ blank\ in\ \Acceptor{name}{department}{title}\ command.}{
+ You\ MUST\ provide\ the\ acceptor's\ name\ using\ the\ \Acceptor{name}{department}{title}\ command.}
+\msg_new:nnnn {\ClassName} {blank_acceptor_dep}
+ { Missing\ acceptor\ department, check\ for\ blank\ in\ \Acceptor{name}{department}{title}\ command. }{
+ You\ MUST\ provide\ the\ acceptor's\ department\ using\ the\ \Acceptor{name}{department}{title}\ command.}
+\msg_new:nnn {\ClassName} {blank_acceptor_title}
+ { Missing\ acceptor\ title\ (blank\ in\ \Acceptor{name}{department}{title}\ command).\ Perhaps\ you\ are\ trying\ to\ save\ vertical\ space?\ You\ can\ put\ the\ acceptor\ title\ into\ department\ field\ instead.\ For\ consistency,\ I\ will\ omit\ titles\ of\ ALL\ acceptors.}
+
+\cs_new_protected:Nn \__acceptor_data_add:nnn
+ {
+ \int_gincr:N \g_acceptor_acceptorcnt_int
+ \seq_gput_right:cx { g_acceptor_name_seq } { \tl_trim_spaces:n {#1} }
+ \seq_gput_right:cx { g_acceptor_department_seq } { \tl_trim_spaces:n {#2} }
+ \seq_gput_right:cx { g_acceptor_title_seq } { \tl_trim_spaces:n {#3} }
+ }
+
+%%%%%%%%%% End Acceptor Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%% Degree Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\seq_new:N \g_degree_name_seq
+\seq_new:N \g_degree_department_seq
+\int_gzero_new:N \g_degree_degreecnt_int
+\int_gzero_new:N \g__degree_degreeflag_int
+
+\NewDocumentCommand\Degree{mm}
+ {
+ \tl_if_blank:nTF {#1} {
+ \msg_error:nn {\ClassName} {blank_degree}
+ }{
+ \__degree_data_add:nn { #1 } { #2 }
+ }
+ \tl_if_blank:nT {#2} {
+ \int_gset_eq:NN \g__degree_degreeflag_int \g_degree_degreecnt_int
+ \msg_warning:nnx {\ClassName} {blank_degree_dep} { \int_to_arabic:n { \g__degree_degreeflag_int } }
+ \tl_if_blank:nT {#1} { \int_gincr:N \g__degree_degreeflag_int }% in case both are blank
+ }
+ }
+\cs_new_protected:Nn \__degree_data_add:nn
+ {
+ \int_gincr:N \g_degree_degreecnt_int
+ \seq_gput_right:cx { g_degree_name_seq } { \tl_trim_spaces:n {#1} }
+ \seq_gput_right:cx { g_degree_department_seq } { \tl_trim_spaces:n {#2} }
+ }
+\msg_new:nnnn {\ClassName} {blank_degree} {Missing\ degree\ name,\ check\ for\ blank\ in\ \Degree\ command.}
+ {You\ MUST\ provide\ a\ degree\ name\ using\ the\ \Degree{name}{department}\ command.}
+\msg_new:nnnn {\ClassName} {blank_degree_dep} {Missing\ degree\ department\ for\ Degree\ command\ number\
+ #1.\ Will\ treat\ as\ a\ duplicate\ of\ previous\ department.}{}
+
+\int_zero_new:N \l__degree_degreeno_int
+\int_zero_new:N \l__degree_departmentno_int
+
+\cs_new:Nn \__degree_block: {
+ \int_compare:nNnTF { \g_degree_degreecnt_int } = {0} {
+ \msg_error:nn {\ClassName} {no_degree}
+ }
+ \int_zero_new:N \l__degree_degreeno_int
+ \int_incr:N \l__degree_degreeno_int
+ \int_zero_new:N \l__degree_departmentno_int
+ \int_incr:N \l__degree_departmentno_int
+ \cs_new:Nx \__degree_prevdept: {\seq_item:cn { g_degree_department_seq } { \l__degree_departmentno_int } }
+ \cs_new:Nn \__degree_currdept: {}
+ \mbox {Submitted\ to\ the\ } \mbox {\__degree_prevdept:}
+ \int_until_do:nNnn { \l__degree_departmentno_int } = { \g_degree_degreecnt_int } {
+ \int_incr:N \l__degree_departmentno_int
+ \cs_set:Nx \__degree_currdept: {\seq_item:cn { g_degree_department_seq } { \l__degree_departmentno_int } }
+ \int_compare:nNnTF { \l__degree_departmentno_int } = {\g__degree_degreeflag_int } { \scan_stop: }
+ {
+ \mbox {\ and\ the}\linebreak
+ \mbox {\__degree_currdept: }
+ }
+ }
+ \linebreak \mbox {in\ partial\ fulfillment\ of\ the\ requirements\ for\ the\
+ \int_compare:nNnTF { \g_degree_degreecnt_int } > {1} {degrees} {degree}
+ \ of}
\par\medskip
- \whiledo{\value{degno}<\value{degcnt}}{%
- \MakeUppercase{\ignorespaces\csname deg@\thedegno\endcsname}\par and\par
- \addtocounter{degno}{1}%
- }%
- \MakeUppercase{\ignorespaces\csname deg@\thedegno\endcsname}\par\medskip
+ \int_until_do:nNnn { \l__degree_degreeno_int } = { \g_degree_degreecnt_int } {
+ \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par and\par
+ \int_incr:N \l__degree_degreeno_int
+ }
+ \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par\medskip
}
-
-\NewDocumentCommand\@AbstractDegreeBlock{}{% 2023/07/19
- \setcounter{degno}{1}
- \setcounter{depno}{1}
- \newcommand*\PrevDept{\csname degdep@\thedepno\endcsname}
- \newcommand*\CurrDept{}
- Submitted to the \mbox{\PrevDept}%
- \whiledo{\value{depno}<\value{degcnt}}{%
- \addtocounter{depno}{1}%
- \renewcommand*\CurrDept{\csname degdep@\thedepno\endcsname}%
- \ifnum\value{depflag}=\value{depno}\relax\else
- \space and the\linebreak
- \mbox{\CurrDept}%
- \fi%
- }%
- \linebreak on \@ThesisDate \space \mbox{in partial fulfillment of the requirements for the\space
- \ifnum\value{degcnt}>1 degrees\else degree\fi\space of}%
+\msg_new:nnnn {\ClassName} {no_degree}
+ { Missing\ degree!\ You\ must\ issue\ the\ \Degree{name}{department}\ command. }{
+ You\ MUST\ issue\ the\ \Degree{name}{department}\ command\ after\ \string\begin{document}\ and\ before\ \string\maketitle.\ You\ do\ want\ the\ degree,\ don't\ you?}
+
+
+\cs_new:Nn \__degree_abstractblock: {
+ \int_set:Nn \l__degree_degreeno_int {1}
+ \int_set:Nn \l__degree_departmentno_int {1}
+ \cs_set:Nx \__degree_prevdept: {\seq_item:cn { g_degree_department_seq } { \l__degree_departmentno_int } }
+ \cs_set:Nn \__degree_currdept: {}
+ \mbox {Submitted\ to\ the\ }\mbox{\__degree_prevdept:}
+ \int_until_do:nNnn { \l__degree_departmentno_int } = { \g_degree_degreecnt_int } {
+ \int_incr:N \l__degree_departmentno_int
+ \cs_set:Nx \__degree_currdept: {\seq_item:cn { g_degree_department_seq } { \l__degree_departmentno_int } }
+ \int_compare:nNnTF { \g__degree_degreeflag_int } = { \g_degree_degreecnt_int } { \scan_stop: }
+ {
+ \mbox {\ and\ the}\linebreak
+ \mbox { \__degree_currdept: }
+ }
+ }
+ \linebreak \mbox{on\ \g_dd_thesisdate_tl\ in\ partial\ fulfillment\ of\ the\ requirements\ for\ the\
+ \int_compare:nNnTF { \g_degree_degreecnt_int } > {1} {degrees} {degree}
+ \ of}
\par\medskip
- \whiledo{\value{degno}<\value{degcnt}}{%
- \MakeUppercase{\ignorespaces\csname deg@\thedegno\endcsname}\par and\par
- \addtocounter{degno}{1}%
- }%
- \MakeUppercase{\ignorespaces\csname deg@\thedegno\endcsname}\par\medskip
+ \int_until_do:nNnn { \l__degree_degreeno_int } = { \g_degree_degreecnt_int } {
+ \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par and\par
+ \int_incr:N \l__degree_degreeno_int
+ }
+ \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par\medskip
}
+%%%%%%%%%% End Degree Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcounter{supcnt}
-\setcounter{supcnt}{0}
-\newcounter{supno}
-\setcounter{supno}{0}
-\NewDocumentCommand\Supervisor{mm}{%
- \ifblank{#1}{%
- \ClassError{\ClassName}{Missing supervisor name, check for blank in \Supervisor{name}{department} command}{
- Check for blank in \Supervisor{name}{department} command.}%
- }{%
- \addtocounter{supcnt}{1}%
- \expandafter\xdef\csname sup@\thesupcnt\endcsname{#1}%
- \expandafter\xdef\csname supdep@\thesupcnt\endcsname{#2}%
- }%
- \ifblank{#2}{\ClassError{\ClassName}{Missing supervisor department, check for blank in \Supervisor{name}{department} command}{%
- check for blank in \Supervisor{name}{department} command.}}{}%
-}% defines \sup@supcnt as Name #1 and \supdep@supcnt as associated dept.
-
-\newcounter{acccnt}
-\setcounter{acccnt}{0}
-\newcounter{accno}
-\setcounter{accno}{0}
-\newif\ifmit@noacctitle\mit@noacctitlefalse % Revised 2023/06/23
-\NewDocumentCommand\Acceptor{mmm}{%
- \ifblank{#1}{%
- \ClassWarning{\ClassName}{Missing acceptor name, check for blank in \Acceptor{name}{department}{title} command}%
- }{%
- \addtocounter{acccnt}{1}%
- \expandafter\xdef\csname acc@\theacccnt\endcsname{#1}%
- \expandafter\xdef\csname accdep@\theacccnt\endcsname{#2}%
- \expandafter\xdef\csname acctitle@\theacccnt\endcsname{#3}%
- }%
- \ifblank{#2}{\ClassWarning{\ClassName}{Missing acceptor department, check for blank in \Acceptor{name}{department}{title} command.}}{}%
- \ifblank{#3}{%
- \mit@noacctitletrue
- \ClassWarning{\ClassName}{Missing acceptor title (blank in \Acceptor{name}{department}{title} command). Perhaps you are trying to save vertical space? You can put the acceptor title into department field instead. For consistency, I will omit titles of ALL acceptors.}%
- }{}%
-}% defines \acc@acccnt as Name #1, \accdep@accccnt as associated dept, and \acctitle@acccnt as title of acceptor
-
-\newcommand*\@SigSize{\relax}
-\NewDocumentCommand\SignatureBlockSize{m}{\renewcommand\@SigSize{\ignorespaces#1}}% revised 2023/06/23
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\NewDocumentCommand\@SetSignatureBlock{}{% Revised 2023/06/23
- \ifnum\value{supcnt}=0
- \ClassError{\ClassName}{Missing supervisor! You must issue the \Supervisor{name}{department} command}{%
- You MUST issue the \Supervisor{name}{department} command after \begin{document} and before \maketitle.}%
- \fi
- \ifnum\value{acccnt}=0
- \ClassError{\ClassName}{Missing acceptor! You must issue the \Acceptor{name}{department} command}{%
- You MUST issue the \Acceptor{name}{department} command after \begin{document} and before \maketitle.}%
- \fi
- \ifdefined\@ThesisDate\else\ClassError{\ClassName}{Missing thesis date!}{%
- You must issue the \ThesisDate{Date thesis is submitted} command between \begin{document} and \maketitle.}%
- \fi
- \setcounter{authorno}{0}%
- \setcounter{supno}{0}%
- \setcounter{accno}{0}%
- \@SigSize
+%%%%%%%%%% Signature Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand\SignatureBlockSize{m}{
+ \__signature_sigsize:n {#1}
+}
+\tl_new:N \g__signature_sigsize_tl
+\cs_new_protected:Nn \__signature_sigsize:n
+ {
+ \tl_gset:Nf \g__signature_sigsize_tl { \tl_trim_spaces:n {#1} }
+ \token_case_meaning:NnF \g__signature_sigsize_tl
+ {
+ \normalsize {} \small {} \footnotesize{} \scriptsize{} \tiny{}
+ } {
+ \msg_error:nn {\ClassName} {weird_sigsize}
+ }
+ }
+
+\cs_new:Nn \__signature_block: {
+ \int_compare:nNnT { \g_supervisor_supervisorcnt_int } = {0} {
+ \msg_error:nn {\ClassName} {no_supervisor}% this message is def'd in Abstract supervisor block
+ }
+ \int_compare:nNnT { \g_acceptor_acceptorcnt_int } = {0} {
+ \msg_error:nn {\ClassName} {no_acceptor}
+ }
+ \tl_if_exist:NF \g_dd_thesisdate_tl {
+ \msg_error:nn {\ClassName} {no_thesis_date}
+ }
+ \int_gzero_new:N \g__signature_autno_int
+ \int_gzero_new:N \g__signature_supno_int
+ \int_gzero_new:N \g__signature_accno_int
+ \g__signature_sigsize_tl
\begin{tabbing}
- \hspace{1.35in}\=\hspace{1in}\kill
- \whiledo{\value{authorno}<\value{authorcnt}}{% starting with authorno = 0 ensures we reach authorcnt with +1
- \addtocounter{authorno}{1}%
- Authored by: \> \csname aut@\theauthorno\endcsname\\% remove \ignorespaces x9, 2023/06/23
- \> \csname autdep@\theauthorno\endcsname\\
- \> \@ThesisDate \\[1em]
- }% end whiledo
- \whiledo{\value{supno}<\value{supcnt}}{%
- \addtocounter{supno}{1}%
- Certified by: \> \csname sup@\thesupno\endcsname\\
- \> \csname supdep@\thesupno\endcsname, Thesis Supervisor\\[1em]
- }% end whiledo
- \whiledo{\value{accno}<\value{acccnt}}{%
- \addtocounter{accno}{1}%
- Accepted by: \> \csname acc@\theaccno\endcsname\\
- \> \csname accdep@\theaccno\endcsname
- \ifmit@noacctitle\else %<=== 2023/06/23
- \\
- \> \csname acctitle@\theaccno\endcsname
- \fi
- \\[1em]
- }% end whiledo
+ \hspace{1.35in} \= \hspace{1in} \kill
+ \int_do_while:nNnn { \g__signature_autno_int } < { \g_author_authorcnt_int } {
+ \int_gincr:N \g__signature_autno_int
+ Authored\ by: \> \seq_item:cn { g_author_name_seq } { \g__signature_autno_int } \\
+ \> \seq_item:cn { g_author_department_seq } { \g__signature_autno_int } \\
+ \> \g_dd_thesisdate_tl \\[1em]
+ }
+ \int_do_while:nNnn { \g__signature_supno_int } < { \g_supervisor_supervisorcnt_int } {
+ \int_gincr:N \g__signature_supno_int
+ Certified\ by: \> \seq_item:cn { g_supervisor_name_seq } { \g__signature_supno_int } \\
+ \> \seq_item:cn { g_supervisor_title_seq } { \g__signature_supno_int },\ Thesis\ Supervisor\\[1em]
+ }
+ \int_compare:nNnF { \g_acceptor_acceptorcnt_int } = {0} {
+ \int_do_while:nNnn { \g__signature_accno_int } < { \g_acceptor_acceptorcnt_int } {
+ \int_gincr:N \g__signature_accno_int
+ Accepted\ by: \> \seq_item:cn { g_acceptor_name_seq } { \g__signature_accno_int } \\
+ \> \seq_item:cn { g_acceptor_department_seq } { \g__signature_accno_int }
+ \bool_if:NF \g__acceptor_title_tf_bool
+ {
+ \\
+ \> \seq_item:cn { g_acceptor_title_seq } { \g__signature_accno_int }
+ }
+ \\[1em]
+ }
+ }
\end{tabbing}
}
-\NewDocumentCommand\@SetAbstractSupervisorBlock{}{% revised 2023/06/23
- \setcounter{supno}{1}
- \setlength{\parindent}{0pt}
- \par\bigskip\noindent
- \whiledo{\value{supno}<\value{supcnt}}{%
- Thesis supervisor: \csname sup@\thesupno\endcsname\par
- Title: \csname supdep@\thesupno\endcsname\par\medskip
- \addtocounter{supno}{1}%
- }% end whiledo
- Thesis supervisor: \csname sup@\thesupno\endcsname\par
- Title: \csname supdep@\thesupno\endcsname\ignorespaces
-}
+\msg_new:nnnn {\ClassName} {weird_sigsize}
+ { \SignatureBlockSize\ expects\ a\ font-sizing\ command,\ such\ as\ \small,\ \footnotesize,\ etc.}{You\ used\ a\ weird\ input\ value\ here.\ If\ you\ did\ so\ deliberately,\ try\ continuing.}
+\msg_new:nnnn {\ClassName} {no_acceptor}
+ { Missing\ acceptor!\ You\ must\ issue\ the\ \Acceptor{name}{department}{title}\ command. }{
+ You\ MUST\ issue\ the\ \Acceptor{name}{department}{title}\ command\ after\ \string\begin{document}\ and\ before\ \string\maketitle.}
+\msg_new:nnnn {\ClassName} {no_thesis_date}
+ { Missing\ thesis\ date!\ You\ must\ issue\ the\ \ThesisDate{Date\ thesis\ is\ submitted}\ command.}{
+ You\ MUST\ issue\ the\ \ThesisDate{Date thesis is submitted}\ command\ after\ \string\begin{document}\ and\ before\ \string\maketitle.}
-%%%%%%%%%%%%%%%%%%% Copyright related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% If for some reason you don't want a warning when you omit \Acceptor
+\NewDocumentCommand\SuppressAcceptorError{}
+ {
+ \msg_redirect_name:nnn { \ClassName } { no_acceptor } { none }
+ }
-\ExplSyntaxOn
-\newif\ifmit@cclicense\mit@cclicensefalse
-\NewDocumentCommand\CClicense{m m}{%
- \def\CClicensetext{\hrefurl{#2}{\ignorespaces#1}}% #1 - text, #2 - url
- \def\CCname{#1}%
- \def\CCurl{#2}% only for backward compatibility
- \mit@cclicensetrue
- \cs_if_exist:NT \pdfmeta_xmp_add:n {%
- \pdfmeta_xmp_add:n {<xmpRights:WebStatement>#2</xmpRights:WebStatement>}
- }
+%%%%%%%%%% End Signature Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%% Copyright Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Directly add the xmp property that shows work is copyrighted. See l3pdfmeta.pdf.
+% This is not automatic with \DocumentMetadata. "True" must be capitalized.
+%
+\cs_if_exist:NTF \pdfmeta_xmp_add:n {\pdfmeta_xmp_add:n{<xmpRights:Marked>True</xmpRights:Marked>}}{}
+
+\tl_new:N \g_copyright_ccname_tl
+\tl_new:N \g_copyright_cclicensetext_tl
+\tl_new:N \g_copyright_copyrightlicencse_tl
+\tl_new:N \g_copyright_pdfrightstext_tl
+\tl_new:N \g__copyright_crwords_tl_
+\tl_new:N \g__copyright_mitpermissionlast_tl
+
+\tl_new:N \g_copyright_mitpermission_tl
+\tl_gset:Nn \g__copyright_mitpermissionlast_tl {to\ MIT\ a\ nonexclusive,\ worldwide,\ irrevocable,\ royalty-free\ license\ to\ exercise\ any\ and\ all\ rights\ under\ copyright,\ including\ to\ reproduce,\ preserve,\ distribute\ and\ publicly\ display\ copies\ of\ the\ thesis,\ or\ release\ the\ thesis\ under\ an\ open-access\ license.}
+
+\bool_new:N \g__cclicense_tf_bool
+\bool_gset_false:N \g__cclicense_tf_bool
+
+\NewDocumentCommand\CClicense{mm}{
+ \__copyright_licensedata:nn {#1}{#2}
+% \def\CCurl{ \tl_trim_spaces:n {#2} }% for backward compatibility with v1.05, if necessary
}
-\ExplSyntaxOff
+\cs_new_protected:Nn \__copyright_licensedata:nn
+ {
+ \tl_gset:Nf \g_copyright_cclicensetext_tl {\hrefurl{ \tl_trim_spaces:n {#2} }{ \tl_trim_spaces:n {#1} } }% #1 - text, #2 - url
+ \tl_gset:Nx \g_copyright_ccname_tl { \tl_trim_spaces:n {#1} }
+ \bool_gset_true:N \g__cclicense_tf_bool
+ \cs_if_exist:NT \pdfmeta_xmp_add:n {
+ \pdfmeta_xmp_add:n {<xmpRights:WebStatement>#2</xmpRights:WebStatement>}
+ }
+ \msg_note:nnx {\ClassName} {cclicense} { \text_expand:n {\g_copyright_ccname_tl} }
+ }
+\msg_new:nnn {\ClassName} {cclicense} { Using\ Creative\ Commons\ License\ #1.}
-%%%%%%%%%%%%%%%%%%% Create titlepage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% End Copyright Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\MIT{MASSACHUSETTS INSTITUTE OF TECHNOLOGY}
-\RenewDocumentCommand\maketitle{s}{%
+%%%%%%%%%% Title page Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\RenewDocumentCommand{\title}{m}
+ {
+ \__mitthesis_title:n { #1 }
+ \hypersetup{
+ pdftitle={\g_mitthesis_title_tl},
+ }
+ }
%
- \ifdefined\@DegreeMonth\else\ClassError{\ClassName}{Missing degree date!}{%
- You must issue the \DegreeDate{month}{year} command between \begin{document} and \maketitle}%
- \fi
+\tl_new:N \g_mitthesis_title_tl
%
- \ifmit@cclicense
- \def\CopyrightLicense{This work is licensed under a \mbox{\CClicensetext} license.\par\MITpermission}% add mbox 2023/06/23
- \typeout{^^JUsing Creative Commons License \CCname^^J}
- \def\PDFRightsText{This work is licensed under a \CCname\ license. \MITpermission}% for use in metadata
- \else
- \def\CopyrightLicense{All rights reserved.\par\MITpermission}
- \def\PDFRightsText{All rights reserved. \MITpermission}% for use in metadata
- \fi
- \ifnum\value{authorcnt}>1
- \def\CRWords{The authors hereby grant}\else\def\CRWords{The author hereby grants}
- \fi
- \def\MITpermissionLast{to MIT a nonexclusive, worldwide, irrevocable, royalty-free license to exercise any and all rights under copyright, including to reproduce, preserve, distribute and publicly display copies of the thesis, or release the thesis under an open-access license.}%
- \IfBooleanTF{#1}{\def\MITpermission{\relax}}{\def\MITpermission{\CRWords\space\MITpermissionLast}}%
+\cs_new_protected:Nn \__mitthesis_title:n
+ {
+ \tl_gset:Nn \g_mitthesis_title_tl { \tl_trim_spaces:n {#1} }
+ }
+
+\tl_new:N \g_titlepage_institution_name_tl
+\tl_gset:Nn \g_titlepage_institution_name_tl {Massachusetts\ Institute\ of\ Technology}
+\cs_new:Npn \Institution #1 { \tl_gset:Nn \g_titlepage_institution_name_tl {\tl_trim_spaces:n #1} }
+
+
+\RenewDocumentCommand\maketitle{s}{%
+ \cs_if_exist:NTF \DegreeMonth { \scan_stop: } { \msg_error:nn {\ClassName} {no_degree_date} }% msg defined in degree-date section
+%
+ \bool_if:NTF \g__cclicense_tf_bool {
+ \tl_gset:Nn \g_copyright_copyrightlicencse_tl
+ {This\ work\ is\ licensed\ under\ a\ \mbox{\g_copyright_cclicensetext_tl}\ license.\par\g_copyright_mitpermission_tl}
+ \tl_gset:Nn \g_copyright_pdfrightstext_tl
+ {This\ work\ is\ licensed\ under\ a\ \g_copyright_ccname_tl\ license.\ \g_copyright_mitpermission_tl}
+ }{
+ \tl_gset:Nn \g_copyright_copyrightlicencse_tl
+ {All\ rights\ reserved. \par\g_copyright_mitpermission_tl}
+ \tl_gset:Nn \g_copyright_pdfrightstext_tl
+ {All\ rights\ reserved.\ \g_copyright_mitpermission_tl}
+ }
+ \int_compare:nNnTF {\g_author_authorcnt_int} > {1}
+ {
+ \tl_gset:Nn \g__copyright_crwords_tl_ {The\ authors\ hereby\ grant}
+ }
+ {
+ \tl_gset:Nn \g__copyright_crwords_tl_ {The\ author\ hereby\ grants}
+ }
+ \IfBooleanTF{#1}{%
+ \tl_gset:Nn \g_copyright_mitpermission_tl {\scan_stop:}
+ }{
+ \tl_gset:Nn \g_copyright_mitpermission_tl {\g__copyright_crwords_tl_\ \g__copyright_mitpermissionlast_tl}
+ }
%
\clearpage
\thispagestyle{empty}%
\phantomsection\addcontentsline{toc}{chapter}{\protect\textbf{Title page}}%
- {\centering\vbox to \vsize{% vbox to prevent signature block from breaking across page. Remove if necessary.
- \setlength{\parskip}{0.5\baselineskip plus 2pt minus 2pt}\setlength{\parindent}{0pt}%
- {\Large\textbf{\@title}\par}%
- \@AuthorBlock
- \par
- \@DegreeBlock
- at the\par
- \MIT\par
- \@DegreeMonth\space\@DegreeYear
- \MonthCheck{\@@DegreeMonth}{%
- \ClassError{\ClassName}{Acceptable months for the degree date are February, May, June, and September}{Change %
- the month of your degree date to one of February, May, June, or September.}%
- }%
- \par
- \copyright\space\@DegreeYear\space\@CopyrightAuthor. \CopyrightLicense
- \par
- \vskip\baselineskip
- %
- \@SetSignatureBlock
- \vfill
- }}%
- \newpage
+ {\centering \vbox_to_ht:nn { \vsize }% to prevent signature block from breaking across page
+ {
+ \setlength{\parskip}{0.5\baselineskip plus 2pt minus 2pt}\setlength{\parindent}{0pt}%
+ {\Large\textbf{\g_mitthesis_title_tl}\par}
+ \__author_block:
+ \par
+ \__degree_block:
+ at\ the\par
+ \text_uppercase:n { \g_titlepage_institution_name_tl }\par
+ \DegreeMonth\ \DegreeYear
+ \par
+ \copyright\space\DegreeYear\space\CopyrightAuthor\@.\c_space_token \g_copyright_copyrightlicencse_tl % In case name ends with III, IV, V,...
+ \par
+ \skip_vertical:n {\baselineskip}
+ %
+ \__signature_block:
+ \vfill % to avoid overstretched glue
+ }
+ }%
+ \hypersetup{
+ pdfcopyright={Copyright\ ©\ \DegreeYear\ by\ \CopyrightAuthor.\ \g_copyright_pdfrightstext_tl},
+ pdfauthor={\g__author_pdfca_tl},
+ pdfcaptionwriter = {\g__author_pdfca_tl},
+ }
+ \cleardoublepage
}
-%%%%%%%%%%%%%%%%%%% Create abstract page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% End title page module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%% Abstract page Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RenewDocumentEnvironment{abstract}{+b}{%
+% to change abstract name, follow either of these approaches in your preamble:
+% \RenewExpandableDocumentCommand\abstractname{}{Summary}
+% \renewcommand\abstractname{Summary}
+
+\RenewDocumentEnvironment{abstract}{+b}{
\newpage
- \phantomsection\addcontentsline{toc}{chapter}{\protect\textbf{Abstract}}%
+ \phantomsection\addcontentsline{toc}{chapter}{\protect\textbf{\abstractname}}
\begin{center}
- {\large{\textbf{\@title}}\par}
+ {\large{\textbf{\g_mitthesis_title_tl}}\par}
\setlength{\parskip}{0.5\baselineskip plus 2pt minus 2pt}
- \@AbstractAuthorBlock
+ \__author_abstractblock:
\par
- \@AbstractDegreeBlock
+ \__degree_abstractblock:
\end{center}
- \vskip\baselineskip
- \textbf{ABSTRACT}\par\vskip0.5em
- \ignorespaces#1\ignorespaces
- \ifblank{#1}{\typeout{Missing abstract!} MISSING ABSTRACT!}{\relax}
-}{%
- \@SetAbstractSupervisorBlock
- \newpage
- \ignorespacesafterend
+ \skip_vertical:n {\baselineskip}
+ \textbf{ \text_uppercase:n {\abstractname} }\par
+ \skip_vertical:n { 0.5em }
+ \tl_trim_spaces:n {#1}
+ \tl_if_blank:nT {#1} { MISSING\ ABSTRACT! \msg_error:nn { \ClassName } { missing_abstract } }
+}{
+ \__supervisor_abstractblock:
+ \cleardoublepage
}
+\msg_new:nnnn {\ClassName} { missing_abstract } {Missing\ Abstract!! } { No\ file\ was\ input\ for\ the\ abstract.\ You\ need\ to\ do\ \string\input{abstract.tex}.}
-%%%%%%% A nomenclature environment, if needed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% End abstract page Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%\debug_off:n {all}
+\ExplSyntaxOff
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%% End title and abstract page codes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%% A nomenclature environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecommand{\nomname}{Nomenclature}
\newlength\nomenwidth
\newlength\savitemsep
-\makeatletter
+% nomenclature entries
\NewDocumentCommand\entry{m m}{%
- \ifblank{#2}{%
- \ClassWarning{\ClassName}{The command \protect\entry requires two arguments. To obtain a subheading, use \protect\EntryHeading}
- \itemsep3\p@ plus 1\p@ minus 1\p@%
- \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\@itempenalty=1000%
- }{%
- \item[#1\hfill]#2%
- \@itempenalty=-\@lowpenalty%
- }%
+ \item[#1\hfill]#2%
+ \@itempenalty=-\@lowpenalty
}
-% A separate command command for nomenclature subheadings
+% nomenclature subheadings
\NewDocumentCommand\EntryHeading{m}{%
- \itemsep3\p@ plus 1\p@ minus 1\p@%
- \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\@itempenalty=1000%
+ \itemsep3\p@ plus 1\p@ minus 1\p@
+ \goodbreak\item[\itshape#1\hfill]\setlength\itemsep\savitemsep\@itempenalty=1000
}
-\makeatother
%
% Increase first optional argument to a dimension > 2em if wide entries cause undesired misalignment of columns.
% Second optional argument can be used to rename the environment, e.g., to List of Symbols.
+% Third optional argument selects section-level or chapter-level style for the nomenclature list.
\NewDocumentEnvironment{nomenclature}{O{2em} O{\nomname} O{section}}{%
\setlength\columnsep{2em}
\setlength{\nomenwidth}{#1}
@@ -738,7 +960,7 @@
}%
}{\end{list}\ignorespacesafterend}
-
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput