-
Notifications
You must be signed in to change notification settings - Fork 1
/
mc2025.cls
307 lines (264 loc) · 11.5 KB
/
mc2025.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
%%% CLASS DECLARATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mc2025}[2024/01/10 M&C 2025 Full Summary Template]
%%% Load BASE CLASS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\LoadClass[twoside,fleqn,letterpaper,11pt]{article}
\typeout{Loading M&C 2025 document class: includes [twoside,fleqn,letterpaper]{article}}
% \usepackage[bottom]{footmisc} % Add the footmisc package for footnotes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define Required Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\RequirePackage{titling}
\RequirePackage{titlesec}
\usepackage{setspace}
\RequirePackage{ragged2e}
\RequirePackage{enumitem}
\RequirePackage{xstring}
\RequirePackage{amsmath}
\RequirePackage{graphicx}
\RequirePackage[letterpaper,margin=1in,headheight=0.5in, includefoot]{geometry} % Set margins
\RequirePackage{newtxtext} % Turn on Times-New-Roman replaces times and mathpmtx
\RequirePackage{newtxmath} % math fonts for newtx
\RequirePackage[hidelinks]{hyperref}
\RequirePackage[nameinlink,capitalize,noabbrev]{cleveref}
\RequirePackage[font=normalsize,
labelfont=bf,
textfont=bf,
labelsep=period]{caption}
\RequirePackage{authblk}
\RequirePackage{apptools}
\RequirePackage{appendix}
\RequirePackage{ifpdf}
\ifpdf
\RequirePackage{epstopdf} % pdflatex compatibility
\pdfadjustspacing=1
\fi
\renewcommand{\footnoterule}{%
\vspace*{34pt} % Adjust the vertical space as needed
\hrule width 0.5\columnwidth%
\vspace*{18pt} % Adjust the vertical space as needed
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define Custom Commands and Class Errors for Users
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define addAuthor command and setup error handling
\newif\if@authorsdefined
\@authorsdefinedfalse
\newif\if@correspondingauthordefined
\@correspondingauthordefinedfalse
\newcommand\addAuthor[3][]{
\@authorsdefinedtrue
%\let\oldtextsuperscript\textsuperscript
%\renewcommand{\textsuperscript}[1]{$^{\mathbf{#1}}$}
\if\relax\detokenize{#1}\relax
\author[#3]{\protect\noexpandarg{\protect\StrSubstitute{#2}{ }{\nobreakspace}}}
\else
\if@correspondingauthordefined
\ClassError{mc2025}{Only one corresponding author is allowed}{remove [] from addAuthor}
\else
\author[#3,\protect\footnotemark]{\protect\noexpandarg{\protect\StrSubstitute{#2}{ }{\nobreakspace}} \protect\blfootnote{ #1}}
\fi
\@correspondingauthordefinedtrue
\fi
%\renewcommand{\textsuperscript}[1]{\oldtextsuperscript{#1}}
}
% Define addAffiliation command and setup error handling
\newif\if@affilsdefined
\@affilsdefinedfalse
\newcommand{\addAffiliation}[2]{
\affil[#1]{\protect\StrSubstitute{#2}{ }{\nobreakspace}}
\@affilsdefinedtrue
}
%Define Abstract command and error handling
\newif\if@abstractdefined
\@abstractdefinedfalse
\def\@abstract{\@empty}
\newcommand{\Abstract}[1]{\def\@abstract{#1}\@abstractdefinedtrue}
%Define keywords command and error handling
\newif\if@keywordsdefined
\@keywordsdefinedfalse
\def\@keywords{\@empty}
\newcommand{\keywords}[1]{\def\@keywords{#1}\@keywordsdefinedtrue}
%Define shortTitle command and error handling
\newif\if@shortTitledefined
\@shortTitledefinedfalse
\def\@shortTitle{\@empty}
\newcommand{\shortTitle}[1]{\def\@shortTitle{#1}\@shortTitledefinedtrue}
%Define Author Header command and error handling
\newif\if@authorHeaddefined
\@authorHeaddefinedfalse
\def\@authorHead{\@empty}
\newcommand{\authorHead}[1]{\def\@authorHead{#1}\@authorHeaddefinedtrue}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Font size definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\Large{\@setfontsize\Large{14pt}{16.1pt}} % For title
\renewcommand\large{\@setfontsize\large{12pt}{13.8pt}} % For section headings
\renewcommand\normalsize{\@setfontsize\normalsize{11pt}{12.65pt}}
\renewcommand\small{\@setfontsize\small{10pt}{11.5pt}} % For references and header/footer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Formatting of Preamble (Title, authors, institution, \maketitle)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand\Authfont{\bfseries\normalsize} %Set font styles for authors
\renewcommand\Affilfont{\normalfont} %Set font styles for affiliations
\renewcommand\Authand{, } %remove word "and" when 2 authors
\renewcommand\Authands{, } %remove word "and" when 3 or more authors
\renewcommand\AB@affilsepx{; \protect\Affilfont} % Set affiliation separator to ;
\renewcommand\AB@authnote[1]{\textsuperscript{\normalfont\bfseries#1}}
% Change how title, authors, and affiliations are displayed
\renewcommand{\@maketitle}
{
\newpage
\null
\let\footnote\thanks
% Define custom margins for the first page only
\begin{center}%
%\vspace{-0.75in}
\vspace{-20pt}
{\normalfont\Large\bfseries\begin{tabular}[t]{c}\@title\end{tabular}}%
\vspace{7pt} % Space after title
\if@authorsdefined
\if@affilsdefined
{\begin{tabular}[t]{c}\@author\end{tabular}\par}%
%\vspace{6pt} % Space after authors
\else
\ClassError{mc2025}{No author affiliations have been defined}{Please use the addAffiliation command before begin{document}}
\fi
\else
\ClassError{mc2025}{No authors have been defined}{Please use the addAuthor command before begin{document}}
\fi
\vspace{6pt} % Space after authors
\emph{[leave space for DOI, which will be inserted by ANS]}
\vspace{2pt} % Space after authors
\end{center}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Headers and such (fancyhdr)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument{
% Set PDF Metadata (this is really hard to do correctly)
% \hypersetup{
% pdfauthor={\authors},
% pdftitle={\@title},
% pdfsubject={M&C 2025},
% pdfkeywords={\@keywords},
% }
% Define custom margins for the first page only
\maketitle
\makeAbstract
\makeKeywords
% Clear footer and header
\fancyhf{}
\thispagestyle{empty}
\pagestyle{empty}
%Define Header and Footer on First Page
% \fancypagestyle{firstpage}{
% \fancyhead[C]{
% \small{\emph{
% M&C 2025 - The International Conference on Mathematics and Computational Methods Applied to Nuclear Science and Engineering $\cdot$ Denver, Colorado, USA $\cdot$ April 27 -- 30, 2025
% }}
% }
% \lfoot{}
% }
% \thispagestyle{firstpage}
% All other pages
% \pagestyle{fancy}
% \if@authorHeaddefined
% \fancyhead[CE]{{\small \@authorHead}}
% \else
% \ClassError{mc2025}{No short author header has been defined}{Please use the authHead command before begin{document}}
% \fi
% \if@shortTitledefined
% \fancyhead[CO]{{\small \@shortTitle}}
% \else
% \ClassError{mc2025}{No short title has been defined}{Please use the shortTitle command before begin{document}}
% \fi
% \rfoot{\small \thepage/\pageref*{LastPage}}
% \lfoot{
% \footnotesize{\emph{
% M&C 2025 - The International Conference on Mathematics and Computational Methods Applied to Nuclear Science and Engineering $\cdot$ Denver, Colorado, USA $\cdot$ April 27 -- 30, 2025
% }}
% }
%%% Set miscellaneous page layout stuff
\justify
\renewcommand{\headrulewidth}{0pt} % No bars at header/footer
\urlstyle{rm}
\setlength{\parskip}{6pt} %Set space between paragraphs
% \setlength{\baselineskip}{12pt} % Set the baseline skip to achieve single spacing
\setlength\parindent{0pt} %Remove indentation, must be called after \justify
\setlist{nolistsep}
\renewcommand{\thetable}{\Roman{table}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Section title definitions and formatting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \renewcommand{\section}{
% \renewcommand{\@seccntformat}[1]{\csname the##1\endcsname.\hspace{0.5em}}
% \@startsection{section}{1}{\z@}
% {1.0ex plus 1.0ex minus 0.2ex}{0.2ex plus 0.2ex}{\normalsize\bf\center}}
% \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}
% {1.0ex plus 1.0ex minus 0.2ex}{0.2ex plus 0.2ex}{\normalsize\bf}}
% \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}
% {1.0ex plus 1.0ex minus 0.2ex}{0.2ex plus 0.2ex}{\normalsize\bf}}
% %
% \renewcommand{\thesection}{\@arabic\c@section}
% \renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection}
% \renewcommand{\thesubsubsection}{\thesubsection.\@arabic\c@subsubsection}
% \titleformat{\section}{\normalfont\large\bfseries}{\thesection}{1em}{}
\titleformat{\section}{\bf\large\centering}{\IfAppendix{\MakeUppercase\appendixname \,}{}\thetitle.}{4ex}{\MakeUppercase}[]
\titleformat{\subsection}{\bf\large}{\thetitle.}{3ex}{}[]
\titleformat{\subsubsection}{\bf\large}{\thetitle.}{2ex}{}[]
% \titlespacing{\section}{0pt}{12pt plus 0pt minus 0pt}{12pt plus 0pt minus 0pt}
\titlespacing{\section}{0pt}{8pt plus 0pt minus 0pt}{6pt plus 0pt minus 0pt}
\titlespacing{\subsection}{0pt}{6pt plus 0pt minus 0pt}{6pt plus 0pt minus 0pt}
\titlespacing{\subsubsection}{0pt}{6pt plus 0pt minus 0pt}{6pt plus 0pt minus 0pt}
% \titlespacing{\subsection}{0pt}{12pt plus 0pt minus 0pt}{12pt plus 0pt minus 0pt}
% \titlespacing{\subsubsection}{0pt}{12pt plus 0pt minus 0pt}{12pt plus 0pt minus 0pt}
\renewcommand{\refname}{REFERENCES}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Miscellaneous Custom Commands used in this Class file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\blfootnote[1]{%
\begingroup
\fontsize{10pt}{14pt}\selectfont % Font size 10pt, line spacing exactly 14pt
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
\newcommand{\makeAbstract}{
\if@abstractdefined
\renewenvironment{abstract}{
\centering
\setlength{\parskip}{18pt} % Space before the abstract
\large\textbf{ABSTRACT}
\vspace{0.5em}
\begin{list}{}
{\setlength{\leftmargin}{0.5in}
\setlength{\rightmargin}{0.5in}
\setlength{\topsep}{0in}\small}
\item
}{\end{list}}
\begin{abstract}
\justify
\noindent
\@abstract
\end{abstract}
\else
\ClassError{mc2025}{No abstract has been defined}{Please use the abstract command before begin{document}}
\fi
}
\newcommand{\makeKeywords}{
\if@keywordsdefined
\begin{raggedright}
\begin{list}{}
{\setlength{\leftmargin}{0.5in}
\setlength{\rightmargin}{0.5in}\small}
\item[] \ignorespaces \emph{Keywords:} \upshape \@keywords
\end{list}
\end{raggedright}
\else
\ClassError{mc2025}{No keywords have been defined}{Please use the keywords command before begin{document}}
\fi
}