diff options
Diffstat (limited to 'macros/latex/contrib/mitthesis/mitthesis.cls')
-rw-r--r-- | macros/latex/contrib/mitthesis/mitthesis.cls | 237 |
1 files changed, 116 insertions, 121 deletions
diff --git a/macros/latex/contrib/mitthesis/mitthesis.cls b/macros/latex/contrib/mitthesis/mitthesis.cls index b98528e532..6cba02e334 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.06} - \def\versiondate{2023/08/29\space} + \def\versionno{1.07} + \def\versiondate{2023/09/04\space} %% %% Author: John H. Lienhard, V %% Department of Mechanical Engineering @@ -18,7 +18,7 @@ %% This class is compatible with either pdfLaTeX or LuaTeX. %% %% Use an up-to-date LaTeX distribution: TeX Live 2023 or later is strongly recommended! -%% All packages required by the class are in TeX Live and available on CTAN (https://ctan.org/). +%% All packages required by the class are in TeX Live and available from CTAN (https://ctan.org/). %% %% % ========================================================= @@ -53,33 +53,36 @@ \str_const:Nn \ClassName {mitthesis} \ExplSyntaxOff -\RequirePackage{iftex}[2019/11/07]% provides \ifpdftex, etc. - %%%%%%%%%%%%% Some compatibility for older latex distributions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \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}{% +\IfFormatAtLeastTF{2020/10/01}{% \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 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...}% } % 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 - \IfFormatAtLeastTF{2020/02/25}{% + \msg_new:nnn { \ClassName } { loading_hyperxmp } { pdfmanagement\ is\ not\ active.\ Will\ load\ hyperxmp\ instead. } + % As of 2021/07/23 we could instead use \IfPDFManagementActiveTF{true code}{false code} + \IfFormatAtLeastTF{2020/10/01}{ \bool_if:nTF { \bool_lazy_and_p:nn { \cs_if_exist_p:N \pdfmanagement_if_active_p: } { \pdfmanagement_if_active_p: } } - { \mit@pdfmanagementtrue } - { \mit@pdfmanagementfalse } - }{ \mit@pdfmanagementfalse } + { \scan_stop: } + { \RequirePackage{hyperxmp} + \msg_warning:nn { \ClassName } { loading_hyperxmp } + } + }{ + \RequirePackage{hyperxmp} + \msg_warning:nn { \ClassName } { loading_hyperxmp } + } \ExplSyntaxOff % Enable pre-2020/10 formats to access essential macros later moved into LaTeX kernel @@ -87,16 +90,6 @@ \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} - \else - \newcommand*\textcopyright{\Uchar"00A9} - \fi -\fi - %%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \IfFormatAtLeastTF{2022/11/01}{% @@ -112,7 +105,7 @@ \SetKeys[\ClassName]{fontset=defaultfonts}% \DeclareUnknownKeyHandler[\ClassName]{\relax}% suppress warning about unused keys \ProcessKeyOptions -}{% Compatibility code for distributions pre-2022/11 +}{% And more compatibility code for distributions pre-2022/11 \RequirePackage{kvoptions} \SetupKeyvalOptions{ family=\ClassName, @@ -146,13 +139,10 @@ \ProcessOptions \relax } - %%%%%%%%%%%%% Line numbering (class option) %%%%%%%%%%%%%%%%%%%%%%%%% -%%% Adjustments when lineno option is used \ifmit@lineno - \RequirePackage[mathlines]{lineno} - \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}} + \RequirePackage[mathlines]{lineno} \AtBeginDocument{\linenumbers} \fi @@ -162,7 +152,7 @@ %%%%%%%%%%%%% Patch table of contents, list of figures, and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% + \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 @@ -172,12 +162,12 @@ \patchcmd{\listoftables}{\chapter*{\listtablename}}{\chapter*{\listtablename}\addcontentsline{toc}{chapter}{\protect\textbf{\listtablename}}}{}{} -%%%%%%%%%%%%% Geometry, mathtools, design, graphics, bibliography, hyperrefs, bookmarks, footnotes %%%%%%%%%%%% +%%%%%%%%%%%%% Geometry, mathtools, graphics, design, fonts, hyperrefs, bookmarks, footnotes %%%%%%%%%%%%%%%%%%% \RequirePackage[letterpaper,top=1in,bottom=1in,left=1in,right=1in,marginparwidth=50pt,headsep=12pt,footskip=0.5in]{geometry} \RequirePackage{mathtools}% loads and extends amsmath; must load before hyperref and unicode-math -% + % To free \eqref from the normal font (i.e., for use section headings) \renewcommand{\eqref}[1]{\textup{\hbox{\m@th{(\ignorespaces\ref{#1}\unskip\@@italiccorr)}}}} % @@ -185,6 +175,10 @@ % \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} % \def\maketag@@@#1{\hbox{\m@th\normalfont#1}} +\RequirePackage{graphicx} + +%%%%%%%%%%%% Design options %%%%%%%%%%%%%%%%%%%%%%% + % the packages in mydesign should come before babel (which may be loaded by fontset) and before hyperref \ifmit@mydesign \IfFileExists{mydesign.tex}{\input{mydesign.tex}}{% @@ -193,53 +187,57 @@ https://ctan.org/tex-archive/macros/latex/contrib/mitthesis/MIT-thesis-template.}% }% \else - % options for xcolor - \ifpdftex - \def\MyColorOption{fixpdftex}\else - \ifluatex\def\MyColorOption{luatex}\else - \ifxetex\def\MyColorOption{xetex}\else - \def\MyColorOption{} - \fi - \fi - \fi - \RequirePackage[hyperref,\MyColorOption,dvipsnames,svgnames,x11names]{xcolor} + \RequirePackage[hyperref,dvipsnames,svgnames,x11names]{xcolor} % \RequirePackage{caption,subcaption} % \RequirePackage{titlesec} % these titlesec commands just automate the bold math in some headings (rest follows default styles) + % NOT every font includes a bold math version, so you may need to use other math macros in the headings to get bold math <== \titleformat{\section}{\mathversion{bold}\normalfont\Large\bfseries}{\thesection }{1em}{} \titleformat{\subsection}{\mathversion{bold}\normalfont\large\bfseries}{\thesubsection}{1em}{} \titleformat{\subsubsection}{\mathversion{bold}\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{} - % ==> NOT every font includes a bold math version, so you may need to use other math macros in the headings to get bold math <== +% + \AtBeginDocument{ + \hypersetup{ + linkcolor=Blue3,% color names from xcolor package + citecolor=Blue3, + urlcolor=violet, + filecolor=red, + } + \ifmit@lineno + \renewcommand{\linenumberfont}{\sffamily\tiny\color{violet}} + \fi + } \fi -%% Font loading %%%%%%%%%% +%%%%%%%%%%%% Font loading %%%%%%%%%%%%%%%%%%%%%%%% + +\RequirePackage{iftex}[2019/11/07]% provides \ifpdftex, etc. + \typeout{^^JFontset key is \mit@fontset.^^J} \IfFileExists{fontsets/\ClassName-\mit@fontset.tex}{% 2023/07/03 \input{fontsets/\ClassName-\mit@fontset.tex} }{% - \ClassWarning{\ClassName}{^^JFontset file \ClassName-\mit@fontset.tex not found, using default fonts.} - \ifpdftex - \typeout{^^JLoading Computer Modern text and math fonts (default for pdftex).^^J} - \RequirePackage[T1]{fontenc} - \RequirePackage{bm} - \else - \typeout{^^JLoading Latin Modern text and math fonts (default for unicode engines).^^J} - \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} - % suppress tiresome warnings about lack of integration between mathtools and unicode-math. - % Unicode-math loads fontspec package, but default fonts are not selected by fontspec in this case. - \fi + \ClassWarning{\ClassName}{^^JFontset file \ClassName-\mit@fontset.tex or subdirectory fontsets not found, will look for \mit@fontset.tex in your working directory.} + \IfFileExists{\mit@fontset.tex}{% 2023/08/30 + \input{\mit@fontset.tex} + }{ + \ClassWarning{\ClassName}{^^JFontset file \mit@fontset.tex not found, using default fonts. You may need to place the fontset file into your working directory.} + \ifpdftex + \typeout{^^JLoading Computer Modern text and math fonts (default for pdftex).^^J} + \RequirePackage[T1]{fontenc} + \RequirePackage{bm} + \else + \typeout{^^JLoading Latin Modern text and math fonts (default for unicode engines).^^J} + \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} + % suppress tiresome warnings about lack of integration between mathtools and unicode-math. + % Unicode-math loads fontspec package, but default fonts are not selected by fontspec in this case. + \fi + } } -\RequirePackage{graphicx} - -\ifmit@pdfmanagement - \ClassInfo{\ClassName}{pdfmanagement is defined. Will not load hyperxmp}% -\else - \ClassInfo{\ClassName}{pdfmanagement is not defined. Will load hyperxmp}% - \RequirePackage{hyperxmp} -\fi +%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \RequirePackage[psdextra]{hyperref} % the new pdf-management scheme loads the bookmarks package internally. @@ -249,21 +247,14 @@ \providecommand\hrefurl[2]{\href{#1}{#2}}% in case \DocumentMetadata has not been loaded \RequirePackage{doi} % create macro for hyperlinking doi numbers -% the user can override all these design choices in the preamble, -% or by using \AtBeginDocument{ \hypersetup{..} } in mydesign.tex +% the user can override alter these 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, @@ -276,10 +267,10 @@ pdfcontacturl={https://dspace.mit.edu/handle/1721.1/7582},% DSPACE@MIT theses page } -%%%%%%%%%%%%% Stuff related to PDF bookmarks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%% PDF bookmark strings %%%%%%%%%%%%%%%% -%%% Since \bm may be useful in headings, this fix will reduce frequency with which -%%% alternate pdfstrings must be given in revised section command as \section[pdfstring]{texstring} +%%% Since \bm may be useful in headings, use this fix to reduce frequency with which alternate +%%% bookmark strings must be given with commands such as \section{ \texorpdfstring{texstring}{pdfstring} } \pdfstringdefDisableCommands{% \def\bm#1#{\relax}% } @@ -300,8 +291,8 @@ \pdfstringdefDisableCommands{% \def\eqref#1{(\ref{#1})}% } -%%% 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 +%%% Let's make sure footnotes in section headings don't break pdf bookmarks. (Note: \footnote, as redefined below, is protected) +% \patchcmd{\section}{\sectionmark}{\let\footnote\@gobble\sectionmark}{}{}% <== not needed unless you implement running headers \pdfstringdefDisableCommands{% \def\footnote#1{}% } @@ -310,13 +301,11 @@ \ExplSyntaxOn %\debug_on:n {all} -%%%%%%%%%% Put comma between successive footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%% Commas 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -327,8 +316,7 @@ \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 \str_casefold:n {e} % not def'd until 2022/10/16, omit for backward compatibility \cs_generate_variant:Nn \tl_gremove_all:Nn {No} \cs_new_protected:Nn \__dd_setdates:nn { \tl_gset:Nn \g__dd_month_tl {#1} @@ -336,11 +324,12 @@ \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 } } +% { \str_casefold:e { \tl_to_str:N \g__dd_month_tl } } % not def'd until 2022/10/16 + { \str_lowercase:f { \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} } } + { \msg_error:nnn { \ClassName } { wrong_month } {#1} } } -\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.} +\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.} \cs_generate_variant:Nn \text_titlecase:n {o,V} \NewDocumentCommand\DegreeDate{mm}{% {month}{year} @@ -348,7 +337,7 @@ \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!}{ +\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}{ @@ -375,7 +364,7 @@ \NewDocumentCommand\Author{mm O{}O{}O{}O{} } { \tl_if_blank:nTF{#1}{ - \msg_error:nn {\ClassName} {blank_author} + \msg_error:nn { \ClassName } { blank_author } }{ \__author_data_add:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } } @@ -391,9 +380,9 @@ \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.}{% +\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.}{% +\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{}{ @@ -443,7 +432,7 @@ \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} + \msg_error:nn { \ClassName } { no_author } } {by\par \int_until_do:nNnn { \l__author_authorno_int } = { \g_author_authorcnt_int } { @@ -471,7 +460,7 @@ \par\medskip } } -\msg_new:nnnn {\ClassName} {no_author} +\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. } @@ -479,7 +468,7 @@ \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} + \msg_error:nn { \ClassName } { no_author } } {by\par \int_until_do:nNnn { \l__author_authorno_int } = { \g_author_authorcnt_int } { @@ -502,16 +491,16 @@ \NewDocumentCommand\Supervisor{mm}{ \tl_if_blank:nTF{#1}{ - \msg_error:nn {\ClassName} {blank_supervisor} + \msg_error:nn { \ClassName } { blank_supervisor } }{ - \__supervisor_data_add:nn { #1 } { #2 } + \__supervisor_data_add:nn {#1} {#2} } - \tl_if_blank:nTF{#2}{\msg_error:nn {\ClassName} {blank_supervisor_title}}{} + \tl_if_blank:nTF{#2}{\msg_error:nn { \ClassName } { blank_supervisor_title } }{} } -\msg_new:nnnn {\ClassName} {blank_supervisor} +\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} +\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.} @@ -529,7 +518,7 @@ \setlength{\parindent}{0pt} \par\bigskip \int_compare:nNnTF { \g_supervisor_supervisorcnt_int } = {0} { - \msg_error:nn {\ClassName} {no_supervisor} + \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 @@ -540,7 +529,7 @@ Title:\space \seq_item:cn { g_supervisor_title_seq } { \l__supervisor_supervisorno_int }\ignorespaces } } -\msg_new:nnnn {\ClassName} {no_supervisor} +\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. } @@ -560,22 +549,22 @@ \NewDocumentCommand\Acceptor{mmm}{ \tl_if_blank:nTF{#1}{ - \msg_error:nn {\ClassName} {blank_acceptor} + \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_warning:nn { \ClassName } { blank_acceptor_title }}{} } -\msg_new:nnnn {\ClassName} {blank_acceptor} +\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. }{ +\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} +\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 @@ -599,13 +588,13 @@ \NewDocumentCommand\Degree{mm} { \tl_if_blank:nTF {#1} { - \msg_error:nn {\ClassName} {blank_degree} + \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 } } + \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 } } @@ -615,9 +604,9 @@ \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.} +\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\ +\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 @@ -625,7 +614,7 @@ \cs_new:Nn \__degree_block: { \int_compare:nNnTF { \g_degree_degreecnt_int } = {0} { - \msg_error:nn {\ClassName} {no_degree} + \msg_error:nn { \ClassName } { no_degree } } \int_zero_new:N \l__degree_degreeno_int \int_incr:N \l__degree_degreeno_int @@ -653,7 +642,7 @@ } \text_uppercase:n {\seq_item:cn { g_degree_name_seq } { \l__degree_degreeno_int }}\par\medskip } -\msg_new:nnnn {\ClassName} {no_degree} +\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?} @@ -700,19 +689,19 @@ { \normalsize {} \small {} \footnotesize{} \scriptsize{} \tiny{} } { - \msg_error:nn {\ClassName} {weird_sigsize} + \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 + \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} + \msg_error:nn { \ClassName } { no_acceptor } } \tl_if_exist:NF \g_dd_thesisdate_tl { - \msg_error:nn {\ClassName} {no_thesis_date} + \msg_error:nn { \ClassName } { no_thesis_date } } \int_gzero_new:N \g__signature_autno_int \int_gzero_new:N \g__signature_supno_int @@ -746,12 +735,12 @@ } \end{tabbing} } -\msg_new:nnnn {\ClassName} {weird_sigsize} +\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} +\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} +\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.} @@ -796,9 +785,15 @@ \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} } + \cs_if_exist:NTF \msg_note:nnn % added to expl3 2021/05/18 + { + \msg_note:nnn { \ClassName } { cclicense} {#1} + } + { + \msg_log:nnn { \ClassName } { cclicense} {#1} + } } -\msg_new:nnn {\ClassName} {cclicense} { Using\ Creative\ Commons\ License\ #1.} +\msg_new:nnn { \ClassName } { cclicense } { Using\ Creative\ Commons\ License\ #1.} %%%%%%%%%% End Copyright Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -827,7 +822,7 @@ \RenewDocumentCommand\maketitle{s}{% - \cs_if_exist:NTF \DegreeMonth { \scan_stop: } { \msg_error:nn {\ClassName} {no_degree_date} }% msg defined in degree-date section + \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 @@ -876,7 +871,7 @@ } }% \hypersetup{ - pdfcopyright={Copyright\ ©\ \DegreeYear\ by\ \CopyrightAuthor.\ \g_copyright_pdfrightstext_tl}, + pdfcopyright={Copyright\ \DegreeYear\ by\ \CopyrightAuthor.\ \g_copyright_pdfrightstext_tl}, pdfauthor={\g__author_pdfca_tl}, pdfcaptionwriter = {\g__author_pdfca_tl}, } @@ -911,7 +906,7 @@ \__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}.} +\msg_new:nnnn { \ClassName } { missing_abstract } {Missing\ Abstract!! } { No\ file\ was\ input\ for\ the\ abstract.\ You\ need\ to\ do\ \string\input{abstract.tex}.} %%%%%%%%%% End abstract page Module %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |