lmcs.cls 23.4 KB
Newer Older
Christoph Rauch's avatar
Christoph Rauch committed
1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Sergey Goncharov's avatar
Sergey Goncharov committed
2
3
4
5
6
7
8
%% Modification log
%%
%% 2004/03/25 v0.1 based on amsart.cls, inspired by jair.sty 
%% 2004/09/01 v0.2 based on amsart.cls
%% 2004/10/12 v0.3 based on amsart.cls
%% 2004/12/16 v0.4 based on amsart.cls
%% 2005/01/24 v0.5 based on amsart.cls
Christoph Rauch's avatar
Christoph Rauch committed
9
%% 2006/01/18 v0.6 based on amsart.cls
Sergey Goncharov's avatar
Sergey Goncharov committed
10
%% 2006/07/24 v0.7 based on amsart.cls
Christoph Rauch's avatar
Christoph Rauch committed
11
12
13
14
15
16
17
18
%% 2009/05/25 v0.8 based on amsart.cls
%% 2011/04/23 v0.81 based on amsart.cls
%% 2013/02/05 v0.82 based on amsart.cls
%% 2013/09/20 v0.9 based on amsart.cls
%% 2015/03/27 v0.91 based on amsart.cls
%% 2018/06/11 v0.92 based on amsart.cls
%% 2019/01/07 v0.93 new header including paper number
%%
Sergey Goncharov's avatar
Sergey Goncharov committed
19
%%                 Juergen Koslowski, Stefan Milius
Christoph Rauch's avatar
Christoph Rauch committed
20
21
22
%%                 and the LMCS Layout editors
%%
%%    LMCS Layout Editors <lmcs-layout@lists.cs.fau.de>
Sergey Goncharov's avatar
Sergey Goncharov committed
23
24
25
26
27
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{lmcs}
Christoph Rauch's avatar
Christoph Rauch committed
28
29
30
31
              [2018/06/11 v0.91 LMCS Layout Editor Class]
% Do not pass any options to amsart to ensure a uniform look: always usletter,
% always 11pt. (see the options to \LoadClass below)
%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{amsart}}
Sergey Goncharov's avatar
Sergey Goncharov committed
32
33
34
\ProcessOptions\relax

\LoadClass[11pt,reqno]{amsart}
Christoph Rauch's avatar
Christoph Rauch committed
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
\RequirePackage{helvet,cclicenses}
% Do not pass options directly to the package to avoid option clashes
% if the user or some other package uses this package with different options.
\PassOptionsToPackage{shortlabels}{enumitem}
\PassOptionsToPackage{inline}{enumitem}
\RequirePackage{enumitem}
\setlist[enumerate]{font=\normalfont,labelindent=*,leftmargin=*,start=1}
\setlist[itemize]{labelindent=*,leftmargin=*}
\setlist[description]{labelindent=*,leftmargin=*,itemindent=-1 em}
\RequirePackage{microtype}
\RequirePackage{tikz}
\RequirePackage{color}
\RequirePackage{hyperref}
\RequirePackage{etoolbox}

% boot up hyperref. this needs to be done before \begin{document}
\AtEndPreamble{
\ifcsname hypersetup\endcsname%
\hypersetup{
    hidelinks,
    final,
}
\else
\fi
}

% set metadata. this needs to be done after \author which is after \begin{document}
\def\doHyperrefSetup{
\ifcsname hypersetup\endcsname%
\edef\andBackup{\and}
\def\and{, } % make authors comma separated in the pdf metadata
\hypersetup{
    pdftitle={\@title},
    pdfauthor={\authors},
    pdfkeywords={\ignorespaces\@keywords},
}%
\edef\and{\andBackup} % restore old definition
\else
\fi
}

Sergey Goncharov's avatar
Sergey Goncharov committed
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   		Use of this class, cf. also lmcs-smp.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This class builds upon the amsart class of AMS-LaTeX and requires use
% of LaTeX 2e. 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 		Start of the paper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \documentclass{lmcs} 
%
% without any options followed optionally by
%
% \usepackage{package1,package2,...}
%
% loading additional macro packages you may wish to use, (eg, xypic, etc.)
% (This also is the place to define further theorem-environments, in case
% those provided by default do not suffice, cf. below.)
%
% \begin{document}
% \title[short_title]{real title}
%
% and a list of author information of the form
%
% \author[short_author1]{Author 1}
% \address{address 1}
% \email{author1@email1}
% \thanks{thanks 1}
%
% \author[short_author2]{Author 2}
% \address{address 2}
% \email{author2@email2}
% \thanks{thanks 2}
%
% \author[short_author3]{Author 3}
% \address{address 3}
% \email{author3@email3}
% \thanks{thanks 3}
%
Christoph Rauch's avatar
Christoph Rauch committed
117
118
119
% The \author, \address and \email fields are mandatory.
%
% The \thanks fields are optional.  They appear
Sergey Goncharov's avatar
Sergey Goncharov committed
120
% in footnotes on the title page, the addresses and email information
Christoph Rauch's avatar
Christoph Rauch committed
121
% is relegated to the top of the article.  The optional arguments to
Sergey Goncharov's avatar
Sergey Goncharov committed
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
% the \title and \author macros determine a running head on the odd
% and even pages, respectively.
%
% Lists of keywords and phrases as well as an ACM Subject
% classification are mandatory; these appear in footnotes on the
% title page, preceeding any \thanks fields.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Body of the paper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% We encourage the use of LaTeX's crossreferencing capabilities with the
% \label and \ref commands, for sections, subsections, theorems etc., and
% displayed equations and figures.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 		Theorems, Definitions etc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The following theorem-like environments are available.  The
% numbering is consecutive within sections.
%
% thm   Theorem
% cor   Corollary
% lem   Lemma
% prop  Proposition
% asm   Asumption
%
% defi  Definition
% rem   Remark
% rems  Remarks (intended for use with itemized remarks)
% exa   Example
% exas  Examples (intended for use with itemized examples)
% conj  Conjecture
% prob  Problem
% oprob Open Problem
% algo  Algorithm
% obs   Observation
%
% If you require additional environments, you can add them before
% \begin{document} by means of
%
% \theoremstyle{plain}\newtheorem{env}[thm]{Environment}
%
% or
%
% \theoremstyle{definition}\newtheorem{env}[thm]{Environment}
%
% In the first case the font within the new environment will be italicised.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Proofs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Proofs start with the command \proof and should be ended by \qed,
% which provides an end-of-proof box at the right margin:
%
% \proof ... \qed
%
% In itemized or enumerated proofs the \qed command has to occur BEFORE 
% \end{itemize} or \end{enumerate} to ensure proper placement of the box:
%
% \proof
% \begin{itemize}
% \item[(1)] ...
% \item[(2)] ...
% ...
% \item[(n)] ... \qed
% \end{itemize}
%
% Similarly, the box may be used within theorem environments, when no
% explicit proof is given:
%
% \begin{thm} ... \qed \end{thm}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		Itemized or enumerated environments and proofs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% By default, the first item of an itemized (or enumerated) environment
% or proof appears inlined on the same line as the environment title.
% This can be prevented by placing \hfill before the itemization, e.g.:
%
% \begin{thm}\label{T:abc}\hfill
% \begin{itemize} ...
%
% \proof\hfill
% \begin{itemize} ...


%
%		End of the paper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Acknowledgements should be placed in a non-numbered section:
%
% \section*{Acknowledgement}
%
% The bibliography uses alpha.bst where references are built from the 
% authors' initials and the year of publication.  The use of bibtex
% for creating the bibliography is strongly encouraged.  Then the
% end of the paper takes the form
%
% \begin{thebibliography}{key}
% \end{thebibliography}
% \end{document}
%
% where ``key'' is the longest alphanumerical key expected to occur.
%
% Optionally, appendices can be inserted after the bibliography by
% means of
%
% \end{thebibliography}
% \appendix
% \section{} % Appendix A
% \section{} % Appendix B
% % etc.
% \end{document}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%                   actual macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Christoph Rauch's avatar
Christoph Rauch committed
246
% FIXME: does this cause problems?
Sergey Goncharov's avatar
Sergey Goncharov committed
247
248
\count255=\the\catcode`\@ \catcode`\@=11 \edef\catc@de{\the\count255}

Christoph Rauch's avatar
Christoph Rauch committed
249
250
251
252
253
\newenvironment{iteMize}[1]{\begin{enumerate}[#1]}{\end{enumerate}}
\newenvironment{desCription}{\begin{enumerate}[\hbox to8 pt{\hfill}]}{\end{enumerate}}
\newenvironment{desCriPtion}{\begin{enumerate}[\hbox to14 pt{\hfill}]}{\end{enumerate}}\newif\ifsuPer \suPertrue
\def\rsuper#1{\texorpdfstring{\ifsuPer${\,}^{\MakeLowercase #1}$\fi}{}}%
\def\lsuper#1{\texorpdfstring{\ \hskip-2 pt\ifsuPer\hbox to0 pt{\hss${}^{\MakeLowercase #1}\ $\fi}}{}}%
Sergey Goncharov's avatar
Sergey Goncharov committed
254
255
256
257

\def\titlecomment#1{\def\@titlecomment{#1}}
\let\@titlecomment=\@empty
\renewcommand{\sfdefault}{phv}
Christoph Rauch's avatar
Christoph Rauch committed
258
\renewcommand*\subjclass[2][2012]{%
Sergey Goncharov's avatar
Sergey Goncharov committed
259
260
261
  \def\@subjclass{#2}%
  \@ifundefined{subjclassname@#1}{%
    \ClassWarning{\@classname}{Unknown edition (#1) of ACM
Christoph Rauch's avatar
Christoph Rauch committed
262
      Subject Classification; using '2012'.}%
Sergey Goncharov's avatar
Sergey Goncharov committed
263
  }{%
Christoph Rauch's avatar
Christoph Rauch committed
264
    \@xp\let\@xp\subjclassname\csname subjclassname@2012\endcsname
Sergey Goncharov's avatar
Sergey Goncharov committed
265
266
267
  }%
}
\@namedef{subjclassname@1998}{1998 ACM Subject Classification}
Christoph Rauch's avatar
Christoph Rauch committed
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
\@namedef{subjclassname@2012}{2012 ACM CCS}

\def\ACMCCS#1{\def\@ACMCCS{#1}}
\let\@ACMCCS=\@empty
\def\ACMCCSname{2012 ACM CCS}
    \@xp\let\@xp\subjclassname\csname subjclassname@2012\endcsname

\def\amsclass#1{\def\@amsclass{#1}}
\let\@amsclass=\@empty
\def\amsclassname{2010 Mathematics Subject Classification}

\renewenvironment{abstract}{%
  \ifx\maketitle\relax
    \ClassWarning{\@classname}{Abstract should precede
      \protect\maketitle\space in AMS documentclasses; reported}%
  \fi
  \global\setbox\abstractbox=\vtop \bgroup
    \normalfont\Small
    \list{}{\labelwidth\z@
      \leftmargin3pc \rightmargin\leftmargin
      \listparindent\normalparindent \itemindent\z@
      \parsep\z@ \@plus\p@
      \let\fullwidthdisplay\relax
    }%
    \item[\hskip\labelsep\scshape\abstractname.]%
}{%
  \endlist\egroup
  \ifx\@setabstract\relax \@setabstracta \fi
}
Sergey Goncharov's avatar
Sergey Goncharov committed
297
298
299
300
\newcommand{\revisionname}{Revision Note}
\newbox\revisionbox
\newenvironment{revision}{%
  \ifx\maketitle\relax
Christoph Rauch's avatar
Christoph Rauch committed
301
    \ClassWarning{\@classname}{Revision should precede 
Sergey Goncharov's avatar
Sergey Goncharov committed
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
      \protect\maketitle\space in LMCS documentclasses; reported}%
  \fi
  \global\setbox\revisionbox=\vtop \bgroup
    \normalfont\Small
    \list{}{\labelwidth\z@
      \leftmargin3pc \rightmargin\leftmargin
      \listparindent\normalparindent \itemindent\z@
      \parsep\z@ \@plus\p@
      \let\fullwidthdisplay\relax
    }%
    \item[\hskip\labelsep\scshape\revisionname.]%
}{%
  \endlist\egroup
  \ifx\@setrevision\relax \@setrevisiona \fi
}
\def\@setrevision{\@setrevisiona \global\let\@setrevision\relax}
\def\@setrevisiona{%
  \ifvoid\revisionbox
  \else
    \skip@20\p@ \advance\skip@-\lastskip
    \advance\skip@-\baselineskip \vskip\skip@
    \box\revisionbox
    \prevdepth\z@ % because \revisionbox is a vtop
    \bigskip\hrule\medskip
  \fi
}
Christoph Rauch's avatar
Christoph Rauch committed
328
329
330
331
\def\@setACMCCS{%
  {\itshape\subjclassname:}\enspace\@ACMCCS\@addpunct.}
\def\@setamsclass{%
  {\itshape\amsclassname:}\enspace\@amsclass\@addpunct.}
Sergey Goncharov's avatar
Sergey Goncharov committed
332
\def\@setkeywords{%
Christoph Rauch's avatar
Christoph Rauch committed
333
  {\itshape \keywordsname:}\enspace\@keywords\@addpunct.}
Sergey Goncharov's avatar
Sergey Goncharov committed
334
335
336
337
338
\def\@settitlecomment{\@titlecomment\@addpunct.}
\def\@maketitle{%
  \normalfont\normalsize
  \let\@makefnmark\relax  \let\@thefnmark\relax
  \ifx\@empty\@date\else \@footnotetext{\@setdate}\fi
Christoph Rauch's avatar
Christoph Rauch committed
339
340
  \ifx\@empty\@ACMCCS\else \@footnotetext{\@setACMCCS}\fi
  \ifx\@empty\@amsclass\else \@footnotetext{\@setamsclass}\fi
Sergey Goncharov's avatar
Sergey Goncharov committed
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
  \ifx\@empty\@keywords\else \@footnotetext{\@setkeywords}\fi
  \ifx\@empty\@titlecomment\else \@footnotetext{\@settitlecomment}\fi
  \ifx\@empty\thankses\else \@footnotetext{%
    \def\par{\let\par\@par}\@setthanks\par}\fi
  \@mkboth{\@nx\shortauthors}{\@nx\shorttitle}%
  \global\topskip12\p@\relax % 5.5pc   "   "   "     "     "
  \topskip42 pt\@settitle
  \ifx\@empty\authors \else \@setauthors \fi
  \@setaddresses
  \ifx\@empty\@dedicatory
  \else
    \baselineskip18\p@
    \vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}%
      \global\dimen@i\prevdepth}\prevdepth\dimen@i
  \fi
  \endfront@text
  \bigskip\hrule\medskip
  \@setrevision
  \@setabstract
  \vskip-\bigskipamount
  \normalsize
  \if@titlepage
    \newpage
  \else
    \dimen@34\p@ \advance\dimen@-\baselineskip
    \vskip\dimen@\relax
  \fi
Christoph Rauch's avatar
Christoph Rauch committed
368
  \doHyperrefSetup
Sergey Goncharov's avatar
Sergey Goncharov committed
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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
}
\def\@setaddresses{\par
  \nobreak \begingroup
\footnotesize
  \def\author##1{\nobreak\addvspace\bigskipamount}%
  \def\\{\unskip, \ignorespaces}%
  \interlinepenalty\@M
  \def\address##1##2{\begingroup
    \par\addvspace\bigskipamount\noindent\narrower
    \@ifnotempty{##1}{(\ignorespaces##1\unskip) }%
    {\ignorespaces##2}\par\endgroup}%
  \def\curraddr##1##2{\begingroup
    \@ifnotempty{##2}{\nobreak\indent{\itshape Current address}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      ##2\par}\endgroup}%
  \def\email##1##2{\begingroup
    \@ifnotempty{##2}{\nobreak\indent{\itshape e-mail address}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      {##2}\par}\endgroup}%
  \def\urladdr##1##2{\begingroup
    \@ifnotempty{##2}{\nobreak\indent{\itshape URL}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      \ttfamily##2\par}\endgroup}%
  \addresses
  \endgroup
}
\copyrightinfo{}{}

\newinsert\copyins
\skip\copyins=3pc
\count\copyins=1000 % magnification factor, 1000 = 100%
\dimen\copyins=.5\textheight % maximum allowed per page

\renewcommand{\topfraction}{0.95}   % let figure take up nearly whole page
\renewcommand{\textfraction}{0.05}  % let figure take up nearly whole page

%% Specify the dimensions of each page

\setlength{\oddsidemargin}{.25 in}  %   Note \oddsidemargin = \evensidemargin
\setlength{\evensidemargin}{.25 in}
\setlength{\marginparwidth}{0.07 true in}
\setlength{\topmargin}{-0.7 in}
\addtolength{\headheight}{1.84 pt}
\addtolength{\headsep}{0.25in}
\addtolength{\voffset}{0.7 in}
\setlength{\textheight}{8.5 true in}  % Height of text (including footnotes & figures)
\setlength{\textwidth}{6.0 true in}   % Width of text line.
\setlength{\parindent}{20 pt}   % Width of text line.
Christoph Rauch's avatar
Christoph Rauch committed
417
% FIXME: do these cause problems?
Sergey Goncharov's avatar
Sergey Goncharov committed
418
419
420
421
422
423
424
425
\widowpenalty=10000
\clubpenalty=10000
\@twosidetrue \@mparswitchtrue \def\ds@draft{\overfullrule 5pt}
\raggedbottom

%% Pagestyle
%% Defines the pagestyle for the title page.

Christoph Rauch's avatar
Christoph Rauch committed
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
%% define metadata used for the doi
%% Usage: \lmcsdoi{volume}{issue}{papernumber}
\def\lmcsdoi#1#2#3{%
    \def\@lmcsvolume{#1}%
    \def\@lmcsissue{#2}%
    \def\@lmcspaper{#3}%
    \pgfmathparse{int(#1+2004)}
    \edef\@lmcsyear{\pgfmathresult}
    \renewcommand{\dOi}{\@lmcsvolume(\@lmcsissue:\@lmcspaper)\@lmcsyear}
\def\ps@headings{
\def\@oddhead{\scriptsize Vol.~\@lmcsvolume:\@lmcsissue\hfill{\scriptsize \shorttitle}\hfill\@lmcspaper:\thepage}%
\def\@evenhead{\scriptsize \@lmcspaper:\thepage\hfill {\scriptsize\sc \shortauthors{}} \hfill Vol.~\@lmcsvolume:\@lmcsissue}%
}
\pagestyle{headings}
}

\def\lmcsurl{https://lmcs.episciences.org/}
\def\dOi{{\color{red}Volume/Paper Nr.~missing}}
%% Usage: \lmcsheading{vol}{issue}{year}{pages}{subm}{publ}{rev}{spec_iss}{title}
Sergey Goncharov's avatar
Sergey Goncharov committed
445
446
\def\lmcsheading#1#2#3#4#5#6#7{\def\ps@firstpage{\let\@mkboth\@gobbletwo%
\def\@oddhead{%
Christoph Rauch's avatar
Christoph Rauch committed
447
\hbox{\fontencoding{T1}%
Sergey Goncharov's avatar
Sergey Goncharov committed
448
449
  \vbox to 30 pt{\scriptsize\vfill
    \hbox{\textsf{Logical Methods in Computer Science}\hfil}
Christoph Rauch's avatar
Christoph Rauch committed
450
451
452
%    \hbox{\textsf{Vol.~\doi, pp.\ 1--#2}}
    \hbox{\textsf{Volume~\@lmcsvolume, Issue~\@lmcsissue, \@lmcsyear, pp.\ \@lmcspaper:1--\@lmcspaper:#2}}
    \hbox{\textsf{\href{\lmcsurl}{\lmcsurl}}}
Sergey Goncharov's avatar
Sergey Goncharov committed
453
454
    \rlap{\vrule width\hsize depth .4 pt}}}\hfill
\raise 4pt
Christoph Rauch's avatar
Christoph Rauch committed
455
\hbox{\fontencoding{T1}%
Sergey Goncharov's avatar
Sergey Goncharov committed
456
  \vbox to 30 pt{\scriptsize\vfill
Christoph Rauch's avatar
Christoph Rauch committed
457
458
    \hbox{\textsf{#3}}
    \hbox{\textsf{#4}}}}\hfill
Sergey Goncharov's avatar
Sergey Goncharov committed
459
\raise 4pt
Christoph Rauch's avatar
Christoph Rauch committed
460
\hbox{\fontencoding{T1}%
Sergey Goncharov's avatar
Sergey Goncharov committed
461
  \vbox to 30 pt{\scriptsize\vfill
Christoph Rauch's avatar
Christoph Rauch committed
462
463
464
    \hbox to 94 pt{\textsf{Submitted\hfill #5}}
    \hbox to 94 pt{\textsf{Published\hfill #6}}
    #7}}}
Sergey Goncharov's avatar
Sergey Goncharov committed
465
466
467
\def\@evenhead{}\def\@evenfoot{}}%
\thispagestyle{firstpage}}

Christoph Rauch's avatar
Christoph Rauch committed
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
%% Creative Commons fonts %%

\DeclareRobustCommand{\crC}{%
  \ifmmode{\nfss@text{\text@cc}}\else\text@cc\fi}
\DeclareRobustCommand{\crCnd}{%
  \ifmmode{\nfss@text{\text@ccnd}}\else\text@ccnd\fi}
\DeclareRobustCommand{\crCby}{%
  \ifmmode{\nfss@text{\text@ccby}}\else\text@ccby\fi}
\DeclareRobustCommand{\crCnc}{%
  \ifmmode{\nfss@text{\text@ccnc}}\else\text@ccnc\fi}
\DeclareRobustCommand{\crCsa}{%
  \ifmmode{\nfss@text{\text@ccsa}}\else\text@ccsa\fi}
\renewcommand{\by}{\crCby}
\renewcommand{\bynd}{\crCby\crCnd}
\renewcommand{\byncnd}{\crCby\crCnc\crCnd}
\renewcommand{\bync}{\crCby\crCnc}
\renewcommand{\byncsa}{\crCby\crCnc\crCsa}
\renewcommand{\bysa}{\crCby\crCsa}
\renewcommand{\nd}{\crCnd}
\renewcommand{\ndnc}{\crCnd\crCnc}
\renewcommand{\nc}{\crCnc}
\renewcommand{\ncsa}{\crCnc\crCsa}
\renewcommand{\sa}{\crCsa}
%%%%%%%%%%%%

Sergey Goncharov's avatar
Sergey Goncharov committed
493
\def\endfront@text{%
Christoph Rauch's avatar
Christoph Rauch committed
494
495
496
497
498
499
500
\insert\copyins{\hsize\textwidth%
\fontsize{6}{7\p@}\normalfont\upshape%
\noindent%
\IfFileExists{./LMCS-logo.mf}{%
\hbox{\fontencoding{T1}%
\vbox{\fontsize{6}{8 pt}\baselineskip=6 pt\vss
\hbox{\hbox to 20 pt{\hfill}
Sergey Goncharov's avatar
Sergey Goncharov committed
501
          \textsf{LOGICAL METHODS}\hfil}
Christoph Rauch's avatar
Christoph Rauch committed
502
\hbox{\hbox to 20 pt{\font\logo=LMCS-logo\smash{\logo l}}
Sergey Goncharov's avatar
Sergey Goncharov committed
503
          \textsf{IN COMPUTER SCIENCE}}}}
Christoph Rauch's avatar
Christoph Rauch committed
504
505
506
507
508
509
510
\hfill\textsf{DOI:10.23638/LMCS-\dOi}
}{%
\vbox{\fontsize{6}{8 pt}\baselineskip=6 pt\vss%
\hbox{\textsf{Preprint submitted to}}
\hbox{\textsf{Logical Methods in Computer Science}}
}
}
Sergey Goncharov's avatar
Sergey Goncharov committed
511
512
%\hfill\textsf{\copyright\shortauthors}
\hfill
Christoph Rauch's avatar
Christoph Rauch committed
513
\hbox{\fontencoding{T1}%
Sergey Goncharov's avatar
Sergey Goncharov committed
514
  \vbox{\fontsize{6}{8 pt}\baselineskip=6 pt\vss
Christoph Rauch's avatar
Christoph Rauch committed
515
516
    \hbox{\textsf{\hspace{2 pt}\copyright\quad \shortauthors}\hfil}
    \hbox{\textsf{\crC\ \href{http://creativecommons.org/about/licenses}{Creative Commons}}\hfil}}}
Sergey Goncharov's avatar
Sergey Goncharov committed
517
518
519
\par\kern\z@}%
}

Christoph Rauch's avatar
Christoph Rauch committed
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
% If the logo is not present, then emulate an \lmcsheading call
% This draws the first horizontal line and fixes the page style on the first
% page
\IfFileExists{./LMCS-logo.mf}{}{
\def\ps@firstpage{\let\@mkboth\@gobbletwo%
\def\@oddhead{%
\hbox{\fontencoding{T1}%
  \vbox to 30 pt{\scriptsize\vfill
    \hbox{\phantom{LMgp}}
%    \hbox{\textsf{Vol.~\doi, pp.\ 1--#2}}
    \hbox{\phantom{Volume,pp}}
    \hbox{\phantom{https://example.org}}
    \rlap{\vrule width\hsize depth .4 pt}}}\hfill
\raise 4pt
\hbox{\fontencoding{T1}%
  \vbox to 30 pt{\scriptsize\vfill
    \hbox{}
    \hbox{}}}\hfill
\raise 4pt
\hbox{\fontencoding{T1}%
  \vbox to 30 pt{\scriptsize\vfill
    \hbox to 94 pt{}
    \hbox to 94 pt{}
    }}}
\def\@evenhead{}\def\@evenfoot{}}%
\thispagestyle{firstpage}}

\def\enddoc@text{\nobreak%
    \insert\copyins{\hsize.57\textwidth
\vbox to 0pt{\vskip12 pt%
      \fontsize{6}{7\p@}\normalfont\upshape
      \everypar{}%
      \noindent\fontencoding{T1}%
  \textsf{This work is licensed under the Creative Commons
  Attribution License. To view a copy of this license, visit
  \texttt{https://creativecommons.org/licenses/by/4.0/} or send a
  letter to Creative Commons, 171 Second St, Suite 300, San Francisco,
    CA 94105, USA, or Eisenacher Strasse 2, 10777 Berlin, Germany}\vss}
      \par
      \kern\z@}%
}
Sergey Goncharov's avatar
Sergey Goncharov committed
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584

%% Defines the pagestyle for the rest of the pages
%% Usage: \ShortHeadings{Minimizing Conflicts}{Minton et al}
%%	  \ShortHeadings{short title}{short authors}

%\def\firstpageno#1{\setcounter{page}{#1}}
%\def\ShortHeadings#1#2{\def\ps@lmcsps{\let\@mkboth\@gobbletwo%
%\def\@oddhead{\hfill {\small\sc #1} \hfill}%
%\def\@oddfoot{\hfill \small\rm \thepage \hfill}%
%\def\@evenhead{\hfill {\small\sc #2} \hfill}%
%\def\@evenfoot{\hfill \small\rm \thepage \hfill}}%
%\pagestyle{lmcsps}}

%% MISCELLANY

\def\@startsection#1#2#3#4#5#6{\bigskip%
 \if@noskipsec \leavevmode \fi
 \par \@tempskipa #4\relax
 \@afterindentfalse
 \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
 \if@nobreak \everypar{}\else
     \addpenalty\@secpenalty\addvspace\@tempskipa\fi
 \@ifstar{\@dblarg{\@sect{#1}{\@m}{#3}{#4}{#5}{#6}}}%
         {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}%
Christoph Rauch's avatar
Christoph Rauch committed
585
586
%  \aftergroup\@afterindentfalse
%  \aftergroup\@afterheading
Sergey Goncharov's avatar
Sergey Goncharov committed
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
}

\def\figurecaption#1#2{\noindent\hangindent 40pt
                       \hbox to 36pt {\small\sl #1 \hfil}
                       \ignorespaces {\small #2}}
% Figurecenter prints the caption title centered.
\def\figurecenter#1#2{\centerline{{\sl #1} #2}}
\def\figurecenter#1#2{\centerline{{\small\sl #1} {\small #2}}}

%
%  Allow ``hanging indents'' in long captions
%
\long\def\@makecaption#1#2{
   \vskip 10pt 
   \setbox\@tempboxa\hbox{#1: #2}
   \ifdim \wd\@tempboxa >\hsize               % IF longer than one line:
       \begin{list}{#1:}{
       \settowidth{\labelwidth}{#1:}
       \setlength{\leftmargin}{\labelwidth}
       \addtolength{\leftmargin}{\labelsep}
        }\item #2 \end{list}\par   % Output in quote mode
     \else                                    %   ELSE  center.
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}  
   \fi}


% Define strut macros for skipping spaces above and below text in a
% tabular environment.
\def\abovestrut#1{\rule[0in]{0in}{#1}\ignorespaces}
\def\belowstrut#1{\rule[-#1]{0in}{#1}\ignorespaces}

%%% Theorem environments

% the following environments switch to a slanted font:
\theoremstyle{plain}

\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
Christoph Rauch's avatar
Christoph Rauch committed
626
\newtheorem{slem}[thm]{Sublemma}
Sergey Goncharov's avatar
Sergey Goncharov committed
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
\newtheorem{prop}[thm]{Proposition}
\newtheorem{asm}[thm]{Assumption}

% the following environments keep the roman font:
\theoremstyle{definition}

\newtheorem{rem}[thm]{Remark}
\newtheorem{rems}[thm]{Remarks}
\newtheorem{exa}[thm]{Example}
\newtheorem{exas}[thm]{Examples}
\newtheorem{defi}[thm]{Definition}
\newtheorem{conv}[thm]{Convention}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{prob}[thm]{Problem}
\newtheorem{oprob}[thm]{Open Problem}
Christoph Rauch's avatar
Christoph Rauch committed
642
\newtheorem{oprobs}[thm]{Open Problems}
Sergey Goncharov's avatar
Sergey Goncharov committed
643
644
\newtheorem{algo}[thm]{Algorithm}
\newtheorem{obs}[thm]{Observation}
Christoph Rauch's avatar
Christoph Rauch committed
645
\newtheorem{desc}[thm]{Description}
Sergey Goncharov's avatar
Sergey Goncharov committed
646
\newtheorem{fact}[thm]{Fact}
Christoph Rauch's avatar
Christoph Rauch committed
647
648
\newtheorem{qu}[thm]{Question}
\newtheorem{oqu}[thm]{Open Question}
Sergey Goncharov's avatar
Sergey Goncharov committed
649
\newtheorem{pty}[thm]{Property}
Christoph Rauch's avatar
Christoph Rauch committed
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
\newtheorem{clm}[thm]{Claim}
\newtheorem{nota}[thm]{Notation}
\newtheorem{com}[thm]{Comment}
\newtheorem{coms}[thm]{Comments}

%% goal is to omit parens from note, place cite as part of theorem number
\newtheoremstyle{defC}%
  {6pt}% (space above)
  {6pt}% (space below)
  {\normalfont}% (body font)
  {}% (indent amount)
  {\bfseries}% {theorem head font}
  {{\bfseries .}}% {punctuation after theorem head}
  {5pt plus 1pt minus 1pt}% {space after theorem head}
  {\thmname{#1} \thmnumber{#2} \thmnote{\normalfont#3}}% {theorem head spec}
\theoremstyle{defC}
\newtheorem{defiC}[thm]{Definition}

\newtheoremstyle{thmC}%
  {6pt}% (space above)
  {6pt}% (space below)
  {\itshape}% (body font)
  {}% (indent amount)
  {\bfseries}% {theorem head font}
  {{\bfseries .}}% {punctuation after theorem head}
  {5pt plus 1pt minus 1pt}% {space after theorem head}
  {\thmname{#1} \thmnumber{#2} \thmnote{\normalfont#3}}% {theorem head spec}

\theoremstyle{thmC}
\newtheorem{thmC}[thm]{Theorem}
\newtheorem{propC}[thm]{Proposition}
\newtheorem{lemC}[thm]{Lemma}
Sergey Goncharov's avatar
Sergey Goncharov committed
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707

\numberwithin{equation}{section}

% end-of-proof sign, to appear at right margin
% Paul Taylor and Chris Thompson, Cambridge, 1986
%
\def\pushright#1{{%        set up
   \parfillskip=0pt            % so \par doesn't push #1 to left
   \widowpenalty=10000         % so we dont break the page before #1
   \displaywidowpenalty=10000  % ditto
   \finalhyphendemerits=0      % TeXbook exercise 14.32
  %
  %                 horizontal
   \leavevmode                 % \nobreak means lines not pages
   \unskip                     % remove previous space or glue
   \nobreak                    % don't break lines
   \hfil                       % ragged right if we spill over
   \penalty50                  % discouragement to do so
   \hskip.2em                  % ensure some space
   \null                       % anchor following \hfill
   \hfill                      % push #1 to right
   {#1}                        % the end-of-proof mark (or whatever)
  %
  %                   vertical
   \par}}                      % build paragraph

Christoph Rauch's avatar
Christoph Rauch committed
708
709
710
711
712
713
\newsavebox{\lmcsQEDSymbol}
\savebox{\lmcsQEDSymbol}{\begin{tikzpicture}[baseline=\the\pgflinewidth]
    \draw (-\the\pgflinewidth,-\the\pgflinewidth) rectangle (8pt,8pt);
  \end{tikzpicture}}
\renewcommand\qedsymbol{\usebox{\lmcsQEDSymbol}}

Sergey Goncharov's avatar
Sergey Goncharov committed
714
715
716
717
% Bibliographystyle

\bibliographystyle{alpha}

Christoph Rauch's avatar
Christoph Rauch committed
718
719
720
721
722
723
724
725

\def\eqalign#1{\null\,\vcenter{\openup\jot\mathsurround=0 pt
  \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
      \crcr#1\crcr}}\,}

\def\Rlap#1{\rlap{\mths$#1$}}
\def\Llap#1{\llap{\mths$#1$}}

Sergey Goncharov's avatar
Sergey Goncharov committed
726
\endinput