-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuperfri.cls
394 lines (331 loc) · 9.59 KB
/
superfri.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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
%% Class file of
%% ``Supercomputing Frontiers and Innovations. An International Journal''
%% http://superfri.org/.
%% Please do not change contents of class file when preparing your article.
%% With any questions and suggestions regarding this file please contact Technical Editor.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{superfri}
\LoadClass[twoside, 11pt, a4paper]{article}
\usepackage[english]{babel}
%\usepackage[unicode=true,linktocpage=true]{hyperref}
%\usepackage{hyperref}
\usepackage{url}
% --- font size ---
\renewcommand{\Large}{\fontsize{14pt}{19.6pt}\selectfont} % title, section
\renewcommand{\large}{\fontsize{12pt}{16.8pt}\selectfont} % authors, subsection, subsubsection
\renewcommand{\footnotesize}{\fontsize{9pt}{12.6pt}\selectfont} % abstract, footnotes
\renewcommand{\normalsize}{\fontsize{11pt}{15.4pt}\selectfont} % text, captions, bibliography, thanx
\renewcommand{\small}{\fontsize{10pt}{14pt}\selectfont} % code
% --- counting different objects ---
\usepackage{totcount}
\regtotcounter{table}
\regtotcounter{figure}
\usepackage{graphicx, epstopdf}
\graphicspath{{pic/}}
\usepackage{indentfirst}
\usepackage{enumitem, changepage, fancyvrb}
% --- space between cite elements ---
\usepackage[space]{cite}
%\usepackage{amsfonts, amsmath, amssymb, amsthm}
%\usepackage{showframe} % show all margins for debugging
% --- enumeration with reduced separation ---
\let\oldenumerate\enumerate
\let\endoldenumerate\endenumerate
\def\enumerate{% FIXME: add support of optional arguments
\oldenumerate[topsep=0pt, itemsep=0pt, parsep=0pt, widest=9, leftmargin=7mm]
}
\def\enumerateparen{% FIXME: delete this one if the trick with enumerate works
\oldenumerate[topsep=0pt, itemsep=0pt, parsep=0pt, label=\arabic*), widest=9, leftmargin=7mm]
}
\let\endenumerateparen\endoldenumerate
% --- article classification ---
\let\@classification\@empty
\def\classify#1{\def\@classification{#1}}
% --- authors ---
\renewcommand{\and}{%
\gdef\multi@uthor{}%
\leavevmode%
\unskip, %
}
\newcommand{\authorsplural}{%
\ifx \multi@uthor \undefined%
Author%
\else%
Authors%
\fi{}%
}
% --- orcid ---
\newcommand{\orcidID}[1]{ \href{https://orcid.org/#1}{\includegraphics[scale=0.1]{orcid}}}
% --- title ---
\renewcommand{\maketitle}{%
\ifx \@classification \@empty%
\vspace{10pt} % empty line instead of empty classification
\else%
{\large{\begin{flushleft}\textbf{\@classification}\end{flushleft}}}%
\fi%
{\noindent\Large\raggedright\textbf{\@title}\par}% the title itself
{\noindent{\begin{flushleft}\large\textbf{\textit{\@author}}\end{flushleft}}}% authors
{\noindent\footnotesize\copyright{} The \authorsplural{} \the\year. This paper is published with open access at SuperFri.org}
\vskip 12pt%
}
% --- section numbering ---
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\hspace{0.7em}}
% --- disabling widows and orphans ---
\widowpenalty=10000 % on the first line of a paragraph
\clubpenalty=10000 % on the last line of a paragraph
\usepackage{ifthen,latexsym}
\normalsize
\usepackage[margin=2.5cm]{geometry}
% --- itemize with reduced item separation ---
\let\olditemize\itemize
\let\endolditemize\enditemize
\def\itemize{
\olditemize[topsep=0pt, itemsep=0pt, parsep=0pt]
}
% --- paragraph parameters ---
\parindent=7mm
\parskip=0mm
\leftskip=0mm
\rightskip=0mm
% --- vertical skips in display and inline equations ---
\abovedisplayskip=12pt plus 3pt minus 3pt
\belowdisplayskip=12pt plus 3pt minus 3pt
\abovedisplayshortskip=0pt plus 3pt
\belowdisplayshortskip=6pt plus 3pt
\pagestyle{empty}
% --- floats parameters ---
\setcounter{totalnumber}{4}
\setcounter{topnumber}{4}
\setcounter{bottomnumber}{4}
\renewcommand{\textfraction}{0.01}
\renewcommand{\topfraction}{0.99}
\renewcommand{\bottomfraction}{0.99}
\newcommand{\sectspacm}{\hspace*{-\medskipamount}}
\newcommand{\sectspacp}{\hspace*{\medskipamount}}
\renewcommand{\section}{%
\@startsection{section}{1}{0mm}{-\baselineskip}{0.5\baselineskip}{\normalfont\raggedright\Large\bf}%
}
\renewcommand{\subsection}{%
\@startsection{subsection}{2}{0mm}{-\baselineskip}{0.5\baselineskip}{\normalfont\raggedright\large\bf}%
}
\renewcommand{\subsubsection}{%
\@startsection{subsubsection}{3}{0mm}{-\baselineskip}{0.5\baselineskip}{\normalfont\raggedright\large\it}%
}
% --- theorem ---
\newcounter{theocounter}
\newenvironment{theorem}{%
\refstepcounter{theocounter}\par\addvspace{3mm}\noindent%
{\bf Theorem \thetheocounter.\ }%
}{%
\par\addvspace{3mm}%
}
% --- unnumbered theorem ---
\newenvironment{theorem*}{%
\refstepcounter{theocounter}\par\addvspace{3mm}\noindent%
{\bf Theorem.\ }\begin{it}%
}{%
\end{it}\par\addvspace{3mm}
}
% --- lemma ---
\newcounter{lemcounter}
\newenvironment{lemma}{%
\refstepcounter{lemcounter}\par\addvspace{3mm}\noindent
{\bf Lemma \thelemcounter.\ }%
}{%
\par\addvspace{3mm}%
}
% --- remark ---
\newcounter{remcounter}
\newenvironment{remark}{%
\refstepcounter{remcounter}\par\addvspace{3mm}\noindent
{\bf Remark \theremcounter.\ }%
}{%
\par\addvspace{3mm}%
}
% --- definition ---
\newcounter{defcounter}
\newenvironment{definition}{%
\refstepcounter{defcounter}\par\addvspace{3mm}\noindent
{\bf Definition \thedefcounter.\ }%
}{%
\par\addvspace{3mm}%
}
% --- example ---
\newcounter{examcounter}
\newenvironment{example}{%
\refstepcounter{examcounter}\par\addvspace{3mm}\noindent
{\bf Example \theexamcounter.\ }%
}{%
\par\addvspace{3mm}%
}
% --- proposition ---
\newcounter{propcounter}
\newenvironment{proposition}{%
\refstepcounter{propcounter}\par\addvspace{3mm}\noindent
{\bf Proposition \thepropcounter.\ }%
}{%
\par\addvspace{3mm}%
}
% --- corollary ---
\newcounter{corcounter}
\newenvironment{corollary}{%
\refstepcounter{corcounter}\par\addvspace{3mm}\noindent%
{\bf Corollary \thecorcounter.\ }%
}{%
\par\addvspace{3mm}%
}
% bibliography
\renewcommand{\@biblabel}[1]{#1.} % bibliography numbering
%Link to network resourse without BiBTeX.
%Usage \bibitem{id} ...., \link{your_url}.
\newcommand*{\link}[1]{\url{#1}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\CP}{\mathbb{C}}
\newcommand\Paragraph{\textsection}
\newcommand{\keywords}[1]{%
{\footnotesize\it Keywords:~#1.}%
}
\renewenvironment{abstract}{%
\footnotesize%
\begin{adjustwidth}{22mm}{0em}%
\setlength{\parindent}{2em}%
\hspace{2em}%
}{%
\end{adjustwidth}
}
\renewcommand\newblock{\hskip .11em plus .33em minus .07em}
\sloppy
\sfcode`\.=1000\relax
% above and below skips around floats
\setlength{\intextsep}{1em}
% --- captions ---
% subfigure captions
\usepackage{subcaption}
%\renewcommand\thesubfigure{\asbuk{subfigure}}
%\DeclareCaptionLabelFormat{rightparen}{#2)}
%\captionsetup[subfloat]{labelformat=rightparen}
\abovecaptionskip=0pt
\belowcaptionskip=0pt
\newlength{\@tblwid}
\setlength{\@tblwid}{10cm}
\renewcommand{\@makecaption}[2]{%
\def\@tabenvname{table}%
\ifx\@currenvir\@tabenvname%
% we're in a table environment
\vspace{\abovecaptionskip}%
\centering\parbox{\@tblwid}{%
{\flushleft\textbf{#1.} #2\par\vspace{2mm}}%
}
\vspace{\belowcaptionskip}%
\else%
% we're in a figure environment
\vspace{\abovecaptionskip}%
\sbox{\@tempboxa}{{#1. #2}}%
\ifdim \wd\@tempboxa >\hsize%
{\textbf{\small #1.} #2}%
\else%
\global\@minipagefalse%
\hbox to \hsize {\textbf{\hfil #1.} #2 \hfil}%
\fi%
\vspace{\belowcaptionskip}%
\fi%
}
% --- table ---
\newcommand{\tabref}[1]{Tab.~\ref{#1}} % quick table reference
\newsavebox{\@tblbox}
\newcommand{\tab}[3]{% label, caption, data
\begin{table}[h]%
\sbox{\@tblbox}{#3}% put the table to a box
\settowidth{\@tblwid}{\usebox{\@tblbox}}% measure box width
%\setlength{\@tblwid}{\linewidth}% measure box width
\caption{#2}%
\label{#1}%
\centering%
\usebox{\@tblbox}% output the box
\end{table}%
}
% --- figure ---
\newcommand{\figref}[1]{Fig.~\ref{#1}} % quick figure reference
\newcommand{\fig}[3]{% params, label, caption
\begin{figure}[h]%
\centering%
\includegraphics[#1]{#2}%
\caption{#3}%
\label{#2}%
\end{figure}%
}
% --- source code ---
\newcommand{\code}[4][\linewidth]{% width, params, label, caption
\begin{figure}[h]%
\centering%
\topsep=0pt%
\partopsep=0pt%
\begin{minipage}{#1}
{
\small\VerbatimInput[#2]{#3}
}%
\end{minipage}
\vskip 3pt
\caption{#4}%
\label{#3}%
\end{figure}%
}
% --- unnumbered source code ---
\newcommand{\codenonum}[3]{% params, label, caption
\begin{figure}[h]%
\centering%
\topsep=0pt%
\partopsep=0pt%
\begin{minipage}{\linewidth}
{
\small\VerbatimInput[#1]{#2}
}%
\end{minipage}
\vskip 3pt
#3%
\label{#2}%
\end{figure}%
}
% --- non-floating figure ---
\newcommand{\fignofloat}[3]{% params, label, caption
\center%
\includegraphics[#1]{#2}%
\caption{#3}%
\label{#2}%
}
\newcommand{\MakeUppercaseWithNewline}[1]{%
\begingroup
\let\SavedOrgNewline\\%
\DeclareRobustCommand{\\}{\SavedOrgNewline}%
\MakeTextUppercase{#1}%
\endgroup
}
\renewcommand\@makefntext[1]{%
\noindent\@makefnmark #1%
}
% --- acknowledgements ---
\newcommand\ack[1]{
\vspace{1em}
{\it
#1
}
}
% --- the date the paper was received by the editors ---
\newcommand\received[1]{
\begin{flushright}
{\it Received #1.}
\end{flushright}
}
\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}
%\renewcommand*{\thanks}[1]{\thefootnote{}\footnote{#1}}
\renewcommand\thanks[1]{\renewcommand*{\thefootnote}{\fnsymbol{footnote}}\footnote{#1}\addtocounter{footnote}{-1}
}
\newcommand\openaccess{%
\ack{This paper is distributed under the terms of the Creative Commons
Attribution-Non Commercial 3.0 License which permits non-commercial
use, reproduction and distribution of the work without further
permission provided the original work is properly cited.}%
}
% vim: syntax=tex