├── .aspell.en.pws ├── .aspell.en.prepl ├── Source ├── cc-by.pdf ├── Variables.ini ├── lipics-logo-bw.pdf ├── sprmindx.sty ├── fig │ └── square-circle.pdf ├── appendices.tex ├── postamble.inc.tex ├── midamble.inc.tex ├── paper.bib ├── .gitignore ├── acm-bottom.tex ├── abstract.tex ├── acm-ccs.tex ├── remreset.sty ├── llncsdoc.sty ├── preamble.inc.tex ├── includes.tex ├── aliascnt.sty ├── usenix2019_v3.sty ├── svglov3.clo ├── paper.tex ├── fixbib.sty ├── breakurl.sty ├── eptcs.cls ├── stvrauth.cls ├── aaai.sty ├── easychair.cls └── elsarticle.cls ├── .gitignore ├── zip-export.sh ├── aspell-check.readme ├── aspell-check.sh ├── aspell-check.bat ├── update-from.sh ├── authors.txt ├── diff-versions.sh ├── clean-bibtex.php ├── bib-diff.php ├── import-citations.php ├── settings.inc.php ├── export.php ├── Readme.md └── bibtex-bib.lib.php /.aspell.en.pws: -------------------------------------------------------------------------------- 1 | personal_ws-1.1 en 0 2 | -------------------------------------------------------------------------------- /.aspell.en.prepl: -------------------------------------------------------------------------------- 1 | personal_repl-1.1 en 0 2 | -------------------------------------------------------------------------------- /Source/cc-by.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylvainhalle/PaperShell/HEAD/Source/cc-by.pdf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.tmp 3 | *.temp 4 | *.bak 5 | Source/#paper.tex# 6 | git-history.txt 7 | Export/ -------------------------------------------------------------------------------- /Source/Variables.ini: -------------------------------------------------------------------------------- 1 | neverclean := fig/*.pdf fig/*.ps labpal-plots.pdf 2 | onlysources.tex := paper.tex -------------------------------------------------------------------------------- /Source/lipics-logo-bw.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylvainhalle/PaperShell/HEAD/Source/lipics-logo-bw.pdf -------------------------------------------------------------------------------- /Source/sprmindx.sty: -------------------------------------------------------------------------------- 1 | delim_0 "\\idxquad " 2 | delim_1 "\\idxquad " 3 | delim_2 "\\idxquad " 4 | delim_n ",\\," 5 | -------------------------------------------------------------------------------- /Source/fig/square-circle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylvainhalle/PaperShell/HEAD/Source/fig/square-circle.pdf -------------------------------------------------------------------------------- /Source/appendices.tex: -------------------------------------------------------------------------------- 1 | %% --------------------------- 2 | %% If there is anything you would like to insert *after* the bibliography 3 | %% (and *before* the \end{document} instruction), place it here 4 | %% --------------------------- 5 | 6 | % Nothing 7 | -------------------------------------------------------------------------------- /Source/postamble.inc.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | %% This file was autogenerated by PaperShell v2.6.1 on 2023-02-03 13:51:10 3 | %% https://github.com/sylvainhalle/PaperShell 4 | %% DO NOT EDIT! 5 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6 | \input{appendices.tex} 7 | -------------------------------------------------------------------------------- /Source/midamble.inc.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | %% This file was autogenerated by PaperShell v2.6.1 on 2023-02-03 13:51:10 3 | %% https://github.com/sylvainhalle/PaperShell 4 | %% DO NOT EDIT! 5 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6 | \bibliographystyle{elsarticle-num} 7 | 8 | \section*{References} 9 | -------------------------------------------------------------------------------- /zip-export.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # The name of the output archive 4 | outarchive=paper.zip 5 | 6 | # The name of the generated PDF (we won't include it) 7 | papername=paper.pdf 8 | 9 | echo "Zipping contents of folder Export into $outarchive" 10 | pushd Export > /dev/null 11 | zip -9 -r --exclude=\*~ --exclude=$papername --exclude=\*.log --exclude=\*.out ../$outarchive . 12 | popd > /dev/null 13 | -------------------------------------------------------------------------------- /aspell-check.readme: -------------------------------------------------------------------------------- 1 | You need to have the GNU Aspell spell checker 2 | installed for this to work. 3 | 4 | In Ubuntu, do: 5 | 6 | > sudo apt-get install aspell aspell-en aspell-fr 7 | 8 | In Windows, download the Win32 version of Aspell , 9 | the precompiled dictionaries you need, and make sure the bin directory 10 | containing aspell.exe is in your system's path. 11 | -------------------------------------------------------------------------------- /aspell-check.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # ------------------------------------------------------------------ 3 | # Spell checking of the source file (Bash version for Linux) 4 | # Usage: ./aspell-check.sh 5 | # ------------------------------------------------------------------ 6 | 7 | # Check if Aspell exists, otherwise print instructions and exits 8 | hash aspell 2>/dev/null || { cat aspell-check.readme; exit 1; } 9 | 10 | # Run Aspell 11 | aspell --home-dir=. --lang=en --mode=tex --add-tex-command="nospellcheck p" check Source/paper.tex 12 | -------------------------------------------------------------------------------- /Source/paper.bib: -------------------------------------------------------------------------------- 1 | @article{Lenat83a, 2 | author = {Douglas B. Lenat}, 3 | title = {{EURISKO:} {A} Program That Learns New Heuristics and Domain Concepts}, 4 | journal = {Artif. Intell.}, 5 | year = {1983}, 6 | volume = {21}, 7 | number = {1-2}, 8 | pages = {61--98}, 9 | url = {http://dx.doi.org/10.1016/S0004-3702(83)80005-8}, 10 | doi = {10.1016/S0004-3702(83)80005-8}, 11 | timestamp = {Thu, 20 Nov 2014 18:12:15 +0100}, 12 | biburl = {http://dblp.uni-trier.de/rec/bib/journals/ai/Lenat83a}, 13 | bibsource = {dblp computer science bibliography, http://dblp.org} 14 | } 15 | -------------------------------------------------------------------------------- /Source/.gitignore: -------------------------------------------------------------------------------- 1 | # Don't version temporary LaTeX files or backup files 2 | *.tmp 3 | *.bak 4 | *.bbl 5 | *.aux 6 | *.blg 7 | *.log 8 | *~ 9 | *.d 10 | *.make 11 | *.out 12 | *.cookie 13 | *.fls 14 | *.spl 15 | *.synctex 16 | *.dvi 17 | *.vtc 18 | \# 19 | #preamble* 20 | #postamble* 21 | #midamble* 22 | 23 | # Don't version any PDF and PS (they can be re-generated by compiling) 24 | *.ps 25 | *.pdf 26 | 27 | # ...except those in the fig folder 28 | !fig/*.pdf 29 | !fig/*.ps 30 | 31 | # ...and these images required by the LIPICS style 32 | !cc-by.pdf 33 | !lipics-logo-bw.pdf 34 | 35 | # ...and this LabPal plots file if you use LabPal 36 | !labpal-plots.pdf 37 | -------------------------------------------------------------------------------- /aspell-check.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM ------------------------------------------------------------------ 4 | REM Spell checking of the source file (Bash version for Windows) 5 | REM Usage: aspell-check.bat 6 | REM ------------------------------------------------------------------ 7 | 8 | REM Check if Aspell exists, otherwise print instructions and exits 9 | for %%X in (aspell.exe) do (set FOUND=%%~$PATH:X) 10 | if defined FOUND goto :error 11 | 12 | REM Run Aspell 13 | aspell --home-dir=. --lang=en --mode=tex --add-tex-command="nospellcheck p" check Source/paper.tex 14 | goto :end 15 | 16 | REM Print instructions 17 | :error 18 | type aspell-check.readme 19 | 20 | :end 21 | 22 | -------------------------------------------------------------------------------- /Source/acm-bottom.tex: -------------------------------------------------------------------------------- 1 | %% ---------------------- 2 | %% NOTE: this file is only necessary for ACM *journals*. For all other 3 | %% stylesheets you can leave it as is (it is useless). 4 | %% ---------------------- 5 | \begin{acks} 6 | The authors would like to thank Dr. Maura Turolla of Telecom 7 | Italia for providing specifications about the application scenario. 8 | 9 | The work is supported by the \grantsponsor{GS501100001809}{National 10 | Natural Science Foundation of 11 | China}{http://dx.doi.org/10.13039/501100001809} under Grant 12 | No.:~\grantnum{GS501100001809}{61273304\_a} 13 | and~\grantnum[http://www.nnsf.cn/youngscientsts]{GS501100001809}{Young 14 | Scientsts' Support Program}. 15 | \end{acks} 16 | %% :folding=explicit:wrap=soft:mode=latex: 17 | -------------------------------------------------------------------------------- /update-from.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # ---------------------------------------------- 3 | # Updates the files in a folder with those from a more recent 4 | # version of PaperShell 5 | # 6 | # Usage: ./update-from.sh path 7 | # where path is the path to the root folder of an up-to-date copy of 8 | # PaperShell. The script takes care not to overwrite paper.tex, but 9 | # updates everything else. 10 | # ---------------------------------------------- 11 | rsync -aP --exclude 'paper.*' --exclude '*.inc.tex' --exclude '.git' --exclude 'fig' --exclude '*~' --exclude 'authors.txt' --exclude 'Readme.md' --exclude 'Source/abstract.tex' $1/ ./ 12 | echo "Update done. Don't forget to manually update paper.tex in case" 13 | echo "its structure has changed in the new version of PaperShell." -------------------------------------------------------------------------------- /Source/abstract.tex: -------------------------------------------------------------------------------- 1 | %% ---------------------- 2 | %% Write your abstract here. Do not enclose it in an "abstract" 3 | %% environment. 4 | %% ---------------------- 5 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque rhoncus auctor mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Cur\ae{}; Sed a metus nec felis tristique venenatis eu quis urna. Integer quis sagittis eros, condimentum auctor libero. Fusce luctus diam et libero sodales luctus. Duis suscipit sodales libero, sed blandit odio aliquam at. Sed venenatis orci et luctus sagittis. Nam aliquam mi mi, ut vehicula turpis semper at. Nam pellentesque est nec fringilla consectetur. Aliquam magna elit, imperdiet et condimentum nec, venenatis et nisi. 6 | %% :folding=explicit:wrap=soft:mode=latex: 7 | -------------------------------------------------------------------------------- /Source/acm-ccs.tex: -------------------------------------------------------------------------------- 1 | %% ---------------------- 2 | % The code below should be generated by the tool at 3 | % http://dl.acm.org/ccs.cfm 4 | % Please copy and paste the code instead of the example below. 5 | % 6 | % NOTE: this file is only necessary for ACM journals and conferences. For all 7 | % other stylesheets you can leave it as is (it is useless). 8 | %% ---------------------- 9 | 10 | \begin{CCSXML} 11 | 12 | 13 | 10002978.10002986.10002990 14 | Security and privacy~Logic and verification 15 | 500 16 | 17 | 18 | 10003752.10003766 19 | Theory of computation~Formal languages and automata theory 20 | 300 21 | 22 | 23 | \end{CCSXML} 24 | 25 | \ccsdesc[500]{Security and privacy~Logic and verification} 26 | \ccsdesc[300]{Theory of computation~Formal languages and automata theory} 27 | % 28 | % End generated code 29 | % 30 | 31 | \keywords{\papershellkw} 32 | -------------------------------------------------------------------------------- /authors.txt: -------------------------------------------------------------------------------- 1 | # Metadata that will be used to create the paper's various preambles 2 | # Any empty line, and any line beginning with # is ignored. 3 | 4 | # The first non-ignored line of the file must contain the document's title. 5 | # It can contain any LaTeX code that is permitted in the \title{} command 6 | 7 | Applications of the Flux Capacitor 8 | 9 | # What remains of the file is the list of authors and affiliations. 10 | # Author lines end with (x), where x is the number associated with the 11 | # author's affiliation. The author's e-mail address and ORCID can follow, 12 | # separated by a comma. These fields are optional. 13 | 14 | Emmett Brown (1) ebrown@temporal.com, 0000-0000-1234-5678 15 | Marty McFly (1) 16 | Biff Tannen (2) biff@biffco.com 17 | 18 | # Affiliation lines begin with a single digit (indictating the affiliation) 19 | # Any following line is appended to the affiliation. 20 | # The first line after the number should be the institution. 21 | # For ACM publications, please define the remaining elements of 22 | # the address in settings.inc.php. 23 | 24 | 1 25 | Temporal Industries 26 | Hill Valley, CA 95420 27 | 28 | 2 29 | BiffCo inc. 30 | Hill Valley, CA 95420 31 | 32 | -------------------------------------------------------------------------------- /Source/remreset.sty: -------------------------------------------------------------------------------- 1 | 2 | % remreset package 3 | %%%%%%%%%%%%%%%%%% 4 | 5 | % Copyright 1997 David carlisle 6 | % This file may be distributed under the terms of the LPPL. 7 | % See 00readme.txt for details. 8 | 9 | % 1997/09/28 David Carlisle 10 | 11 | % LaTeX includes a command \@addtoreset that is used to declare that 12 | % a counter should be reset every time a second counter is incremented. 13 | 14 | % For example the book class has a line 15 | % \@addtoreset{footnote}{chapter} 16 | % So that the footnote counter is reset each chapter. 17 | 18 | % If you wish to bas a new class on book, but without this counter 19 | % being reset, then standard LaTeX gives no simple mechanism to do 20 | % this. 21 | 22 | % This package defines |\@removefromreset| which just undoes the effect 23 | % of \@addtorest. So for example a class file may be defined by 24 | 25 | % \LoadClass{book} 26 | % \@removefromreset{footnote}{chapter} 27 | 28 | 29 | \def\@removefromreset#1#2{{% 30 | \expandafter\let\csname c@#1\endcsname\@removefromreset 31 | \def\@elt##1{% 32 | \expandafter\ifx\csname c@##1\endcsname\@removefromreset 33 | \else 34 | \noexpand\@elt{##1}% 35 | \fi}% 36 | \expandafter\xdef\csname cl@#2\endcsname{% 37 | \csname cl@#2\endcsname}}} 38 | 39 | 40 | -------------------------------------------------------------------------------- /diff-versions.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Calculates the difference of two versions of a paper using the PaperShell 4 | # template 5 | # 6 | # (C) 2024 Sylvain Hallé 7 | # 8 | # Usage: ./diff-versions.sh 9 | # where: 10 | # - old is the root PaperShell folder of the "old" version of the paper 11 | # - new is the root PaperShell folder of the "old" version of the paper 12 | # - target is the name of the target folder that will contain the diff 13 | # document (created if does not exist) 14 | # ------------------------------------------------------------------------ 15 | 16 | # PaperShell default names; change only if you override these defaults 17 | EXPORT=Export 18 | PAPER=paper.tex 19 | 20 | # Create target directory if it does not exist 21 | mkdir -p $3 22 | 23 | # Flatten "old" version as a stand-alone PDF 24 | pushd $1 25 | php export.php 26 | popd 27 | 28 | # Flatten "new" version as a stand-alone PDF 29 | pushd $2 30 | php export.php 31 | popd 32 | 33 | # Copy "flattened" folder of new version into target directory 34 | rsync -av --exclude=".*" $2/$EXPORT/ $3/$EXPORT/ 35 | 36 | # Create diff document 37 | latexdiff --encoding=utf8 $1/$EXPORT/$PAPER $2/$EXPORT/$PAPER > $3/$EXPORT/$PAPER 38 | 39 | # Compile (3 times as usual for LaTeX); bulldowse through any errors 40 | pushd $3/Export 41 | pdflatex -interaction=batchmode $PAPER 42 | pdflatex -interaction=batchmode $PAPER 43 | pdflatex -interaction=batchmode $PAPER 44 | 45 | # Rename to avoid confusion 46 | mv $PAPER changes.pdf 47 | popd -------------------------------------------------------------------------------- /Source/llncsdoc.sty: -------------------------------------------------------------------------------- 1 | % This is LLNCSDOC.STY the modification of the 2 | % LLNCS class file for the documentation of 3 | % the class itself. 4 | % 5 | \def\AmS{{\protect\usefont{OMS}{cmsy}{m}{n}% 6 | A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}} 7 | \def\AmSTeX{{\protect\AmS-\protect\TeX}} 8 | % 9 | \def\ps@myheadings{\let\@mkboth\@gobbletwo 10 | \def\@oddhead{\hbox{}\hfil\small\rm\rightmark 11 | \qquad\thepage}% 12 | \def\@oddfoot{}\def\@evenhead{\small\rm\thepage\qquad 13 | \leftmark\hfil}% 14 | \def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}} 15 | \ps@myheadings 16 | % 17 | \setcounter{tocdepth}{2} 18 | % 19 | \renewcommand{\labelitemi}{--} 20 | \newenvironment{alpherate}% 21 | {\renewcommand{\labelenumi}{\alph{enumi})}\begin{enumerate}}% 22 | {\end{enumerate}\renewcommand{\labelenumi}{enumi}} 23 | % 24 | \def\bibauthoryear{\begingroup 25 | \def\thebibliography##1{\section*{References}% 26 | \small\list{}{\settowidth\labelwidth{}\leftmargin\parindent 27 | \itemindent=-\parindent 28 | \labelsep=\z@ 29 | \usecounter{enumi}}% 30 | \def\newblock{\hskip .11em plus .33em minus -.07em}% 31 | \sloppy 32 | \sfcode`\.=1000\relax}% 33 | \def\@cite##1{##1}% 34 | \def\@lbibitem[##1]##2{\item[]\if@filesw 35 | {\def\protect####1{\string ####1\space}\immediate 36 | \write\@auxout{\string\bibcite{##2}{##1}}}\fi\ignorespaces}% 37 | \begin{thebibliography}{} 38 | \bibitem[1982]{clar:eke3} Clarke, F., Ekeland, I.: Nonlinear 39 | oscillations and boundary-value problems for Hamiltonian systems. 40 | Arch. Rat. Mech. Anal. 78, 315--333 (1982) 41 | \end{thebibliography} 42 | \endgroup} 43 | -------------------------------------------------------------------------------- /Source/preamble.inc.tex: -------------------------------------------------------------------------------- 1 | 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 | %% This file was autogenerated by PaperShell v2.6.1 on 2023-02-03 13:51:10 4 | %% https://github.com/sylvainhalle/PaperShell 5 | %% DO NOT EDIT! 6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 | \documentclass[preprint]{elsarticle} 8 | 9 | % Usual packages 10 | \usepackage[utf8]{inputenc} % UTF-8 input encoding 11 | \usepackage[T1]{fontenc} % Type1 fonts 12 | \usepackage{lmodern} % Improved Computer Modern font 13 | \usepackage{microtype} % Better handling of typo 14 | \usepackage[scaled]{helvet} % Scale Helvetica 15 | \usepackage[english]{babel} % Hyphenation 16 | \usepackage{graphicx} % Import graphics 17 | \usepackage[bookmarks=false]{hyperref} % Better handling of references in PDFs 18 | \usepackage{comment} % To comment out blocks of text 19 | \biboptions{sort&compress} % Sort and compress citations 20 | 21 | \journal{TISSEC} 22 | 23 | % User-defined includes 24 | \input{includes.tex} 25 | %% Default path for graphics 26 | \graphicspath{{fig/}} 27 | 28 | 29 | \begin{document} 30 | 31 | \begin{frontmatter} 32 | 33 | % Title 34 | \title{Applications of the Flux Capacitor} 35 | 36 | % Authors and affiliations 37 | \author{Emmett Brown\fnref{label1}% 38 | } 39 | \author{Marty McFly\fnref{label1}% 40 | } 41 | \author{Biff Tannen\fnref{label2}% 42 | } 43 | \fntext[label1]{Temporal Industries, Hill Valley, CA 95420% 44 | } 45 | \fntext[label2]{BiffCo inc., Hill Valley, CA 95420% 46 | } 47 | \begin{abstract} 48 | \input{abstract.tex} 49 | \end{abstract} 50 | \end{frontmatter} 51 | -------------------------------------------------------------------------------- /clean-bibtex.php: -------------------------------------------------------------------------------- 1 | . 18 | **************************************************************************/ 19 | require_once("bibtex-bib.lib.php"); 20 | 21 | /* 22 | * Cleans a bibliography by parsing it and re-outputting it. This should 23 | * normally uniformize the presentation of references in the file and 24 | * take care of removing duplicate entries. 25 | */ 26 | $version_string = "1.0"; 27 | echo "Clean BibTeX v".$version_string."\n(C) 2015-2016 Sylvain Hallé, Université du Québec à Chicoutimi\nhttps://github.com/sylvainhalle/PaperShell\n"; 28 | $in_filename = "Source/paper.bib"; 29 | $out_filename = "Source/paper.clean.bib"; 30 | $bib = new Bibliography($in_filename); 31 | echo "\nCleaning up $in_filename...\n"; 32 | file_put_contents($out_filename, $bib->toBibTeX()); 33 | echo "Done. The output file is $out_filename\n\n"; 34 | ?> 35 | -------------------------------------------------------------------------------- /bib-diff.php: -------------------------------------------------------------------------------- 1 | . 18 | **************************************************************************/ 19 | 20 | /* 21 | This script compares two BibTeX files, file1.bib and file2.bib, and displays 22 | the keys from file1 that are not present in file2. 23 | */ 24 | if (count($argv) < 3 || strpos("help", $argv[1]) >= 0) 25 | { 26 | echo "Usage: php bib-diff.php \n"; 27 | echo "Displays the BibTeX keys in file1 that are not present in file2\n"; 28 | exit(1); 29 | } 30 | $keys_1 = get_keys(file_get_contents($argv[1])); 31 | $keys_2 = get_keys(file_get_contents($argv[2])); 32 | 33 | echo "Here are the keys from the first file not present in the second file:\n\n"; 34 | $diff = leo_array_diff($keys_1, $keys_2); 35 | echo implode("\n", $diff); 36 | echo "\n"; 37 | exit(0); 38 | 39 | function get_keys($file_contents) 40 | { 41 | $matches = array(); 42 | preg_match_all("/@.*?\\{(.*?),/", $file_contents, $matches); 43 | return $matches[1]; 44 | } 45 | 46 | // http://stackoverflow.com/a/6700430 47 | function leo_array_diff($a, $b) { 48 | $map = array(); 49 | foreach($a as $val) $map[$val] = 1; 50 | foreach($b as $val) unset($map[$val]); 51 | return array_keys($map); 52 | } 53 | ?> 54 | -------------------------------------------------------------------------------- /import-citations.php: -------------------------------------------------------------------------------- 1 | . 18 | **************************************************************************/ 19 | require_once("bibtex-bib.lib.php"); 20 | 21 | /* 22 | * Retrieves all citations in paper.tex, finds those that are not present in 23 | * paper.bib, and imports them from another bib file specified as a command line 24 | * argument. The entries found are printed to the standard output. 25 | * 26 | * You can send them to the clipboard by piping the output to xclip, e.g.: 27 | * 28 | * php import-citations.php somefile.bib | xclip 29 | */ 30 | if (count($argv) < 2) 31 | die("No bib file specified"); 32 | $paper = file_get_contents("Source/paper.tex"); 33 | $bibfile = new Bibliography("Source/paper.bib"); 34 | $bibsource = new Bibliography($argv[1]); 35 | if (!preg_match_all("/cite\\{(.*?)\\}/ms", $paper, $citations)) 36 | die("No citation"); 37 | $outbib = new Bibliography(); 38 | foreach ($citations[1] as $citation) 39 | { 40 | $parts = explode(",", $citation); 41 | foreach ($parts as $key) 42 | { 43 | $key = trim($key); 44 | if (!$bibfile->containsEntry($key) && $bibsource->containsEntry($key)) 45 | { 46 | $bibdata = $bibsource->getEntry($key); 47 | $outbib->addEntry($key, $bibdata); 48 | } 49 | } 50 | } 51 | echo $outbib->toBibtex(); 52 | ?> -------------------------------------------------------------------------------- /Source/includes.tex: -------------------------------------------------------------------------------- 1 | %% --------------------------- 2 | %% If you have other packages or command definitions you'd like to 3 | %% include, write them there 4 | %% --------------------------- 5 | \usepackage{amsmath,amsfonts,amssymb} 6 | 7 | %% Note: the subfig package is incompatible with the "unfixed" version 8 | %% of the LIPICS class. It works here only because PaperShell includes 9 | %% a fixed version --which is not the official version. 10 | \usepackage{subfig} 11 | 12 | %% We put one here: this is a dummy command for LaTeX, used to 13 | %% tell Aspell to skip checking the spelling of what's inside 14 | %% Usage: I like the word \nospellcheck{kwyjibo} 15 | \newcommand{\nospellcheck}[1]{#1} 16 | 17 | %% -------------------------- 18 | %% Personalized todo notes 19 | %% -------------------------- 20 | \usepackage{xcolor} 21 | \usepackage{todonotes} 22 | %\newcommand{\todosylvain}[1]{\todo[inline,caption={},color=cyan]{\sf\small \textbf{@Sylvain:} #1}} 23 | %\newcommand{\todoalex}[1]{\todo[inline,caption={},color=pink]{\sf\small \textbf{@Alex:} #1}} 24 | %\newcommand{\todosebastien}[1]{\todo[inline,caption={},color=lime]{\sf\small \textbf{@Sébastien:} #1}} 25 | %\newcommand{\todomichael}[1]{\todo[inline,caption={},color=lime]{\sf\small \textbf{@Michaël:} #1}} 26 | %\newcommand{\todotous}[1]{\todo[inline,caption={},color=yellow]{\sf\small #1}} 27 | %\newcommand{\todoedmond}[1]{\todo[inline,caption={},color=lime]{\sf\small \textbf{@Edmond:} #1}} 28 | 29 | %% -------------------------- 30 | %% Placeholder for figure 31 | %% -------------------------- 32 | \newcommand{\imagevide}{\framebox(200,200){IMAGE}} 33 | 34 | %% -------------------------- 35 | %% Alter some LaTeX defaults for better treatment of figures: 36 | %% See p.105 of "TeX Unbound" for suggested values. 37 | %% See pp. 199-200 of Lamport's "LaTeX" book for details. 38 | %% -------------------------- 39 | %% Parameters for all pages 40 | \renewcommand{\topfraction}{0.9} % max fraction of floats at top 41 | \renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom 42 | 43 | %% Parameters for TEXT pages (not float pages) 44 | \setcounter{topnumber}{2} 45 | \setcounter{bottomnumber}{2} 46 | \setcounter{totalnumber}{4} % 2 may work better 47 | \setcounter{dbltopnumber}{2} % for 2-column pages 48 | \renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text 49 | \renewcommand{\textfraction}{0.07} % allow minimal text w. figs 50 | 51 | % Parameters for FLOAT pages (not text pages) 52 | \renewcommand{\floatpagefraction}{0.7} % require fuller float pages 53 | % N.B.: floatpagefraction MUST be less than topfraction !! 54 | \renewcommand{\dblfloatpagefraction}{0.7} %require fuller float pages 55 | 56 | %\newtheorem{example}{Example} -------------------------------------------------------------------------------- /Source/aliascnt.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `aliascnt.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% aliascnt.dtx (with options: `package') 8 | %% 9 | %% This is a generated file. 10 | %% 11 | %% Project: aliascnt 12 | %% Version: 2009/09/08 v1.3 13 | %% 14 | %% Copyright (C) 2006, 2009 by 15 | %% Heiko Oberdiek 16 | %% 17 | %% This work may be distributed and/or modified under the 18 | %% conditions of the LaTeX Project Public License, either 19 | %% version 1.3c of this license or (at your option) any later 20 | %% version. This version of this license is in 21 | %% http://www.latex-project.org/lppl/lppl-1-3c.txt 22 | %% and the latest version of this license is in 23 | %% http://www.latex-project.org/lppl.txt 24 | %% and version 1.3 or later is part of all distributions of 25 | %% LaTeX version 2005/12/01 or later. 26 | %% 27 | %% This work has the LPPL maintenance status "maintained". 28 | %% 29 | %% This Current Maintainer of this work is Heiko Oberdiek. 30 | %% 31 | %% This work consists of the main source file aliascnt.dtx 32 | %% and the derived files 33 | %% aliascnt.sty, aliascnt.pdf, aliascnt.ins, aliascnt.drv. 34 | %% 35 | \NeedsTeXFormat{LaTeX2e} 36 | \ProvidesPackage{aliascnt}% 37 | [2009/09/08 v1.3 Alias counter (HO)]% 38 | \newcommand*{\newaliascnt}[2]{% 39 | \begingroup 40 | \def\AC@glet##1{% 41 | \global\expandafter\let\csname##1#1\expandafter\endcsname 42 | \csname##1#2\endcsname 43 | }% 44 | \@ifundefined{c@#2}{% 45 | \@nocounterr{#2}% 46 | }{% 47 | \expandafter\@ifdefinable\csname c@#1\endcsname{% 48 | \AC@glet{c@}% 49 | \AC@glet{the}% 50 | \AC@glet{theH}% 51 | \AC@glet{p@}% 52 | \expandafter\gdef\csname AC@cnt@#1\endcsname{#2}% 53 | \expandafter\gdef\csname cl@#1\expandafter\endcsname 54 | \expandafter{\csname cl@#2\endcsname}% 55 | }% 56 | }% 57 | \endgroup 58 | } 59 | \newcommand*{\aliascntresetthe}[1]{% 60 | \@ifundefined{AC@cnt@#1}{% 61 | \PackageError{aliascnt}{% 62 | `#1' is not an alias counter% 63 | }\@ehc 64 | }{% 65 | \expandafter\let\csname the#1\expandafter\endcsname 66 | \csname the\csname AC@cnt@#1\endcsname\endcsname 67 | }% 68 | } 69 | \newcommand*{\AC@findrootcnt}[1]{% 70 | \@ifundefined{AC@cnt@#1}{% 71 | #1% 72 | }{% 73 | \expandafter\AC@findrootcnt\csname AC@cnt@#1\endcsname 74 | }% 75 | } 76 | \def\AC@patch#1{% 77 | \expandafter\let\csname AC@org@#1reset\expandafter\endcsname 78 | \csname @#1reset\endcsname 79 | \expandafter\def\csname @#1reset\endcsname##1##2{% 80 | \csname AC@org@#1reset\endcsname{##1}{\AC@findrootcnt{##2}}% 81 | }% 82 | } 83 | \RequirePackage{remreset} 84 | \AC@patch{addto} 85 | \AC@patch{removefrom} 86 | \endinput 87 | %% 88 | %% End of file `aliascnt.sty'. 89 | -------------------------------------------------------------------------------- /Source/usenix2019_v3.sty: -------------------------------------------------------------------------------- 1 | % usenix.sty - to be used with latex2e for USENIX. 2 | % To use this style file, look at the template usenix_template.tex 3 | % 4 | % $Id: usenix.sty,v 1.2 2005/02/16 22:30:47 maniatis Exp $ 5 | % 6 | % The following definitions are modifications of standard article.sty 7 | % definitions, arranged to do a better job of matching the USENIX 8 | % guidelines. 9 | % It will automatically select two-column mode and the Times-Roman 10 | % font. 11 | % 12 | % 2018-12-19 [for ATC'19]: add packages to help embed all fonts in 13 | % pdf; to improve appearance (hopefully); to make refs and citations 14 | % clickable in pdf 15 | 16 | % 17 | % USENIX papers are two-column. 18 | % Times-Roman font is nice if you can get it (requires NFSS, 19 | % which is in latex2e. 20 | 21 | \if@twocolumn\else\input twocolumn.sty\fi 22 | \usepackage{mathptmx} % times roman, including math (where possible) 23 | 24 | % hopefully embeds all fonts in pdf 25 | \usepackage[T1]{fontenc} 26 | \usepackage[utf8]{inputenc} 27 | \usepackage{pslatex} 28 | 29 | % appearance 30 | \usepackage[kerning,spacing]{microtype} % more compact and arguably nicer 31 | \usepackage{flushend} % make cols in last page equal in size 32 | 33 | % refs and bib 34 | \usepackage{cite} % order multiple entries in \cite{...} 35 | \usepackage{breakurl} % break too-long urls in refs 36 | \usepackage{url} % allow \url in bibtex for clickable links 37 | \usepackage{xcolor} % color definitions, to be use for... 38 | \usepackage[]{hyperref} % ...clickable refs within pdf... 39 | \hypersetup{ % ...like so 40 | colorlinks, 41 | linkcolor={green!80!black}, 42 | citecolor={red!70!black}, 43 | urlcolor={blue!70!black} 44 | } 45 | 46 | % 47 | % USENIX wants margins of: 0.75" sides, 1" bottom, and 1" top. 48 | % 0.33" gutter between columns. 49 | % Gives active areas of 7" x 9" 50 | % 51 | \setlength{\textheight}{9.0in} 52 | \setlength{\columnsep}{0.33in} 53 | \setlength{\textwidth}{7.00in} 54 | 55 | \setlength{\topmargin}{0.0in} 56 | 57 | \setlength{\headheight}{0.0in} 58 | 59 | \setlength{\headsep}{0.0in} 60 | 61 | \addtolength{\oddsidemargin}{-0.25in} 62 | \addtolength{\evensidemargin}{-0.25in} 63 | 64 | % Usenix wants no page numbers for camera-ready papers, so that they can 65 | % number them themselves. But submitted papers should have page numbers 66 | % for the reviewers' convenience. 67 | % 68 | % 69 | % \pagestyle{empty} 70 | 71 | % 72 | % Usenix titles are in 14-point bold type, with no date, and with no 73 | % change in the empty page headers. The whole author section is 12 point 74 | % italic--- you must use {\rm } around the actual author names to get 75 | % them in roman. 76 | % 77 | \def\maketitle{\par 78 | \begingroup 79 | \renewcommand\thefootnote{\fnsymbol{footnote}}% 80 | \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}% 81 | \long\def\@makefntext##1{\parindent 1em\noindent 82 | \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% 83 | \if@twocolumn 84 | \twocolumn[\@maketitle]% 85 | \else \newpage 86 | \global\@topnum\z@ 87 | \@maketitle \fi\@thanks 88 | \endgroup 89 | \setcounter{footnote}{0}% 90 | \let\maketitle\relax 91 | \let\@maketitle\relax 92 | \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax} 93 | 94 | \def\@maketitle{\newpage 95 | \vbox to 2.5in{ 96 | \vspace*{\fill} 97 | \vskip 2em 98 | \begin{center}% 99 | {\Large\bf \@title \par}% 100 | \vskip 0.375in minus 0.300in 101 | {\large\it 102 | \lineskip .5em 103 | \begin{tabular}[t]{c}\@author 104 | \end{tabular}\par}% 105 | \end{center}% 106 | \par 107 | \vspace*{\fill} 108 | % \vskip 1.5em 109 | } 110 | } 111 | 112 | % 113 | % The abstract is preceded by a 12-pt bold centered heading 114 | \def\abstract{\begin{center}% 115 | {\large\bf \abstractname\vspace{-.5em}\vspace{\z@}}% 116 | \end{center}} 117 | \def\endabstract{} 118 | 119 | % 120 | % Main section titles are 12-pt bold. Others can be same or smaller. 121 | % 122 | \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus 123 | -.2ex}{2.3ex plus.2ex}{\reset@font\large\bf}} 124 | -------------------------------------------------------------------------------- /Source/svglov3.clo: -------------------------------------------------------------------------------- 1 | % SVJour3 DOCUMENT CLASS OPTION SVGLOV3 -- for standardised journals 2 | % 3 | % This is an enhancement for the LaTeX 4 | % SVJour3 document class for Springer journals 5 | % 6 | %% 7 | %% 8 | %% \CharacterTable 9 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 10 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z 11 | %% Digits \0\1\2\3\4\5\6\7\8\9 12 | %% Exclamation \! Double quote \" Hash (number) \# 13 | %% Dollar \$ Percent \% Ampersand \& 14 | %% Acute accent \' Left paren \( Right paren \) 15 | %% Asterisk \* Plus \+ Comma \, 16 | %% Minus \- Point \. Solidus \/ 17 | %% Colon \: Semicolon \; Less than \< 18 | %% Equals \= Greater than \> Question mark \? 19 | %% Commercial at \@ Left bracket \[ Backslash \\ 20 | %% Right bracket \] Circumflex \^ Underscore \_ 21 | %% Grave accent \` Left brace \{ Vertical bar \| 22 | %% Right brace \} Tilde \~} 23 | \ProvidesFile{svglov3.clo} 24 | [2009/12/18 v3.2 25 | style option for standardised journals] 26 | \typeout{SVJour Class option: svglov3.clo for standardised journals} 27 | \def\validfor{svjour3} 28 | \global\let\if@runhead\iftrue 29 | \ExecuteOptions{final,10pt} 30 | % No size changing allowed, hence a "copy" of size10.clo is included 31 | \DeclareFontShape{OT1}{cmr}{m}{n}{ 32 | <-6> cmr5 33 | <6-7> cmr6 34 | <7-8> cmr7 35 | <8-9> cmr8 36 | <9-10> cmr9 37 | <10-12> cmr10 38 | <12-17> cmr12 39 | <17-> cmr17 40 | }{} 41 | % 42 | \renewcommand\normalsize{% 43 | \if@twocolumn 44 | \@setfontsize\normalsize\@xpt{12.5pt}% 45 | \else 46 | \if@smallext 47 | \@setfontsize\normalsize\@xpt\@xiipt 48 | \else 49 | \@setfontsize\normalsize{9.5pt}{11.5pt}% 50 | \fi 51 | \fi 52 | \abovedisplayskip=3 mm plus6pt minus 4pt 53 | \belowdisplayskip=3 mm plus6pt minus 4pt 54 | \abovedisplayshortskip=0.0 mm plus6pt 55 | \belowdisplayshortskip=2 mm plus4pt minus 4pt 56 | \let\@listi\@listI} 57 | \normalsize 58 | \newcommand\small{% 59 | \if@twocolumn 60 | \@setfontsize\small{8.5pt}\@xpt 61 | \else 62 | \if@smallext 63 | \@setfontsize\small\@viiipt{9.5pt}% 64 | \else 65 | \@setfontsize\small\@viiipt{9.25pt}% 66 | \fi 67 | \fi 68 | \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ 69 | \abovedisplayshortskip \z@ \@plus2\p@ 70 | \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ 71 | \def\@listi{\leftmargin\leftmargini 72 | \parsep 0\p@ \@plus1\p@ \@minus\p@ 73 | \topsep 4\p@ \@plus2\p@ \@minus4\p@ 74 | \itemsep0\p@}% 75 | \belowdisplayskip \abovedisplayskip 76 | } 77 | \let\footnotesize\small 78 | \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} 79 | \newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} 80 | \if@twocolumn 81 | \newcommand\large{\@setfontsize\large\@xiipt\@xivpt} 82 | \newcommand\LARGE{\@setfontsize\LARGE{16pt}{18pt}} 83 | \else 84 | \newcommand\large{\@setfontsize\large\@xipt\@xiipt} 85 | \newcommand\LARGE{\@setfontsize\LARGE{13pt}{15pt}} 86 | \fi 87 | \newcommand\Large{\@setfontsize\Large\@xivpt{16dd}} 88 | \newcommand\huge{\@setfontsize\huge\@xxpt{25}} 89 | \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} 90 | % 91 | \def\runheadhook{\rlap{\smash{\lower6.5pt\hbox to\textwidth{\hrulefill}}}} 92 | \if@twocolumn 93 | \setlength{\textwidth}{17.4cm} 94 | \setlength{\textheight}{234mm} 95 | \AtEndOfClass{\setlength\columnsep{6mm}} 96 | \else 97 | \if@smallext 98 | \setlength{\textwidth}{11.9cm} 99 | \setlength{\textheight}{19.4cm} 100 | \else 101 | \setlength{\textwidth}{12.2cm} 102 | \setlength{\textheight}{19.8cm} 103 | \fi 104 | \fi 105 | % 106 | \AtBeginDocument{% 107 | \@ifundefined{@journalname} 108 | {\typeout{Unknown journal: specify \string\journalname\string{% 109 | \string} in preambel^^J}}{}} 110 | % 111 | \endinput 112 | %% 113 | %% End of file `svglov3.clo'. 114 | -------------------------------------------------------------------------------- /Source/paper.tex: -------------------------------------------------------------------------------- 1 | %% *************************************************************************** 2 | %% My paper 3 | %% 4 | %% Authors: Emmett Brown, Marty McFly, Biff Tannen 5 | %% 6 | %% NOTE: this file will not compile until you called the script 7 | %% generate-preamble.php once. See the file Readme.md to understand what 8 | %% to do. 9 | %% 10 | %% This paper is an instance of the PaperShell template. For more 11 | %% information, please visit https://github.com/sylvainhalle/PaperShell 12 | %% *************************************************************************** 13 | %% --------------------------- 14 | %% Author preamble. The contents of this file change depending on the 15 | %% paper class you choose. 16 | %% --------------------------- 17 | \input{preamble.inc.tex} 18 | 19 | %% --------------------------- 20 | %% If you wish to include additional packages, define new environments or 21 | %% new commands, put them in the file includes.tex 22 | %% 23 | %% Write your abstract in the file abstract.tex. 24 | %% --------------------------- 25 | 26 | %% --------------------------- 27 | %% Introduction 28 | %% --------------------------- 29 | \section{Introduction} %% {{{ 30 | 31 | M\ae{}cenas sodales ex in risus convallis elementum. Pr\ae{}sent at sem fermentum, egestas dolor non, ultrices elit. Cras at justo sit amet dolor lobortis blandit. Phasellus sodales erat eget tellus facilisis tristique. Nulla purus velit, hendrerit in cursus ut, euismod vit\ae{} odio. Morbi nec metus quis augue interdum ullamcorper ac at nisi. Nullam vit\ae{} imperdiet mauris. Nullam a ligula felis. Etiam at erat blandit nibh interdum posuere id at mi. Ut vit\ae{} ornare leo. Morbi vestibulum mauris id tellus volutpat, eget feugiat lorem maximus. 32 | 33 | Donec maximus dui quis velit placerat auctor. Fusce vel tincidunt mi, vel porta eros. Fusce egestas purus sit amet ex hendrerit, at commodo justo rutrum. Nam interdum pharetra commodo. Duis ligula turpis, ultrices at posuere ac, posuere pretium eros. Ut vehicula sagittis quam eu luctus. Morbi lectus tortor, fermentum eu ultricies non, scelerisque et tortor. Mauris blandit gravida metus, sit amet consequat tortor finibus vel. Vivamus in sollicitudin nibh, eget maximus lorem. Mauris arcu leo, aliquet nec fringilla sed, auctor sit amet nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 34 | 35 | %% }}} --- Section 36 | 37 | %% --------------------------- 38 | %% A section 39 | %% --------------------------- 40 | \section{Donec id eros non nisl pharetra} %% {{{ 41 | 42 | In hendrerit commodo urna sit amet egestas. Phasellus ut faucibus diam. Etiam quis hendrerit augue. Nam vel arcu at massa iaculis ullamcorper. Sed in malesuada enim, ac rutrum augue \cite{Lenat83a}. Donec efficitur egestas massa in varius. Etiam at nibh commodo, iaculis massa nec, rutrum sem. Mauris imperdiet massa eu nibh fermentum, ac ultricies metus sollicitudin. Donec vel dolor non turpis efficitur rhoncus. M\ae{}cenas et augue congue elit viverra sagittis quis in magna. Vestibulum tempus tellus in efficitur viverra. Morbi vestibulum posuere tortor, vit\ae{} eleifend dolor iaculis id. Vestibulum ornare gravida tortor vel fermentum. Cras vulputate facilisis dui, non porttitor arcu blandit vel. 43 | 44 | \begin{figure} 45 | \centering 46 | \includegraphics[width=0.4\textwidth]{square-circle} 47 | \caption{A square and a circle} 48 | \label{fig:square-circle} 49 | \end{figure} 50 | 51 | In maximus ante at metus vulputate congue. Sed eleifend ultrices tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pr\ae{}sent quis rutrum elit. Nunc auctor nibh non sem consequat gravida. Nulla non dapibus metus. Cras viverra tempor nibh sit amet malesuada. Etiam non ante purus. M\ae{}cenas eleifend ultricies orci, ut fermentum erat suscipit elementum. Sed est libero, laoreet vel sodales ac, consectetur sed enim. Quisque hendrerit ac erat vit\ae{} posuere. Sed eros sapien, luctus ut justo lacinia, vestibulum sagittis lorem. Mauris porta dapibus dui, eu iaculis dolor faucibus id. 52 | 53 | %% }}} --- Section 54 | 55 | %% --------------------------- 56 | %% Bibliography and postamble 57 | %% --------------------------- 58 | \input{midamble.inc.tex} 59 | \bibliography{paper} 60 | \input{postamble.inc.tex} 61 | 62 | \end{document} 63 | 64 | %% :folding=explicit:wrap=soft:mode=latex: -------------------------------------------------------------------------------- /Source/fixbib.sty: -------------------------------------------------------------------------------- 1 | %%%% This sty file contains all necessary bibliographic code to 2 | %%%% produce AAAI / AI Magazine author-year style referecnes. 3 | %%%% Stolen from ijcai97.sty by Dan Weld 1/27/99 4 | 5 | % Lists 6 | \leftmargini 2em 7 | \leftmarginii 2em 8 | \leftmarginiii 1em 9 | \leftmarginiv 0.5em 10 | \leftmarginv 0.5em 11 | \leftmarginvi 0.5em 12 | 13 | \leftmargin\leftmargini 14 | \labelsep 5pt 15 | \labelwidth\leftmargini\advance\labelwidth-\labelsep 16 | 17 | \def\@listI{\leftmargin\leftmargini 18 | \parsep 2pt plus 1pt minus 0.5pt% 19 | \topsep 4pt plus 1pt minus 2pt% 20 | \itemsep 2pt plus 1pt minus 0.5pt% 21 | \partopsep 1pt plus 0.5pt minus 0.5pt} 22 | 23 | \let\@listi\@listI 24 | \@listi 25 | 26 | \def\@listii{\leftmargin\leftmarginii 27 | \labelwidth\leftmarginii\advance\labelwidth-\labelsep 28 | \parsep 1pt plus 0.5pt minus 0.5pt 29 | \topsep 2pt plus 1pt minus 0.5pt 30 | \itemsep \parsep} 31 | \def\@listiii{\leftmargin\leftmarginiii 32 | \labelwidth\leftmarginiii\advance\labelwidth-\labelsep 33 | \parsep 0pt plus 1pt 34 | \partopsep 0.5pt plus 0pt minus 0.5pt 35 | \topsep 1pt plus 0.5pt minus 0.5pt 36 | \itemsep \topsep} 37 | \def\@listiv{\leftmargin\leftmarginiv 38 | \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} 39 | \def\@listv{\leftmargin\leftmarginv 40 | \labelwidth\leftmarginv\advance\labelwidth-\labelsep} 41 | \def\@listvi{\leftmargin\leftmarginvi 42 | \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} 43 | 44 | % We're never going to need a table of contents, so just flush it to 45 | % save space --- suggested by drstrip@sandia-2 46 | %\def\addcontentsline#1#2#3{} 47 | 48 | %%%% named.sty 49 | 50 | \typeout{Named Citation Style, version of 30 November 1994} 51 | 52 | % This file implements citations for the ``named'' bibliography style. 53 | % Place it in a file called named.sty in the TeX search path. (Placing it 54 | % in the same directory as the LaTeX document should also work.) 55 | 56 | % Prepared by Peter F. Patel-Schneider, with the assistance of several, 57 | % since forgotten, LaTeX hackers. 58 | % This style is NOT guaranteed to work. It is provided in the hope 59 | % that it will make the preparation of papers easier. 60 | % 61 | % There are undoubtably bugs in this style. If you make bug fixes, 62 | % improvements, etc. please let me know. My e-mail address is: 63 | % pfps@research.att.com 64 | 65 | % The preparation of this file was supported by Schlumberger Palo Alto 66 | % Research and AT\&T Bell Laboratories. 67 | 68 | % This file can be modified and used in other conferences as long 69 | % as credit to the authors and supporting agencies is retained, this notice 70 | % is not changed, and further modification or reuse is not restricted. 71 | 72 | % The ``named'' bibliography style creates citations with labels like 73 | % \citeauthoryear{author-info}{year} 74 | % these labels are processed by the following commands: 75 | % \cite{keylist} 76 | % which produces citations with both author and year, 77 | % enclosed in square brackets 78 | % \shortcite{keylist} 79 | % which produces citations with year only, 80 | % enclosed in square brackets 81 | % \citeauthor{key} 82 | % which produces the author information only 83 | % \citeyear{key} 84 | % which produces the year information only 85 | 86 | \def\leftcite{\@up[}\def\rightcite{\@up]} 87 | 88 | \def\cite{\def\citeauthoryear##1##2{\def\@thisauthor{##1}% 89 | \ifx \@lastauthor \@thisauthor \relax \else##1, \fi ##2}\@icite} 90 | \def\shortcite{\def\citeauthoryear##1##2{##2}\@icite} 91 | 92 | \def\citeauthor{\def\citeauthoryear##1##2{##1}\@nbcite} 93 | \def\citeyear{\def\citeauthoryear##1##2{##2}\@nbcite} 94 | 95 | % internal macro for citations with [] and with breaks between citations 96 | % used in \cite and \shortcite 97 | \def\@icite{\leavevmode\def\@citeseppen{-1000}% 98 | \def\@cite##1##2{\leftcite\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}\rightcite}% 99 | \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} 100 | % internal macro for citations without [] and with no breaks 101 | % used in \citeauthor and \citeyear 102 | \def\@nbcite{\leavevmode\def\@citeseppen{1000}% 103 | \def\@cite##1##2{{##1\if@tempswa , ##2\fi}}% 104 | \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} 105 | 106 | % don't box citations, separate with ; and a space 107 | % also, make the penalty between citations a parameter, 108 | % it may be a good place to break 109 | \def\@citex[#1]#2{% 110 | \def\@lastauthor{}\def\@citea{}% 111 | \@cite{\@for\@citeb:=#2\do 112 | {\@citea\def\@citea{;\penalty\@citeseppen\ }% 113 | \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi 114 | \@ifundefined{b@\@citeb}{\def\@thisauthor{}{\bf ?}\@warning 115 | {Citation `\@citeb' on page \thepage \space undefined}}% 116 | {\csname b@\@citeb\endcsname}\let\@lastauthor\@thisauthor}}{#1}} 117 | 118 | % raise the brackets in bibliography labels 119 | \def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}\@up{[}#1\@up{]}\hfill} 120 | 121 | \def\@up#1{\leavevmode\raise.2ex\hbox{#1}} 122 | 123 | % Optional changes 124 | 125 | %%%% use parentheses in the reference list and citations 126 | %\def\leftcite{(}\def\rightcite{)} 127 | %\def\@biblabel#1{\def\citeauthoryear##1##2{##1, ##2}(#1)\hfill} 128 | 129 | %%%% no key in the reference list 130 | %\def\@lbibitem[#1]#2{\item\if@filesw 131 | % { \def\protect##1{\string ##1\space}\immediate 132 | % \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} 133 | %\def\thebibliography#1{\section*{References\@mkboth 134 | % {REFERENCES}{REFERENCES}}\list 135 | % {}{\labelwidth 0pt\leftmargin\labelwidth \itemsep 0.5ex} 136 | % \def\newblock{\hskip .11em plus .33em minus .07em} 137 | % \sloppy\clubpenalty4000\widowpenalty4000 138 | % \sfcode`\.=1000\relax} -------------------------------------------------------------------------------- /settings.inc.php: -------------------------------------------------------------------------------- 1 | "lncs", 11 | 12 | /* 13 | * The affiliations. This should be an array of arrays, where 14 | * the first sub-array corresponds to institution 1 in authors.txt, 15 | * the second sub-array corresponds to institution 2, etc. Leave any 16 | * of these fields blank to omit them from the paper. 17 | * Used only in ACM publications; for other styles, the address 18 | * lines in authors.txt are sufficient. 19 | */ 20 | //"author-affiliations" => array( 21 | // array( 22 | // "streetaddress" => "123 Riverside Av.", 23 | // "city" => "Hill Valley", 24 | // "state" => "CA", 25 | // "country" => "USA", 26 | // "postcode" => "91234" 27 | // ) 28 | //), 29 | 30 | /* 31 | * A short title for the paper, used for running heads. If unspecified, 32 | * the title from authors.txt will be used 33 | */ 34 | //"short-title" => "My Short Title", 35 | 36 | /* 37 | * The name (without extension) of the bib file, if not the default 38 | * "paper.bib". 39 | */ 40 | //"bib-name" => "report", 41 | 42 | /* 43 | * Whether the paper contains an abstract. 44 | */ 45 | //"abstract" => false, 46 | 47 | /* 48 | * If you wish to use a different font size than the default, 49 | * specify it here (in points) 50 | */ 51 | //"point-size" => 12, 52 | 53 | /* 54 | * The name of the journal to compile for. 55 | * - In the ACM journal style, you must use a journal name found in 56 | * acmart.cls. 57 | * - In the Elsevier and IEEE transactions journal style, you can use any 58 | * string you like. 59 | * - You can ignore this parameter for all other styles. 60 | */ 61 | "journal-name" => "TISSEC", 62 | 63 | /* 64 | * The journal volume. Used only in the ACM and IEEE transactions 65 | * journal style. 66 | */ 67 | //"volume" => 9, 68 | 69 | /* 70 | * The journal number. Used only in the ACM and IEEE transactions 71 | * journal style. 72 | */ 73 | //"number" => 4, 74 | 75 | /* 76 | * The journal article number. Used only in the ACM journal style 77 | * and IEEE CS magazine style. 78 | */ 79 | //"article-number" => 39, 80 | 81 | /* 82 | * The article's publication year (if not the current year). 83 | * Used only in the ACM, IEEE transactions and IEEE CS magazine styles. 84 | */ 85 | //"year" => 1955, 86 | 87 | /* 88 | * The article's publication month (if not the current month). 89 | * Used only in the ACM and IEEE transactions/magazine journal style. 90 | */ 91 | //"month" => 3, 92 | 93 | /* 94 | * Keywords associated to the article. 95 | * Used only in the ACM journal, IEEE transactions and LIPICS styles. 96 | */ 97 | //"keywords" => "science, magic, art", 98 | 99 | /* 100 | * If the paper is published in a conference, the booktitle of 101 | * the conference. Used only in ACM conference proceedings. 102 | */ 103 | "booktitle" => "42nd Conference on Very Important Topics", 104 | 105 | /* 106 | * If the paper is published in a conference, the acronym of 107 | * the conference (e.g. "ICFF '16"). Used only in ACM conference 108 | * proceedings. 109 | */ 110 | //"conference" => "OUTATIME '55", 111 | 112 | /* 113 | * If the paper is published in a conference, the long name of 114 | * the conference. Used only in LIPICS proceedings. 115 | */ 116 | //"conf-name" => "42nd Conference on Very Important Topics", 117 | 118 | /* 119 | * If the paper is published in a conference, the location 120 | * of the conference. Used in ACM conference proceedings 121 | * and LIPICS. 122 | */ 123 | //"conference-loc" => "Hill Valley, CA, USA", 124 | 125 | /* 126 | * If the paper is published in a conference, the date 127 | * of the conference. Used in ACM conference proceedings 128 | * and LIPICS. 129 | */ 130 | //"conference-date" => "July 1955", 131 | 132 | /* 133 | * Copyright information to be overridden. Used only in ACM conference 134 | * proceedings. 135 | */ 136 | //"copyright" => "0-89791-88-6/97/05", 137 | 138 | /* 139 | * The article's DOI 140 | */ 141 | //"doi" => "0000001.0000001", 142 | 143 | /* 144 | * The journal's ISSN 145 | */ 146 | //"issn" => "1234-56789", 147 | 148 | /* 149 | * The journal's ISBN 150 | */ 151 | //"isbn" => "1234-56789", 152 | 153 | /* 154 | * The 2012 ACM classification string; used only in LIPICS 155 | */ 156 | //"acm-class" => "", 157 | 158 | /* 159 | * The 2012 ACM classification number; used only in LIPICS 160 | */ 161 | //"acm-number" => "", 162 | 163 | /* 164 | * The ACM copyright status. One of none, acmcopyright, 165 | * acmlicensed, rightsretained, usgov, usgovmixed, cagov, 166 | * cagovmixed. Has no effect on other stylesheets. 167 | */ 168 | // "acm-copyright" => "none", 169 | 170 | /* 171 | * Whether to use the Computer Modern font or the Times font. This 172 | * only works for Springer LNCS, and is ignored in all other styles. 173 | */ 174 | //"use-times" => true, 175 | 176 | /* 177 | * A bibliography style. Use it to override the bib style provided 178 | * by each editor. Leave it to the empty string otherwise. 179 | */ 180 | //"bib-style" => "abbrv", 181 | 182 | /* 183 | * The default path for images when using the \includegraphics{} 184 | * command. 185 | */ 186 | //"graphicspath" => array("fig/", "whatever/"), 187 | 188 | /* 189 | * Set whether to use the microtype package. No good reason to 190 | * turn it off unless it clashes with some other package. 191 | */ 192 | //"microtype" => false, 193 | 194 | /* 195 | * A string for the corresponding address. Used in stvrauth, ignored 196 | * in other styles 197 | */ 198 | //"corr-addr" => "", 199 | 200 | /* 201 | * Set whether the paper will be typeset using double spacing. 202 | * Ignored in all styles except stvrauth. 203 | */ 204 | //"doublespace" => true, 205 | 206 | /* 207 | * Set whether the hyperref package will be disabled. IEEE requires 208 | * the camera-ready version to have no bookmarks, so in that case set 209 | * this to true. 210 | */ 211 | //"disable-hr" => true, 212 | 213 | /* 214 | * Sets the sub-type of the document, for EasyChair proceedings. 215 | * Valid values are EPiC, EPiCempty, debug, verbose, notimes, withtimes, 216 | * a4paper, letterpaper, or the empty string. This setting is ignored in 217 | * every other document class. 218 | */ 219 | //"easychair-type" => "", 220 | 221 | /* 222 | * The name of the editor. Used only in IEEE CS magazine style. 223 | */ 224 | "editor-name" => "Stanford S.\\ Strickland", 225 | 226 | /* 227 | * The editor e-mail. Used only in IEEE CS magazine style. 228 | */ 229 | "editor-email" => "strickland@hillvalley.edu", 230 | 231 | /* 232 | * Any other string to be appended to the parameters of the 233 | * \documentclass instruction. You should probably start this string 234 | * with a comma, since it comes after other options. 235 | */ 236 | "otheropts" => "", 237 | 238 | /* 239 | * A dummy parameter, just so you don't bother about removing 240 | * the comma from the last uncommented parameter above. Leave this 241 | * uncommented at all times. 242 | */ 243 | "dummy" => "dummy" 244 | )); 245 | ?> -------------------------------------------------------------------------------- /export.php: -------------------------------------------------------------------------------- 1 | . 18 | **************************************************************************/ 19 | 20 | /* 21 | * Creates a stand-alone directory with all the sources. This script 22 | * reads the original source file (paper.tex) and replaces all non-commented 23 | * \input{...} instructions with the content of the file. It also includes 24 | * the bibliography (paper.bbl) directly within the file. The resulting, 25 | * stand-alone LaTeX file is copied to a new folder (Export), along with all 26 | * necessary auxiliary files (basically everything in the Source folder that 27 | * is not a .tex file). 28 | * 29 | * Normally, what is present in the Export folder is a single compilable .tex 30 | * file (no \include or \input), class files and images. It is suitable for 31 | * sending as a bundle e.g. to an editor to compile the camera-ready version. 32 | * 33 | * This script does a crude pattern matching to resolve includes. It has 34 | * a few caveats: 35 | * 36 | * - An \input instruction for the same file that appears both commented and 37 | * uncommented in the source will be replaced for all its occurrences 38 | * - A construct of the form \scalebox{0.5}{\input{fig/somefile}} currently does 39 | * not work (it is replaced by nothing) 40 | */ 41 | 42 | // Version string 43 | $version_string = `php set-style.php --show-version`; 44 | 45 | // Read config settings 46 | $config = array( 47 | "tex-name" => "paper", 48 | "bib-name" => "paper", 49 | "src-folder" => "Source", 50 | "num-repeats" => 3, 51 | "new-folder" => "Export", 52 | "flatten" => false 53 | ); 54 | if (file_exists("settings.inc.php")) 55 | { 56 | include("settings.inc.php"); 57 | } 58 | 59 | // Override with any command line arguments 60 | for ($i = 1; $i < count($argv); $i++) 61 | { 62 | $arg = $argv[$i]; 63 | if ($arg === "--flatten") 64 | { 65 | $config["flatten"] = true; 66 | } 67 | } 68 | 69 | // Basic info 70 | echo "PaperShell v".$version_string."\nA template environment for papers written in LaTeX\n(C) 2015-2022 Sylvain Hallé, Université du Québec à Chicoutimi\nhttps://github.com/sylvainhalle/PaperShell\n"; 71 | 72 | // Creates directory for stand-alone (deletes and re-creates to clean) 73 | delete_dir($config["new-folder"]); 74 | mkdir($config["new-folder"]); 75 | 76 | // Resolve includes in input file 77 | $input_text = file_get_contents($config["src-folder"]."/".$config["tex-name"].".tex"); 78 | for ($i = 0; $i < $config["num-repeats"]; $i++) 79 | { 80 | preg_match_all("/^[^\\%]*\\\\input\\{(.*?)\\}/m", $input_text, $matches); 81 | foreach ($matches[1] as $include_filename) 82 | { 83 | $actual_filename = $include_filename; 84 | if (!ends_with($actual_filename, ".tex")) 85 | { 86 | // The .tex extension is optional 87 | $actual_filename .= ".tex"; 88 | } 89 | $file_contents = file_get_contents($config["src-folder"]."/".$actual_filename); 90 | $file_contents = str_replace("$1", "\\$1", $file_contents); 91 | $file_contents = str_replace("\\", "\\\\", $file_contents); 92 | $input_text = preg_replace("/^([^\\%]*)\\\\input\\{".$include_filename."\\}/m", "$1".$file_contents, $input_text); 93 | } 94 | } 95 | 96 | // Add bibliography 97 | $bib_filename = $config["src-folder"]."/".$config["tex-name"].".bbl"; 98 | if (file_exists($bib_filename)) 99 | { 100 | $input_text = str_replace("\\bibliography{".$config["tex-name"]."}", file_get_contents($bib_filename), $input_text); 101 | } 102 | else 103 | { 104 | echo "File $bib_filename does not exist. Have you compiled the original paper first?\n"; 105 | } 106 | // Comment out \bibliographystyle, we don't need it 107 | $input_text = str_replace("\\bibliographystyle{", "%\\bibliographystyle{", $input_text); 108 | 109 | // Puts contents in stand-alone folder 110 | rcopy($config["src-folder"], "", $config["new-folder"], "", $config["flatten"]); 111 | file_put_contents($config["new-folder"]."/".$config["tex-name"].".tex", $input_text); 112 | 113 | // Done 114 | echo "\nDone. A stand-alone version of the sources is available in folder `".$config["new-folder"]."`\n"; 115 | echo "You should go compile it to make sure everything is OK.\n"; 116 | echo "Once done, use the script `zip-export.sh` to create an archive.\n"; 117 | exit(0); 118 | 119 | /** 120 | * Deletes a directory recursively 121 | */ 122 | function delete_dir($path) // {{{ 123 | { 124 | if (is_dir($path) === true) 125 | { 126 | $files = array_diff(scandir($path), array('.', '..')); 127 | foreach ($files as $file) 128 | { 129 | delete_dir(realpath($path) . '/' . $file); 130 | } 131 | return rmdir($path); 132 | } 133 | else if (is_file($path) === true) 134 | { 135 | return unlink($path); 136 | } 137 | return false; 138 | } // }}} 139 | 140 | /** 141 | * Copies files and non-empty directories 142 | */ 143 | function rcopy($src, $dst, $dst_root, $indent="", $flatten = false) // {{{ 144 | { 145 | echo $indent."$src -> $dst\n"; 146 | if (is_dir($src)) 147 | { 148 | if (!$flatten) 149 | { 150 | echo $indent."Creating $dst\n"; 151 | mkdir($dst_root."/".$dst); 152 | } 153 | $files = scandir($src); 154 | foreach ($files as $file) 155 | { 156 | if ($file !== "." && $file !== ".." && can_copy($src, $file)) 157 | { 158 | if ($flatten) 159 | { 160 | rcopy("$src/$file", "$dst_root/$file", $dst_root, $indent." ", $flatten); 161 | } 162 | else 163 | { 164 | rcopy("$src/$file", "$dst_root/$dst/$file", $dst_root, $indent." ", $flatten); 165 | } 166 | } 167 | } 168 | } 169 | else if (file_exists($src)) copy($src, $dst); 170 | } // }}} 171 | 172 | /** 173 | * Determines if a file should be copied to the stand-alone folder 174 | */ 175 | function can_copy($folder, $filename) // {{{ 176 | { 177 | global $config; 178 | if (substr($filename, strlen($filename) - 1) === "~" || substr($filename, strlen($filename) - 3) === "tmp") 179 | { 180 | // Any temp file is not OK 181 | return false; 182 | } 183 | if (starts_with($filename, "labpal")) 184 | { 185 | // LabPal files are OK 186 | return true; 187 | } 188 | if (is_dir($config["src-folder"]."/".$filename) || strpos($folder, "/") !== false) 189 | { 190 | // Anything within a subfolder is OK 191 | return true; 192 | } 193 | $extension = substr($filename, strlen($filename) - 3); 194 | // In the main folder, anything with these extensions is OK too 195 | return $extension === "sty" || $extension === "cls" 196 | || $extension === "bbl"; // || $extension === "bst"; 197 | } // }}} 198 | 199 | /** 200 | * Checks if a string starts with something 201 | * @param $string The string 202 | * @param $pattern The pattern to look for 203 | */ 204 | function starts_with($string, $pattern) // {{{ 205 | { 206 | if (strlen($string) < strlen($pattern)) 207 | { 208 | return false; 209 | } 210 | return substr($string, 0, strlen($pattern)) === $pattern; 211 | } // }}} 212 | 213 | /** 214 | * Checks if a string ends with something 215 | * @param $string The string 216 | * @param $pattern The pattern to look for 217 | */ 218 | function ends_with($string, $pattern) // {{{ 219 | { 220 | return substr($string, strlen($string) - strlen($pattern)) === $pattern; 221 | } // }}} 222 | 223 | // :wrap=none:folding=explicit: 224 | ?> -------------------------------------------------------------------------------- /Source/breakurl.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `breakurl.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% breakurl.dtx (with options: `package') 8 | %% 9 | %% This is a generated file. 10 | %% 11 | %% Copyright (C) 2005 by Vilar Camara Neto. 12 | %% 13 | %% This file may be distributed and/or modified under the 14 | %% conditions of the LaTeX Project Public License, either 15 | %% version 1.2 of this license or (at your option) any later 16 | %% version. The latest version of this license is in: 17 | %% 18 | %% http://www.latex-project.org/lppl.txt 19 | %% 20 | %% and version 1.2 or later is part of all distributions of 21 | %% LaTeX version 1999/12/01 or later. 22 | %% 23 | %% Currently this work has the LPPL maintenance status "maintained". 24 | %% 25 | %% The Current Maintainer of this work is Vilar Camara Neto. 26 | %% 27 | %% This work consists of the files breakurl.dtx and 28 | %% breakurl.ins and the derived file breakurl.sty. 29 | %% 30 | \NeedsTeXFormat{LaTeX2e}[1999/12/01] 31 | \ProvidesPackage{breakurl} 32 | [2009/01/24 v1.30 Breakable hyperref URLs] 33 | 34 | 35 | \RequirePackage{xkeyval} 36 | \RequirePackage{ifpdf} 37 | 38 | \ifpdf 39 | % Dummy package options 40 | \DeclareOptionX{preserveurlmacro}{} 41 | \DeclareOptionX{hyphenbreaks}{} 42 | \DeclareOptionX{vertfit}{} 43 | \ProcessOptionsX\relax 44 | 45 | \PackageWarning{breakurl}{% 46 | You are using breakurl while processing via pdflatex.\MessageBreak 47 | \string\burl\space will be just a synonym of \string\url.\MessageBreak} 48 | \DeclareRobustCommand{\burl}{\url} 49 | \DeclareRobustCommand*{\burlalt}{\hyper@normalise\burl@alt} 50 | \def\burl@alt#1#2{\hyper@linkurl{\Hurl{#1}}{#2}} 51 | \expandafter\endinput 52 | \fi 53 | 54 | \@ifpackageloaded{hyperref}{}{% 55 | \PackageError{breakurl}{The breakurl depends on hyperref package}% 56 | {I can't do anything. Please type X , edit the source file% 57 | \MessageBreak 58 | and add \string\usepackage\string{hyperref\string} before 59 | \string\usepackage\string{breakurl\string}.} 60 | \endinput 61 | } 62 | 63 | \newif\if@preserveurlmacro\@preserveurlmacrofalse 64 | \newif\if@burl@fitstrut\@burl@fitstrutfalse 65 | \newif\if@burl@fitglobal\@burl@fitglobalfalse 66 | 67 | \newtoks\burl@toks 68 | 69 | \let\burl@charlistbefore\empty 70 | \let\burl@charlistafter\empty 71 | 72 | \def\burl@addtocharlistbefore{\g@addto@macro\burl@charlistbefore} 73 | \def\burl@addtocharlistafter{\g@addto@macro\burl@charlistafter} 74 | 75 | \bgroup 76 | \catcode`\&=12\relax 77 | \hyper@normalise\burl@addtocharlistbefore{%} 78 | \hyper@normalise\burl@addtocharlistafter{:/.?#&_,;!} 79 | \egroup 80 | 81 | \def\burl@growmif#1#2{% 82 | \g@addto@macro\burl@mif{\def\burl@ttt{#1}\ifx\burl@ttt\@nextchar#2\else}% 83 | } 84 | \def\burl@growmfi{% 85 | \g@addto@macro\burl@mfi{\fi}% 86 | } 87 | \def\burl@defifstructure{% 88 | \let\burl@mif\empty 89 | \let\burl@mfi\empty 90 | \expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=% 91 | \burl@charlistbefore\do{% 92 | \expandafter\burl@growmif\@nextchar\@burl@breakbeforetrue 93 | \burl@growmfi 94 | }% 95 | \expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=% 96 | \burl@charlistafter\do{% 97 | \expandafter\burl@growmif\@nextchar\@burl@breakaftertrue 98 | \burl@growmfi 99 | }% 100 | } 101 | 102 | \AtEndOfPackage{\burl@defifstructure} 103 | 104 | \def\burl@setvertfit#1{% 105 | \lowercase{\def\burl@temp{#1}}% 106 | \def\burl@opt{local}\ifx\burl@temp\burl@opt 107 | \@burl@fitstrutfalse\@burl@fitglobalfalse 108 | \else\def\burl@opt{strut}\ifx\burl@temp\burl@opt 109 | \@burl@fitstruttrue\@burl@fitglobalfalse 110 | \else\def\burl@opt{global}\ifx\burl@temp\burl@opt 111 | \@burl@fitstrutfalse\@burl@fitglobaltrue 112 | \else 113 | \PackageWarning{breakurl}{Unrecognized vertfit option `\burl@temp'.% 114 | \MessageBreak 115 | Adopting default `local'} 116 | \@burl@fitstrutfalse\@burl@fitglobalfalse 117 | \fi\fi\fi 118 | } 119 | 120 | \DeclareOptionX{preserveurlmacro}{\@preserveurlmacrotrue} 121 | \DeclareOptionX{hyphenbreaks}{% 122 | \bgroup 123 | \catcode`\&=12\relax 124 | \hyper@normalise\burl@addtocharlistafter{-}% 125 | \egroup 126 | } 127 | \DeclareOptionX{vertfit}[local]{\burl@setvertfit{#1}} 128 | 129 | \ProcessOptionsX\relax 130 | 131 | \def\burl@hyper@linkurl#1#2{% 132 | \begingroup 133 | \hyper@chars 134 | \burl@condpdflink{#1}% 135 | \endgroup 136 | } 137 | 138 | \def\burl@condpdflink#1{% 139 | \literalps@out{ 140 | /burl@bordercolor {\@urlbordercolor} def 141 | /burl@border {\@pdfborder} def 142 | }% 143 | \if@burl@fitstrut 144 | \sbox\pdf@box{#1\strut}% 145 | \else\if@burl@fitglobal 146 | \sbox\pdf@box{\burl@url}% 147 | \else 148 | \sbox\pdf@box{#1}% 149 | \fi\fi 150 | \dimen@\ht\pdf@box\dimen@ii\dp\pdf@box 151 | \sbox\pdf@box{#1}% 152 | \ifdim\dimen@ii=\z@ 153 | \literalps@out{BU.SS}% 154 | \else 155 | \lower\dimen@ii\hbox{\literalps@out{BU.SS}}% 156 | \fi 157 | \ifHy@breaklinks\unhbox\else\box\fi\pdf@box 158 | \ifdim\dimen@=\z@ 159 | \literalps@out{BU.SE}% 160 | \else 161 | \raise\dimen@\hbox{\literalps@out{BU.SE}}% 162 | \fi 163 | \pdf@addtoksx{H.B}% 164 | } 165 | 166 | \DeclareRobustCommand*{\burl}{% 167 | \leavevmode 168 | \begingroup 169 | \let\hyper@linkurl=\burl@hyper@linkurl 170 | \catcode`\&=12\relax 171 | \hyper@normalise\burl@ 172 | } 173 | 174 | \DeclareRobustCommand*{\burlalt}{% 175 | \begingroup 176 | \let\hyper@linkurl=\burl@hyper@linkurl 177 | \catcode`\&=12\relax 178 | \hyper@normalise\burl@alt 179 | } 180 | 181 | \newif\if@burl@breakbefore 182 | \newif\if@burl@breakafter 183 | \newif\if@burl@prevbreakafter 184 | 185 | \bgroup 186 | \catcode`\&=12\relax 187 | \gdef\burl@#1{% 188 | \def\burl@url{#1}% 189 | \def\burl@urltext{#1}% 190 | \burl@doit 191 | } 192 | 193 | \gdef\burl@alt#1{% 194 | \def\burl@url{#1}% 195 | \hyper@normalise\burl@@alt 196 | } 197 | \gdef\burl@@alt#1{% 198 | \def\burl@urltext{#1}% 199 | \burl@doit 200 | } 201 | 202 | \gdef\burl@doit{% 203 | \burl@toks{}% 204 | \let\burl@UrlRight\UrlRight 205 | \let\UrlRight\empty 206 | \@burl@prevbreakafterfalse 207 | \@ifundefined{@urlcolor}{\Hy@colorlink\@linkcolor}{\Hy@colorlink\@urlcolor}% 208 | \expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=% 209 | \burl@urltext\do{% 210 | \if@burl@breakafter\@burl@prevbreakaftertrue 211 | \else\@burl@prevbreakafterfalse\fi 212 | \@burl@breakbeforefalse 213 | \@burl@breakafterfalse 214 | \expandafter\burl@mif\burl@mfi 215 | \if@burl@breakbefore 216 | % Breakable if the current char is in the `can break before' list 217 | \burl@flush\linebreak[0]% 218 | \else 219 | \if@burl@prevbreakafter 220 | \if@burl@breakafter\else 221 | % Breakable if the current char is not in any of the `can break' 222 | % lists, but the previous is in the `can break after' list. 223 | % This mechanism accounts for sequences of `break after' characters, 224 | % where a break is allowed only after the last one 225 | \burl@flush\linebreak[0]% 226 | \fi 227 | \fi 228 | \fi 229 | \expandafter\expandafter\expandafter\burl@toks 230 | \expandafter\expandafter\expandafter{% 231 | \expandafter\the\expandafter\burl@toks\@nextchar}% 232 | }% 233 | \let\UrlRight\burl@UrlRight 234 | \burl@flush 235 | \literalps@out{BU.E}% 236 | \Hy@endcolorlink 237 | \endgroup 238 | } 239 | \egroup 240 | 241 | \def\the@burl@toks{\the\burl@toks} 242 | 243 | \def\burl@flush{% 244 | \expandafter\def\expandafter\burl@toks@def\expandafter{\the\burl@toks}% 245 | \literalps@out{/BU.L (\burl@url) def}% 246 | \hyper@linkurl{\expandafter\Hurl\expandafter{\burl@toks@def}}{\burl@url}% 247 | \global\burl@toks{}% 248 | \let\UrlLeft\empty 249 | }% 250 | 251 | \if@preserveurlmacro\else\let\url\burl\let\urlalt\burlalt\fi 252 | 253 | \AtBeginDvi{% 254 | \headerps@out{% 255 | /burl@stx null def 256 | /BU.S { 257 | /burl@stx null def 258 | } def 259 | /BU.SS { 260 | currentpoint 261 | /burl@lly exch def 262 | /burl@llx exch def 263 | burl@stx null ne {burl@endx burl@llx ne {BU.FL BU.S} if} if 264 | burl@stx null eq { 265 | burl@llx dup /burl@stx exch def /burl@endx exch def 266 | burl@lly dup /burl@boty exch def /burl@topy exch def 267 | } if 268 | burl@lly burl@boty gt {/burl@boty burl@lly def} if 269 | } def 270 | /BU.SE { 271 | currentpoint 272 | /burl@ury exch def 273 | dup /burl@urx exch def /burl@endx exch def 274 | burl@ury burl@topy lt {/burl@topy burl@ury def} if 275 | } def 276 | /BU.E { 277 | BU.FL 278 | } def 279 | /BU.FL { 280 | burl@stx null ne {BU.DF} if 281 | } def 282 | /BU.DF { 283 | BU.BB 284 | [ /H /I /Border [burl@border] /Color [burl@bordercolor] 285 | /Action << /Subtype /URI /URI BU.L >> /Subtype /Link BU.B /ANN pdfmark 286 | /burl@stx null def 287 | } def 288 | /BU.BB { 289 | burl@stx HyperBorder sub /burl@stx exch def 290 | burl@endx HyperBorder add /burl@endx exch def 291 | burl@boty HyperBorder add /burl@boty exch def 292 | burl@topy HyperBorder sub /burl@topy exch def 293 | } def 294 | /BU.B { 295 | /Rect[burl@stx burl@boty burl@endx burl@topy] 296 | } def 297 | /eop where { 298 | begin 299 | /@ldeopburl /eop load def 300 | /eop { SDict begin BU.FL end @ldeopburl } def 301 | end 302 | } { 303 | /eop { SDict begin BU.FL end } def 304 | } ifelse 305 | }% 306 | } 307 | \endinput 308 | %% 309 | %% End of file `breakurl.sty'. 310 | -------------------------------------------------------------------------------- /Source/eptcs.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 2 | \ProvidesClass{eptcs}[2022/05/20 v1.7] 3 | 4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 | %%%% options %%%% 6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 | \newif\ifadraft 8 | \newif\ifsubmission 9 | \newif\ifpreliminary 10 | \newif\ifcopyright 11 | \newif\ifpublicdomain 12 | \newif\ifcreativecommons 13 | \newif\ifnoderivs 14 | \newif\ifsharealike 15 | \newif\ifnoncommercial 16 | \adraftfalse 17 | \submissionfalse 18 | \preliminaryfalse 19 | \copyrightfalse 20 | \publicdomainfalse 21 | \creativecommonsfalse 22 | \noderivsfalse 23 | \sharealikefalse 24 | \noncommercialfalse 25 | \DeclareOption{adraft}{\adrafttrue} 26 | \DeclareOption{submission}{\submissiontrue} 27 | \DeclareOption{preliminary}{\preliminarytrue} 28 | \DeclareOption{copyright}{\copyrighttrue} 29 | \DeclareOption{publicdomain}{\publicdomaintrue} 30 | \DeclareOption{creativecommons}{\creativecommonstrue} 31 | \DeclareOption{noderivs}{\noderivstrue} 32 | \DeclareOption{noncommercial}{\noncommercialtrue} 33 | \DeclareOption{sharealike}{\sharealiketrue} 34 | \ProcessOptions\relax 35 | 36 | \LoadClass[letterpaper,11pt,twoside]{article} 37 | 38 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 39 | %% On US letter paper the margins (left-top-right-bottom) are %% 40 | %% 2.795cm - 1.23cm - 2.795cm - 3.46cm %% 41 | %% Note: When \topmargin would be 0, the real top margin would be %% 42 | %% (72-25-12=35pt) + 1pt (unused portion of head) = .5in = 1.27cm. %% 43 | %% The bottom margin is 11in - 1in + 0.04cm - 623/72in = 3.46cm. %% 44 | %% On the first page the bottom margin contains various footers. %% 45 | %% When translating from US letter to A4 paper, without scaling, by %% 46 | %% leaving the centre of the paper invariant (as is possible when %% 47 | %% printing the paper with acroread), the resulting A4 margins are %% 48 | %% 2.5cm - 2.11cm - 2.5cm - 4.34cm %% 49 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 50 | 51 | \textwidth 16cm % A4 width is 21cm % 52 | \textheight 623.01pt % 46 lines exactly = 21.98cm % 53 | \oddsidemargin -0.04cm % +1 inch = 2.5cm % 54 | \evensidemargin -0.04cm % +1 inch = 2.5cm % 55 | \topmargin -0.04cm % +1 inch = 2.5cm % 56 | \advance\topmargin-\headheight % 12pt % 57 | \advance\topmargin-\headsep % 25pt % 58 | \marginparwidth 45pt % leaves 15pt from A4 edge % 59 | \advance\evensidemargin .295cm % centre w.r.t. letter paper % 60 | \advance\oddsidemargin .295cm % centre w.r.t. letter paper % 61 | 62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 63 | %%%% load eptcsdata when available %%%% 64 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 65 | \IfFileExists{eptcsdata.tex}{\input{eptcsdata}}{} 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 68 | %%%% Pagestyle and titlepage %%%% 69 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 70 | \pagestyle{myheadings} 71 | \renewcommand\pagestyle[1]{} % ignore further \pagestyles 72 | 73 | \renewcommand\maketitle{\par 74 | \begingroup 75 | \providecommand{\event}{} 76 | \ifadraft 77 | \providecommand{\publicationstatus}{\Large DRAFT\quad\today} 78 | \else\ifsubmission 79 | \providecommand{\publicationstatus}{Submitted to:\\ 80 | \event} 81 | \else\ifpreliminary 82 | \providecommand{\publicationstatus}{Preliminary Report. Final version to appear in:\\ 83 | \event} 84 | \else 85 | \providecommand{\publicationstatus}{To appear in EPTCS.} 86 | \fi\fi\fi 87 | \providecommand{\titlerunning}{Please define {\ttfamily $\backslash$titlerunning}} 88 | \providecommand{\authorrunning}{Please define {\ttfamily $\backslash$authorrunning}} 89 | \providecommand{\copyrightholders}{\authorrunning} 90 | \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 91 | \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% 92 | \long\def\@makefntext##1{\parindent 1em\noindent 93 | \hb@xt@1.8em{% 94 | \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% 95 | \newpage 96 | \global\@topnum\z@ % Prevents figures from going at top of page. 97 | \@maketitle 98 | \thispagestyle{empty}\@thanks 99 | \endgroup 100 | \setcounter{footnote}{0}% 101 | \label{FirstPage} 102 | \global\let\thanks\relax 103 | \global\let\maketitle\relax 104 | \global\let\@maketitle\relax 105 | \global\let\@thanks\@empty 106 | \global\let\@author\@empty 107 | \global\let\@date\@empty 108 | \global\let\@title\@empty 109 | \global\let\title\relax 110 | \global\let\author\relax 111 | \global\let\date\relax 112 | \global\let\and\relax 113 | } 114 | \def\@maketitle{% adapted from article.cls 115 | \newpage 116 | \noindent 117 | \raisebox{-22.8cm}[0pt][0pt]{\footnotesize 118 | \begin{tabular}{@{}l} 119 | \publicationstatus 120 | \end{tabular}} 121 | \hfill\vspace{-1em} 122 | \raisebox{-22.8cm}[0pt][0pt]{\footnotesize 123 | \makebox[0pt][r]{ 124 | \begin{tabular}{l@{}} 125 | \ifpublicdomain 126 | This work is \href{https://creativecommons.org/publicdomain/zero/1.0/} 127 | {dedicated to the public domain}. 128 | \else 129 | \ifcopyright 130 | \copyright~\copyrightholders\\ 131 | \fi 132 | \ifcreativecommons 133 | This work is licensed under the 134 | \ifnoncommercial 135 | \href{https://creativecommons.org}{Creative Commons}\\ 136 | \ifnoderivs 137 | \href{https://creativecommons.org/licenses/by-nc-nd/4.0/} 138 | {Attribution-Noncommercial-No Derivative Works} License. 139 | \else\ifsharealike 140 | \href{https://creativecommons.org/licenses/by-nc-sa/4.0/} 141 | {Attribution-Noncommercial-Share Alike} License. 142 | \else 143 | \href{https://creativecommons.org/licenses/by-nc/4.0/} 144 | {Attribution-Noncommercial} License. 145 | \fi\fi 146 | \else 147 | \ifnoderivs 148 | \href{https://creativecommons.org}{Creative Commons}\\ 149 | \href{https://creativecommons.org/licenses/by-nd/4.0/} 150 | {Attribution-No Derivative Works} License. 151 | \else\ifsharealike 152 | \href{https://creativecommons.org}{Creative Commons}\\ 153 | \href{https://creativecommons.org/licenses/by-sa/4.0/} 154 | {Attribution-Share Alike} License. 155 | \else 156 | \\\href{https://creativecommons.org}{Creative Commons} 157 | \href{https://creativecommons.org/licenses/by/4.0/} 158 | {Attribution} License. 159 | \fi\fi 160 | \fi 161 | \fi 162 | \fi 163 | \end{tabular}}} 164 | \null 165 | %\vskip 2em% a bit of space removed (< 2em) 166 | \begin{center}% 167 | \let \footnote \thanks 168 | {\LARGE\bfseries \@title \par}% \bf added 169 | \vskip 2em% was: 1.5em 170 | {\large 171 | \lineskip .5em% 172 | \begin{tabular}[t]{c}% 173 | \@author 174 | \end{tabular}\par}% 175 | \vskip 1em% \date and extra space removed 176 | \end{center}% 177 | \par 178 | \markboth{\hfill\titlerunning}{\authorrunning\hfill} 179 | \vskip .5em} 180 | 181 | \AtBeginDocument{ 182 | \providecommand{\firstpage}{1} 183 | \setcounter{firstpage}{\firstpage} 184 | \setcounter{page}{\firstpage} 185 | \@ifpackageloaded{array}% Contributed by Wolfgang Jeltsch 186 | {\newcommand{\IfArrayPackageLoaded}[2]{#1}} 187 | {\newcommand{\IfArrayPackageLoaded}[2]{#2}}} 188 | \newcommand{\institute}[1]{\IfArrayPackageLoaded 189 | {\\{\scriptsize\begin{tabular}[t]{@{}>{\footnotesize}c@{}}#1\end{tabular}}} 190 | {\\{\scriptsize\begin{tabular}[t]{@{\footnotesize}c@{}}#1\end{tabular}}}} 191 | \newcommand{\email}[1]{\\{\footnotesize\ttfamily #1}} 192 | 193 | \renewenvironment{abstract}{\begin{list}{}% header removed and noindent 194 | {\rightmargin\leftmargin 195 | \listparindent 1.5em 196 | \parsep 0pt plus 1pt} 197 | \small\item}{\end{list} 198 | } 199 | 200 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 201 | \RequirePackage{hyperref} % add hyperlinks 202 | \RequirePackage{mathptmx} % Pick Times Roman as a base font 203 | 204 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 205 | %%%% Remember page numbers %%%% 206 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 207 | \newcounter{firstpage} 208 | \setcounter{firstpage}{1} 209 | \AtEndDocument{\clearpage 210 | \addtocounter{page}{-1} 211 | \immediate\write\@auxout{\string 212 | \newlabel{LastPage}{{}{\thepage}{}{page.\thepage}{}}}% 213 | \newwrite\pages 214 | \immediate\openout\pages=\jobname.pag 215 | \immediate\write\pages{\arabic{firstpage}-\arabic{page}} 216 | \addtocounter{page}{1}} 217 | 218 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 219 | %%%% Less space in lists %%%% 220 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 221 | \def\@listi{\leftmargin\leftmargini 222 | \parsep 2.5\p@ \@plus1.5\p@ \@minus\p@ 223 | \topsep 5\p@ \@plus2\p@ \@minus5\p@ 224 | \itemsep2.5\p@ \@plus1.5\p@ \@minus\p@} 225 | \let\@listI\@listi 226 | \@listi 227 | \def\@listii {\leftmargin\leftmarginii 228 | \labelwidth\leftmarginii 229 | \advance\labelwidth-\labelsep 230 | \topsep 1\p@ \@plus\p@ \@minus\p@ 231 | \parsep 1\p@ \@plus\p@ \@minus\p@ 232 | \itemsep \parsep} 233 | \def\@listiii{\leftmargin\leftmarginiii 234 | \labelwidth\leftmarginiii 235 | \advance\labelwidth-\labelsep 236 | \topsep \z@ 237 | \parsep \z@ 238 | \itemsep \topsep} 239 | 240 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 241 | %%%% References small and with less space between items %%%% 242 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 243 | \renewenvironment{thebibliography}[1] 244 | {\section*{\refname}\small% small added 245 | \list{\@biblabel{\@arabic\c@enumiv}}% 246 | {\settowidth\labelwidth{\@biblabel{#1}}% 247 | \leftmargin\labelwidth 248 | \advance\leftmargin\labelsep 249 | \@openbib@code 250 | \usecounter{enumiv}% 251 | \let\p@enumiv\@empty 252 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 253 | \sloppy 254 | \clubpenalty4000 255 | \@clubpenalty \clubpenalty 256 | \widowpenalty4000% 257 | \sfcode`\.\@m 258 | \setlength{\parskip}{0pt}% 259 | \setlength{\itemsep}{3pt plus 2pt}% less space between items 260 | } 261 | {\def\@noitemerr 262 | {\@latex@warning{Empty `thebibliography' environment}}% 263 | \endlist} 264 | -------------------------------------------------------------------------------- /Source/stvrauth.cls: -------------------------------------------------------------------------------- 1 | %--------------------------------------------------------------------------- 2 | %Please be aware that the use of this LaTeX class file is governed by the 3 | %following conditions: 4 | % 5 | % based on the original LaTeX ARTICLE DOCUMENT STYLE 6 | % Copyright (C) 1988, 1989 by Leslie Lamport 7 | % 8 | % Copyright (c) 2010 John Wiley & Sons, Ltd, The Atrium, Southern Gate, Chichester, 9 | % West Sussex, PO19 8SQ UK. All rights reserved. 10 | % 11 | %Rules of Use 12 | % 13 | %% You are NOT ALLOWED to change this file. 14 | % 15 | % 16 | %This class file is made available for use by authors who wish to prepare an 17 | %article for publication in 18 | %SOFTWARE TESTING, VERIFICATION AND RELIABILITY 19 | %published by John Wiley & Sons Ltd. The user may not exploit any part of 20 | %the class file commercially. 21 | % 22 | %This class file is provided on an `as is' basis, without warranties of any 23 | %kind, either expressed or implied, including but not limited to warranties of 24 | %title, or implied warranties of merchantablility or fitness for a 25 | %particular purpose. There will be no duty on the author[s] of the software 26 | %or John Wiley & Sons Ltd to correct any errors or defects in the software. 27 | %Any statutory rights you may have remain unaffected by your acceptance of 28 | %these rules of use. 29 | %--------------------------------------------------------------------------- 30 | % 31 | % Created by Alistair Smith, Sunrise Setting Ltd, 13 May 2010 32 | % 33 | % stvrauth.cls --- For Softw. Test. Verif. Reliab. 34 | 35 | \def\update{2010/05/13 v2.00} 36 | 37 | \newcommand{\journalname}{SOFTWARE TESTING, VERIFICATION AND RELIABILITY} 38 | \newcommand{\journalnamelc}{Software Testing, Verification and Reliability} 39 | \newcommand{\journalabb}{Softw. Test. Verif. Reliab.} 40 | \newcommand{\journalclass}{stvrauth.cls} 41 | \newcommand{\journalclassshort}{stvrauth} 42 | \newcommand{\DOI}{stvr} 43 | 44 | \NeedsTeXFormat{LaTeX2e} 45 | \ProvidesClass{stvrauth}[\update\ \journalclass] 46 | 47 | %\newcommand\hmmax{0} 48 | 49 | \newif\if@timesfont 50 | \DeclareOption{times}{% 51 | \@timesfonttrue} 52 | 53 | \newif\if@doublespace 54 | \DeclareOption{doublespace}{% 55 | \@doublespacetrue} 56 | 57 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 58 | \ProcessOptions 59 | \LoadClass{article} 60 | \if@timesfont 61 | \RequirePackage{times} 62 | \fi 63 | \if@doublespace 64 | \RequirePackage[onehalfspacing]{setspace} 65 | \fi 66 | 67 | \RequirePackage{graphicx} 68 | \RequirePackage{pifont,latexsym,ifthen,rotating,calc,textcase,booktabs,color} 69 | \RequirePackage{amsfonts,amssymb,amsbsy,amsmath,amsthm} 70 | %\RequirePackage{bm} 71 | \RequirePackage[errorshow]{tracefnt} 72 | 73 | \@twosidetrue 74 | \flushbottom 75 | \frenchspacing 76 | 77 | \textwidth 34pc 78 | \textheight 645pt 79 | %\setlength\columnsep{24pt} 80 | 81 | %Trim sizes 82 | \setlength\voffset{-1in} 83 | \setlength\hoffset{-1in} 84 | \topmargin -1mm 85 | \setlength\oddsidemargin{33mm}%back margin on odd pages 86 | \setlength\evensidemargin{33mm}%fore margin on even pages 87 | \setlength\paperwidth{210mm} 88 | \setlength\paperheight{276mm} 89 | %Needed to set PDF page size 90 | \special{papersize=210mm,276mm} 91 | 92 | \parskip \z@ 93 | \parindent 1em 94 | \headheight 50pt 95 | \headsep 20pt 96 | \footskip 24pt 97 | 98 | \hyphenpenalty=1000 99 | \pretolerance=8000 100 | \tolerance=9500 101 | \hbadness=8000 102 | \vbadness=9000 103 | \displaywidowpenalty=0 104 | \clubpenalty=10000 105 | \widowpenalty=10000 106 | \lefthyphenmin=3% 107 | \righthyphenmin=3% 108 | \brokenpenalty=10000% 109 | 110 | \thinmuskip = 3mu 111 | \medmuskip = 4mu 112 | \thickmuskip = 5mu 113 | 114 | \setcounter{topnumber}{10} 115 | \def\topfraction{1} 116 | \setcounter{bottomnumber}{10} 117 | \def\bottomfraction{0.8} 118 | \setcounter{totalnumber}{10} 119 | \def\textfraction{0} 120 | \renewcommand{\floatpagefraction}{0.95} 121 | \setcounter{dbltopnumber}{10} 122 | \renewcommand{\dblfloatpagefraction}{0.95} 123 | \renewcommand{\dbltopfraction}{1} 124 | 125 | \renewcommand{\normalsize}{\fontsize{10.3}{12pt}\selectfont} 126 | \renewcommand{\small}{\fontsize{9.5}{10pt}\selectfont} 127 | \renewcommand{\footnotesize}{\fontsize{8.5}{9pt}\selectfont} 128 | \renewcommand{\scriptsize}{\fontsize{8.5}{9.5pt}\selectfont} 129 | \renewcommand{\tiny}{\fontsize{6.5}{7pt}\selectfont} 130 | \renewcommand{\large}{\fontsize{11.5}{12pt}\selectfont} 131 | \renewcommand{\Large}{\fontsize{14}{18pt}\selectfont} 132 | \renewcommand{\LARGE}{\fontsize{17}{22pt}\selectfont} 133 | \renewcommand{\huge}{\fontsize{20}{25pt}\selectfont} 134 | \renewcommand{\Huge}{\fontsize{25}{30pt}\selectfont} 135 | 136 | \newcommand{\titlesize}{\fontsize{15.3}{16pt}\selectfont} 137 | \newcommand{\tabsize}{\fontsize{9}{9.5pt}\selectfont} 138 | 139 | \newbox\absbox 140 | \def\abstract{\lrbox\absbox\minipage{\textwidth}% 141 | \small\normalfont% 142 | \centerline{{SUMMARY}}\par\vspace{8pt}% 143 | } 144 | \def\endabstract{\copyrightline\endminipage\endlrbox} 145 | 146 | \def\keywords#1{% 147 | \gdef\@keywords{\small{KEY WORDS:}\hspace{0.75em}\parbox[t]{28pc}{#1}}} 148 | \let\@keywords\@empty 149 | 150 | \skip\footins 22pt plus 8pt 151 | %\gdef\footnoterule{} 152 | \def\footnoterule{\kern-3\p@ 153 | \hrule \@width 60pt \kern 2.6\p@} 154 | 155 | \renewcommand{\thefootnote}{\fnsymbol{footnote}} 156 | \long\def\@makefntext#1{\parindent 1em% 157 | \noindent{$\m@th^{\@thefnmark}$}#1} 158 | 159 | \def\corraddr#1{% 160 | \gdef\@corraddr{% 161 | \footnotetext[1]{Correspondence to: #1\stepcounter{footnote}}}} 162 | \let\@corraddr\@empty 163 | \def\corrauth{\footnotemark[1]} 164 | 165 | \def\address#1{% 166 | \gdef\@address{{\footnotesize\itshape #1}}} 167 | \let\@address\@empty 168 | 169 | \def\cgsn#1#2{% 170 | \gdef\@cgsn{% 171 | \footnotetext[0]{\\ 172 | Contract/grant sponsor: #1; contract/grant 173 | number: #2}}} 174 | 175 | \def\cgs#1{% 176 | \gdef\@cgs{% 177 | \footnotetext[0]{\\ 178 | Contract/grant sponsor: #1}}} 179 | 180 | \let\@cgsn\@empty 181 | \let\@cgs\@empty 182 | 183 | \def\affilnum#1{${}^{#1}$} 184 | \def\affil#1{${}^{#1}$} 185 | \def\comma{${}^{\text{,}}$} 186 | 187 | \renewcommand\maketitle{\par 188 | \begingroup 189 | \if@twocolumn 190 | \ifnum \col@number=\@ne 191 | \@maketitle 192 | \else 193 | \twocolumn[\@maketitle]% 194 | \fi 195 | \else 196 | \newpage 197 | \global\@topnum\z@ % Prevents figures from going at top of page. 198 | \@maketitle 199 | \fi 200 | \thispagestyle{title}\label{FirstPage}\@corraddr\@cgs\@cgsn 201 | \endgroup 202 | %\setcounter{footnote}{0}% 203 | \global\let\address\relax 204 | \global\let\thanks\relax 205 | \global\let\maketitle\relax 206 | \global\let\@maketitle\relax 207 | \global\let\@thanks\@empty 208 | \global\let\@author\@empty 209 | \global\let\@date\@empty 210 | \global\let\@title\@empty 211 | \global\let\@address\@empty 212 | \global\let\corraddr\relax 213 | \global\let\title\relax 214 | \global\let\author\relax 215 | \global\let\date\relax 216 | \global\let\and\relax 217 | } 218 | \def\@maketitle{\vspace*{6pt}% 219 | \null% 220 | \begin{center} 221 | {\titlesize\@title \par}% 222 | \vskip 1.5em % 223 | \vskip 5pt 224 | {\large 225 | \lineskip .5em% 226 | \@author 227 | \par}% 228 | \vskip 11pt 229 | {\footnotesize 230 | \lineskip .5em% 231 | % 232 | {\raggedright\emph\@address} 233 | \par}% 234 | \end{center} 235 | \vskip 31pt% 236 | {\noindent\usebox\absbox\par} 237 | {\lineskip 1.5em% 238 | % 239 | {\noindent\footnotesize Received \dots}\par} 240 | {\vspace{11pt}% 241 | % 242 | {\noindent\@keywords}\par} 243 | \vspace{12pt} 244 | \par% 245 | } 246 | 247 | \def\startpage{\pageref{FirstPage}} 248 | \def\endpage{\pageref{LastPage}} 249 | \def\volumeyear{0000} 250 | \def\volumenumber{00} 251 | 252 | \gdef\copyrightline{Copyright \copyright\ \volumeyear\ John Wiley \& Sons, Ltd.} 253 | \def\runningheads#1#2{\markboth{\uppercase{#1}}{\uppercase{#2}}} 254 | 255 | \def\ps@title{% 256 | \def\@oddhead{% 257 | \parbox[t]{\textwidth}{% 258 | \begin{tabular}[t]{@{}l@{}}% 259 | {\footnotesize\journalname}\\[-3pt] 260 | {\footnotesize\emph{\journalabb} \volumeyear; \textbf{\volumenumber}:\startpage--\endpage}\\[-3pt] 261 | {\footnotesize Published online in Wiley InterScience (www.interscience.wiley.com). DOI: 10.1002/\DOI} 262 | \end{tabular}}}% 263 | \let\@evenhead\@oddhead 264 | \def\@oddfoot{\parbox[t]{\textwidth}{% 265 | {\footnotesize\copyrightline\hfill\\ 266 | \textit{Prepared using \textsf{\journalclass} [Version: \update]\hfill}% 267 | }}} 268 | \let\@evenfoot\@oddfoot} 269 | 270 | \def\ps@wpage{ 271 | \let\@mkboth\@gobbletwo 272 | \def\@evenhead{\normalsize \thepage\hfill\footnotesize{\leftmark}\hfill\normalsize\phantom{\thepage}} 273 | \def\@oddhead{\normalsize \phantom{\thepage}\hfill\footnotesize{\rightmark}\hfill\normalsize\thepage} 274 | \def\@evenfoot{\parbox[t]{\textwidth}{{\footnotesize \copyrightline}% 275 | \hfill\footnotesize{\it \journalabb\ }(\volumeyear)\\ % 276 | \footnotesize\textit{Prepared using \textsf{\journalclass}}\hfill DOI: 10.1002/\DOI}} 277 | \def\@oddfoot{\@evenfoot} 278 | } 279 | 280 | \renewcommand{\@seccntformat}[1]{{\csname the#1\endcsname.}\hspace{0.5em}} 281 | 282 | \newdimen\@bls 283 | \@bls=\baselineskip 284 | 285 | \renewcommand\section{\@startsection {section}{1}{\z@}% 286 | {2\@bls plus .3\@bls minus .1\@bls}% 287 | {1\@bls\@afterindentfalse}% 288 | {\centering\normalfont\normalsize\protect\MakeTextUppercase}} 289 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% 290 | {\@bls plus .3\@bls minus .1\@bls}% 291 | {6pt\@afterindentfalse}% 292 | {\normalfont\normalsize\raggedright\itshape}} 293 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% 294 | {\@bls plus .2\@bls}% 295 | {-5pt}% 296 | {\normalfont\normalsize\itshape}} 297 | 298 | \def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else 299 | \advance\@enumdepth \@ne 300 | \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list 301 | {\csname label\@enumctr\endcsname}{\usecounter 302 | {\@enumctr}\itemsep 0pt\parsep 0pt 303 | \def\makelabel##1{\hss\llap{##1}}}\fi} 304 | 305 | \let\endenumerate =\endlist 306 | 307 | \def\itemize{\ifnum \@itemdepth >3 \@toodeep\else \advance\@itemdepth \@ne 308 | \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% 309 | \list{\csname\@itemitem\endcsname}{\itemsep 0pt\parsep 0pt 310 | \def\makelabel##1{\hss\llap{##1}}}\fi} 311 | 312 | \let\enditemize =\endlist 313 | 314 | \renewcommand{\thetable}{\Roman{table}} 315 | 316 | \usepackage{caption} 317 | \DeclareCaptionLabelSeparator{jwperiod}{.\hspace*{0.5ex}} 318 | \captionsetup[figure]{font=small,labelfont=rm,labelsep=jwperiod,justification=centerlast,singlelinecheck=true} 319 | \captionsetup[table]{position=top,font=small,labelfont=rm,labelsep=jwperiod,justification=centerlast,singlelinecheck=true} 320 | 321 | \def\thmhead@plain#1#2#3{% 322 | \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }{#2}}% 323 | \thmnote{ {\the\thm@notefont(#3)}}} 324 | 325 | \newtheoremstyle{wiley} 326 | {6pt plus 2pt minus 2pt}% space above 327 | {6pt plus 2pt minus 2pt}% space below 328 | {}% Body font 329 | {}% Indent amount 330 | {\itshape}% Theorem head font 331 | {}% Punctuation after theorem head 332 | {\newline}% Space after theorem head 333 | {}% Theorem head spec 334 | 335 | \renewenvironment{proof}[1][\proofname]{\par 336 | \pushQED{\qed}% 337 | \normalfont \topsep6\p@\@plus6\p@\relax 338 | \trivlist 339 | \item[\hskip\labelsep 340 | \itshape 341 | #1\@addpunct{}]\mbox{}\newline\ignorespaces 342 | }{% 343 | \popQED\endtrivlist\@endpefalse 344 | } 345 | 346 | \theoremstyle{wiley} 347 | 348 | \def\ack{\vspace{2\@bls plus .3\@bls minus .1\@bls} 349 | \noindent{\footnotesize\centerline{ACKNOWLEDGEMENT}}\\[6pt]\small\noindent}% 350 | 351 | \def\acks{\vspace{2\@bls plus .3\@bls minus .1\@bls} 352 | \noindent{\footnotesize\centerline{ACKNOWLEDGEMENTS}}\\[6pt]\small\noindent}% 353 | 354 | \renewcommand\refname{REFERENCES} 355 | 356 | \renewenvironment{thebibliography}[1]{% 357 | \vspace{2\@bls plus .3\@bls minus .1\@bls} 358 | \noindent{\footnotesize\centerline{\refname}}\\[-3pt] 359 | \list{{\arabic{enumi}}}{\def\makelabel##1{\hss{##1.}}\topsep=0\p@\parsep=0\p@ 360 | \partopsep=0\p@\itemsep=0\p@ 361 | \labelsep=1ex\itemindent=0\p@ 362 | \settowidth\labelwidth{\footnotesize[#1]}% 363 | \leftmargin\labelwidth 364 | \advance\leftmargin\labelsep 365 | \advance\leftmargin -\itemindent 366 | \usecounter{enumi}}\footnotesize 367 | \def\newblock{\ } 368 | \sloppy\clubpenalty4000\widowpenalty4000 369 | \sfcode`\.=1000\relax}{\endlist} 370 | 371 | %\def\biog{\section*{Author's Biography}\small} 372 | %\def\biogs{\section*{Authors' Biographies}\small} 373 | 374 | \AtEndDocument{% 375 | \label{LastPage}} 376 | 377 | \hyphenation{com-mu-ni-ca-tions} 378 | 379 | \pagestyle{wpage} 380 | \normalsize 381 | \sloppy 382 | -------------------------------------------------------------------------------- /Source/aaai.sty: -------------------------------------------------------------------------------- 1 | \def\year{2015} 2 | % 3 | %Filename: aaai.sty 4 | % 5 | \typeout{Conference Style for AAAI for LaTeX 2e -- version of 1 January 2015} 6 | % WARNING: IF YOU ARE USING THIS STYLE SHEET FOR AN AAAI PUBLICATION, YOU 7 | % MAY NOT MODIFY IT FOR ANY REASON. MODIFICATIONS (IN YOUR SOURCE 8 | % OR IN THIS STYLE SHEET WILL RESULT IN REJECTION OF YOUR PAPER). 9 | 10 | % NOTICE: DO NOT MODIFY THIS FILE WITHOUT CHANGING ITS NAME. This style 11 | % file is called aaai.sty. Modifications to this file are permitted, 12 | % provided that your modified version does not include the acronym "aaai" 13 | % in its name, that credit to the authors and supporting agencies is 14 | % retained, and that further modification or reuse is not restricted. This 15 | % file was originally prepared by Peter F. Patel-Schneider, liberally 16 | % using the ideas of other style hackers, including Barbara Beeton. It was 17 | % modified in April 1999 by J. Scott Penberthy and George Ferguson. It was 18 | % modified in 2007 by AAAI. It was modified in February 2009 19 | % and in November 2009 by Hans W. Guesgen and Giuseppe De Giacomo. It 20 | % was further modified in March 2010 by AAAI. 21 | % The original preparation of this file was supported by 22 | % Schlumberger Palo Alto Research, AT\&T Bell Laboratories, AAAI, and 23 | % Morgan Kaufmann Publishers. 24 | % 25 | % WARNING: This style is NOT guaranteed to work. It is provided in the 26 | % hope that it might make the preparation of papers easier, but this style 27 | % file is provided "as is" without warranty of any kind, either express or 28 | % implied, including but not limited to the implied warranties of 29 | % merchantability, fitness for a particular purpose, or noninfringement. 30 | % You use this style file at your own risk. Standard disclaimers apply. 31 | % 32 | % Do not use this file unless you are an experienced LaTeX user. To 33 | % satisfy AAAI's requirements, you must change your paper's configuration 34 | % to use Times fonts. AAAI will not accept your paper if it is formatted 35 | % using obsolete type 3 Computer Modern bitmapped fonts. Please ensure 36 | % that your version of dvips maps to type 1 fonts. Place this document in 37 | % a file called aaai.sty in the TeX search path. (Placing it in the same 38 | % directory as the paper should also work.) 39 | % 40 | % You must also format your paper for US letter-sized paper. 41 | % 42 | % There are undoubtably bugs in this style. If you would like to submit 43 | % bug fixes, improvements, etc. please let us know. Please use the contact form 44 | % at www.aaai.org. 45 | % 46 | % USE OF PDFTeX IS NOW REQUIRED 47 | % \documentclass[letterpaper]{article} 48 | % \usepackage{aaai} 49 | % \usepackage{times} 50 | % \usepackage{helvet} 51 | % \usepackage{courier} 52 | % \setlength{\pdfpagewidth}{8.5in} 53 | % \setlength{\pdfpageheight}{11in} 54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 55 | % IMPORTANT -- ADDITION OF A PDF MARK WITH YOUR PAPER TITLE 56 | % AND ALL AUTHOR NAMES IS REQUIRED ON ALL AAAI PAPERS 57 | % COMMENT OUT AUTHOR NAMES FOR SUBMISSION 58 | % ENABLE AUTHOR NAMES FOR FINAL CAMERA READY COPY 59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 60 | % PDFINFO for PDFTeX 61 | % Uncomment and complete the following for metadata if 62 | % your paper is typeset using PDFTeX 63 | % \pdfinfo{ 64 | % /Title (Input Your Paper Title Here) 65 | % /Subject (Input the Proceedings Title Here) 66 | % /Author (John Doe, Jane Doe) 67 | % } 68 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 69 | % Section Numbers 70 | % Uncomment if you want to use section numbers 71 | % and change the 0 to a 1 or 2 72 | % \setcounter{secnumdepth}{0} 73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 74 | % \title{Title} 75 | % \author{Author 1 \and Author 2 \\ Address line \\ Address line \And 76 | % Author 3 \\ Address line \\ Address line} 77 | % \begin{document} 78 | % \maketitle 79 | % ... 80 | % \bibliography{Bibliography-File} 81 | % \bibliographystyle{aaai} 82 | % \end{document} 83 | % \pubnote{\em To appear, AAAI-10} % optional, remove for submission 84 | % 85 | % \pubnote is for printing the paper yourself, and should not be used in 86 | % submitted versions!!!! 87 | % Author information can be set in various styles: 88 | % For several authors from the same institution: 89 | % \author{Author 1 \and ... \and Author n \\ 90 | % Address line \\ ... \\ Address line} 91 | % if the names do not fit well on one line use 92 | % \author{Author 1 \\ {\bf Author 2} \\ ... \\ {\bf Author n} \\ 93 | % Address line \\ ... \\ Address line} 94 | % For authors from different institutions: 95 | % \author{Author 1 \\ Address line \\ ... \\ Address line 96 | % \And ... \And 97 | % Author n \\ Address line \\ ... \\ Address line} 98 | % To start a separate ``row'' of authors use \AND, as in 99 | % \author{Author 1 \\ Address line \\ ... \\ Address line 100 | % \AND 101 | % Author 2 \\ Address line \\ ... \\ Address line \And 102 | % Author 3 \\ Address line \\ ... \\ Address line} 103 | % If the title and author information does not fit in the area allocated, 104 | % place \setlength\titlebox{height} 105 | % after the \documentstyle line 106 | % where {height} is something like 2.5in 107 | % PHYSICAL PAGE LAYOUT 108 | \setlength\topmargin{-0.25in} \setlength\oddsidemargin{-0.25in} 109 | \setlength\textheight{9.0in} \setlength\textwidth{7.0in} 110 | \setlength\columnsep{0.375in} \newlength\titlebox \setlength\titlebox{2.25in} 111 | \setlength\headheight{0pt} \setlength\headsep{0pt} 112 | %\setlength\footheight{0pt} \setlength\footskip{0pt} 113 | \thispagestyle{empty} \pagestyle{empty} 114 | \flushbottom \twocolumn \sloppy 115 | % We're never going to need a table of contents, so just flush it to 116 | % save space --- suggested by drstrip@sandia-2 117 | \def\addcontentsline#1#2#3{} 118 | % gf: PRINT COPYRIGHT NOTICE 119 | \def\copyright@year{\number\year} 120 | \def\copyright@text{Copyright \copyright\space \copyright@year, 121 | Association for the Advancement of Artificial Intelligence (www.aaai.org). 122 | All rights reserved.} 123 | \def\copyright@on{T} 124 | \def\nocopyright{\gdef\copyright@on{}} 125 | \def\copyrighttext#1{\gdef\copyright@on{T}\gdef\copyright@text{#1}} 126 | \def\copyrightyear#1{\gdef\copyright@on{T}\gdef\copyright@year{#1}} 127 | % gf: End changes for copyright notice (used in \maketitle, below) 128 | % Title stuff, taken from deproc. 129 | \def\maketitle{\par 130 | \begingroup % to make the footnote style local to the title 131 | \def\thefootnote{\fnsymbol{footnote}} 132 | % gf: Don't see why we'd want the footnotemark to be 0pt wide 133 | %\def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}} 134 | \twocolumn[\@maketitle] \@thanks 135 | \endgroup 136 | % gf: Insert copyright slug unless turned off 137 | \if T\copyright@on\insert\footins{\noindent\footnotesize\copyright@text}\fi 138 | % gf: And now back to your regular programming 139 | \setcounter{footnote}{0} 140 | \let\maketitle\relax \let\@maketitle\relax 141 | \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax} 142 | \def\@maketitle{\vbox to \titlebox{\hsize\textwidth 143 | %%% AAAI changed: 03/05/2010 144 | %%\linewidth\hsize \vskip 0.625in minus 0.125in \centering 145 | \linewidth\hsize \vskip 0.625in minus 0.125in \centering 146 | %%% END changed 147 | {\LARGE\bf \@title \par} \vskip 0.2in plus 1fil minus 0.1in 148 | {\def\and{\unskip\enspace{\rm and}\enspace}% 149 | \def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil 150 | \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\Large\bf}% 151 | \def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup 152 | \vskip 0.25in plus 1fil minus 0.125in 153 | % hg: Changed Large to normalsize on next line 154 | \hbox to \linewidth\bgroup\normalsize \hfil\hfil 155 | \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\Large\bf} 156 | \hbox to \linewidth\bgroup\normalsize \hfil\hfil 157 | \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\Large\bf\@author 158 | \end{tabular}\hss\egroup 159 | \hfil\hfil\egroup} 160 | \vskip 0.3in plus 2fil minus 0.1in 161 | }} 162 | \renewenvironment{abstract}{\centerline{\bf 163 | Abstract}\vspace{0.5ex}\begin{quote}\small}{\par\end{quote}\vskip 1ex} 164 | % jsp added: 165 | \def\pubnote#1{\thispagestyle{myheadings} 166 | \pagestyle{myheadings} 167 | \markboth{#1}{#1} 168 | \setlength\headheight{10pt} \setlength\headsep{10pt} 169 | } 170 | % SECTIONS with less space 171 | \def\section{\@startsection {section}{1}{\z@}{-2.0ex plus 172 | -0.5ex minus -.2ex}{3pt plus 2pt minus 1pt}{\Large\bf\centering}} 173 | \def\subsection{\@startsection{subsection}{2}{\z@}{-2.0ex plus 174 | -0.5ex minus -.2ex}{3pt plus 2pt minus 1pt}{\large\bf\raggedright}} 175 | \def\subsubsection{\@startsection{subparagraph}{3}{\z@}{-6pt plus 176 | %%% DIEGO changed: 29/11/2009 177 | %% 2pt minus 1pt}{-1em}{\normalsize\bf}} 178 | -2pt minus -1pt}{-1em}{\normalsize\bf}} 179 | %%% END changed 180 | \setcounter{secnumdepth}{0} 181 | % add period to section (but not subsection) numbers, reduce space after 182 | %\renewcommand{\thesection} 183 | % {\arabic{section}.\hskip-0.6em} 184 | %\renewcommand{\thesubsection} 185 | % {\arabic{section}.\arabic{subsection}\hskip-0.6em} 186 | % FOOTNOTES 187 | \footnotesep 6.65pt % 188 | \skip\footins 9pt plus 4pt minus 2pt 189 | \def\footnoterule{\kern-3pt \hrule width 5pc \kern 2.6pt } 190 | \setcounter{footnote}{0} 191 | % LISTS AND PARAGRAPHS 192 | \parindent 10pt 193 | \topsep 4pt plus 1pt minus 2pt 194 | \partopsep 1pt plus 0.5pt minus 0.5pt 195 | \itemsep 2pt plus 1pt minus 0.5pt 196 | \parsep 2pt plus 1pt minus 0.5pt 197 | \leftmargin 10pt \leftmargini\leftmargin \leftmarginii 10pt 198 | \leftmarginiii 5pt \leftmarginiv 5pt \leftmarginv 5pt \leftmarginvi 5pt 199 | \labelwidth\leftmargini\advance\labelwidth-\labelsep \labelsep 5pt 200 | \def\@listi{\leftmargin\leftmargini} 201 | \def\@listii{\leftmargin\leftmarginii 202 | \labelwidth\leftmarginii\advance\labelwidth-\labelsep 203 | \topsep 2pt plus 1pt minus 0.5pt 204 | \parsep 1pt plus 0.5pt minus 0.5pt 205 | \itemsep \parsep} 206 | \def\@listiii{\leftmargin\leftmarginiii 207 | \labelwidth\leftmarginiii\advance\labelwidth-\labelsep 208 | \topsep 1pt plus 0.5pt minus 0.5pt 209 | \parsep \z@ \partopsep 0.5pt plus 0pt minus 0.5pt 210 | \itemsep \topsep} 211 | \def\@listiv{\leftmargin\leftmarginiv 212 | \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} 213 | \def\@listv{\leftmargin\leftmarginv 214 | \labelwidth\leftmarginv\advance\labelwidth-\labelsep} 215 | \def\@listvi{\leftmargin\leftmarginvi 216 | \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} 217 | \abovedisplayskip 7pt plus2pt minus5pt% 218 | \belowdisplayskip \abovedisplayskip 219 | \abovedisplayshortskip 0pt plus3pt% 220 | \belowdisplayshortskip 4pt plus3pt minus3pt% 221 | % Less leading in most fonts (due to the narrow columns) 222 | % The choices were between 1-pt and 1.5-pt leading 223 | \def\normalsize{\@setfontsize\normalsize\@xpt{11}} % 10 point on 11 224 | \def\small{\@setfontsize\small\@ixpt{10}} % 9 point on 10 225 | \def\footnotesize{\@setfontsize\footnotesize\@ixpt{10}} % 9 point on 10 226 | \def\scriptsize{\@setfontsize\scriptsize\@viipt{10}} % 7 point on 8 227 | \def\tiny{\@setfontsize\tiny\@vipt{7}} % 6 point on 7 228 | \def\large{\@setfontsize\large\@xipt{12}} % 11 point on 12 229 | \def\Large{\@setfontsize\Large\@xiipt{14}} % 12 point on 14 230 | \def\LARGE{\@setfontsize\LARGE\@xivpt{16}} % 14 point on 16 231 | \def\huge{\@setfontsize\huge\@xviipt{20}} % 17 point on 20 232 | \def\Huge{\@setfontsize\Huge\@xxpt{23}} % 20 point on 23 233 | %%%% named style for aaai, included here for ease of use 234 | % This section implements citations for the ``named'' bibliography style, 235 | % modified for AAAI use. 236 | % This file can be modified and used in other conferences as long 237 | % as credit to the authors and supporting agencies is retained, this notice 238 | % is not changed, and further modification or reuse is not restricted. 239 | % The ``named'' bibliography style creates citations with labels like 240 | % \citeauthoryear{author-info}{year} 241 | % these labels are processed by the following commands: 242 | % \cite{keylist} 243 | % which produces citations with both author and year, 244 | % enclosed in square brackets 245 | % \shortcite{keylist} 246 | % which produces citations with year only, 247 | % enclosed in square brackets 248 | % \citeauthor{key} 249 | % which produces the author information only 250 | % \citeyear{key} 251 | % which produces the year information only 252 | \def\leftcite{(}\def\rightcite{)} 253 | \def\cite{\def\citeauthoryear##1##2{\def\@thisauthor{##1}% 254 | \ifx \@lastauthor \@thisauthor \relax \else##1 \fi ##2}\@icite} 255 | \def\shortcite{\def\citeauthoryear##1##2{##2}\@icite} 256 | \def\citeauthor{\def\citeauthoryear##1##2{##1}\@nbcite} 257 | \def\citeyear{\def\citeauthoryear##1##2{##2}\@nbcite} 258 | % internal macro for citations with () and with breaks between citations 259 | % used in \cite and \shortcite 260 | \def\@icite{\leavevmode\def\@citeseppen{-1000}% 261 | \def\@cite##1##2{\leftcite\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}\rightcite}% 262 | \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} 263 | % internal macro for citations without [] and with no breaks 264 | % used in \citeauthor and \citeyear 265 | \def\@nbcite{\leavevmode\def\@citeseppen{1000}% 266 | \def\@cite##1##2{{##1\if@tempswa , ##2\fi}}% 267 | \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} 268 | % don't box citations, separate with ; and a space 269 | % also, make the penalty between citations a parameter, 270 | % it may be a good place to break 271 | \def\@citex[#1]#2{% 272 | \def\@lastauthor{}\def\@citea{}% 273 | \@cite{\@for\@citeb:=#2\do 274 | {\@citea\def\@citea{;\penalty\@citeseppen\ }% 275 | \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi 276 | \@ifundefined{b@\@citeb}{\def\@thisauthor{}{\bf ?}\@warning 277 | {Citation `\@citeb' on page \thepage \space undefined}}% 278 | {\csname b@\@citeb\endcsname}\let\@lastauthor\@thisauthor}}{#1}} 279 | %Ignore the key when generating the Reference section. 280 | \def\@lbibitem[#1]#2{\item\if@filesw 281 | { \def\protect##1{\string ##1\space}\immediate 282 | \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} 283 | \def\thebibliography#1{\section*{References\@mkboth 284 | {REFERENCES}{REFERENCES}}\list 285 | {}{\labelwidth 0in\leftmargin\labelwidth 286 | %%% DIEGO removed 287 | %%\advance\leftmargin\labelsep 288 | %%% END removed 289 | %%% DIEGO changed 290 | \itemsep .01in % original 291 | %%\itemsep -.0125in % reduced space between bib entries 292 | %%% END changed 293 | } 294 | \def\newblock{\hskip .11em plus .33em minus .07em} 295 | \sloppy\clubpenalty4000\widowpenalty4000 296 | \sfcode`\.=1000\relax} 297 | \let\endthebibliography=\endlist 298 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | A Flexible LaTeX Article Environment 2 | ==================================== 3 | 4 | This repository provides a boilerplate environment for writing LaTeX 5 | articles using the popular templates from Springer, IEEE, ACM, AAAI, 6 | Elsevier, etc. It provides: 7 | 8 | - The up-to-date style and bibliography files of many different publishers 9 | (journals and conferences) 10 | - A script that generates the proper preamble (title, list of authors and 11 | institution) specific to each style 12 | - A very advanced Makefile (by [Chris 13 | Monson](https://github.com/shiblon/latex-makefile)) taking care of the 14 | compilation/cleaning process 15 | - Scripts (for both Windows and Linux) to perform spell checking of the 16 | LaTeX source with [GNU Aspell](http://aspell.net). The words added to the 17 | dictionary while checking are also versioned with the project. 18 | - A script that can "flatten" your sources into a single compilable .tex file 19 | (with all includes and bibliography) and export all resources in a 20 | stand-alone folder (ideal for exporting the camera-ready sources to an 21 | editor) 22 | - A `.gitignore` file suitable for a single-document LaTeX project 23 | - Multiple helper scripts to to clean up a BibTeX file, import missing 24 | citations, etc. 25 | - A script to produce the diff between two versions of the same paper 26 | highlighting the edits (using `latexdiff` in the background) 27 | 28 | Using this template, switching a paper from any stylesheet to any other 29 | simply amounts to regenerating two files with an included PHP script. You 30 | don't need to change a single line of the main, `paper.tex` document you 31 | are working on. What is more, the project's structure can be imported and 32 | used within [Overleaf](https://www.overleaf.com). 33 | 34 | Why this template? 35 | ------------------ 36 | 37 | If you have been writing lots of (Computer Science) papers, you may have 38 | been mostly using LaTeX with a couple of different document classes: 39 | 40 | - `aaai` for AAAI journals 41 | - `acmart` for ACM conferences and journals 42 | - `easychair` for [EasyChair EPiC Series and Kalpa Publications series](https://easychair.org/publications/for_authors) 43 | - `elsarticle` for Elsevier journals 44 | - `eptcs` for the *Electronic Proceedings in Theoretical Computer Science* 45 | - `IEEEtran` for IEEE conference proceedings and journals 46 | - `lipics` for the *Leibniz International Proceedings in Informatics* 47 | - `llncs` for Springer's *Lecture Notes in Computer Science* series 48 | - `sig-alternate` for ACM conference proceedings 49 | - `stvrauth` and similar for Wiley Journals 50 | - `svjour` for Springer journals 51 | - `usenix2019_v3` for USENIX publications 52 | 53 | First off, this repository provides a well-structured template project where 54 | all these classes are included, so you can pick the one you wish when 55 | starting to write. Moreover, it comes with a very powerful Makefile that 56 | does all sorts of nifty things, such as suppressing useless output from 57 | LaTeX and colouring (yes, colouring) its meaningful output (errors in red, 58 | etc.). 59 | 60 | There do exist products, such as [Overleaf](https://www.overleaf.com), which 61 | allow you to instantiate a blank LaTeX paper using many of these templates 62 | (PaperShell can interact nicely with Overleaf; see below). However, there might 63 | be various reasons for which you might want to switch an existing document from 64 | one class to the other. For example, you started writing a paper without 65 | deciding where to send it, only to find that the conference you've chosen has a 66 | different publisher than the paper's current style. Or, a paper sent to a 67 | conference (and perhaps rejected) needs to be sent to another venue with a 68 | different publisher. (Note that in the past, it used to be the *publisher's* job 69 | to format your manuscript to their taste. But that's another story.) 70 | 71 | Alas, it turns out these stylesheets are not directly interchangeable. 72 | Rather than nicely overriding the behaviour of LaTeX's original commands 73 | from the `article` document class, each class decided to invent its own 74 | commands to, e.g., define the title, authors and institution of a document 75 | --and none of them works the same way. For example, here is how to declare 76 | authors and institutions in `llncs`: 77 | 78 | \author{Emmett Brown\inst{1} \and Marty McFly\inst{1} \and Biff Tannen\inst{2}} 79 | \institute{% 80 | Temporal Industries \\ 81 | Hill Valley, CA 90193 \\ 82 | \and 83 | BiffCo inc. \\ 84 | Hill Valley, CA 90193 \\ 85 | } 86 | 87 | ...in `IEEEtran`: 88 | 89 | \author{% 90 | \IEEEauthorblockN{Emmett Brown, Marty McFly} 91 | \IEEEauthorblockA{% 92 | Temporal Industries\\ 93 | Hill Valley, CA 90193\\ 94 | } 95 | \IEEEauthorblockN{Biff Tannen} 96 | \IEEEauthorblockA{% 97 | BiffCo inc.\\ 98 | Hill Valley, CA 90193\\ 99 | } 100 | } 101 | 102 | ...in `acmart`: 103 | 104 | \author{Emmett Brown} 105 | \affiliation{ 106 | \institution{Temporal Industries} 107 | \streetaddress{Hill Valley} 108 | \state{CA} 109 | \postcode{90193} 110 | } 111 | \author{Biff Tannen} 112 | \affiliation{ 113 | \institution{BiffCo inc.} 114 | \streetaddress{Hill Valley} 115 | \state{CA} 116 | \postcode{90193} 117 | } 118 | 119 | ...and in `elsarticle`: 120 | 121 | \author{Emmett Brown\fnref{label1}} 122 | \author{Marty McFly\fnref{label1}} 123 | \author{Biff Tannen\fnref{label2}} 124 | \fntext{Temporal Industries, Hill Valley, CA 90193} 125 | \fntext{BiffCo inc., Hill Valley, CA 90193} 126 | 127 | Four different sets of commands and syntax for the same data ---and all this 128 | while `article.cls` already provides commands doing exactly that, which 129 | could have easily been overridden! To make things even worse, the class 130 | elsarticle does not even use `\maketitle` to print the title, which must be 131 | enclosed (along with the abstract) within a `frontmatter` environment *after* 132 | the `\begin{document}`. Therefore, switching between classes 133 | requires some amount of braindead, yet frustrating copy-pasting from 134 | existing files you have, which arguably becomes quite mind-numbing when 135 | you've been doing that once in a while for the past ten years. And sadly, 136 | tools like Overleaf do not allow you to switch templates once you've 137 | started writing. 138 | 139 | In this project, the paper's title, authors and institutions are written in 140 | a separate file called `authors.txt`: 141 | 142 | Applications of the Flux Capacitor 143 | 144 | Emmett Brown (1) 145 | Marty McFly (1) 146 | Biff Tannen (2) 147 | 148 | 1 149 | Temporal Industries 150 | Hill Valley, CA 95420 151 | 152 | 2 153 | BiffCo inc. 154 | Hill Valley, CA 95420 155 | 156 | (You can optionally separate first and last names with braces, e.g. 157 | `{Marty} {McFly}`. This is used in the EPTCS style for writing 158 | abbreviated author names, e.g. "E. Brown, M. McFly, B. Tannen", etc.) 159 | 160 | You then call a script named `set-style.php` to generate a preamble and 161 | postamble with the proper syntax for the document classes you want to use. These 162 | files are called `preamble.inc.tex` and `postamble.inc.tex`. 163 | 164 | To change the authors or title, or to switch between document classes, modify 165 | `authors.txt` and run`set-style.php` again. You then just need to recompile. 166 | Voilà! 167 | 168 | Quick Use 169 | --------- 170 | 171 | 0. [Download and unzip](https://github.com/sylvainhalle/PaperShell/releases/latest) 172 | the PaperShell empty project in a folder of your choice. 173 | 174 | 1. Modify `authors.txt` with the desired title, authors and institutions. 175 | The file is self-documented and tells you how to do it. 176 | 177 | 2. Call `php set-style.php style` to generate the include files, which 178 | will be placed in the `Source` subfolder. (This requires 179 | [PHP](http://php.net/) to be installed in your path.) The word `style` 180 | must be replaced by the name of a paper template, which you can select 181 | from a long list. Some of the available styles are: lncs, 182 | ieee, acmconf, elsevier, springer, aaai, acmjour, eptcs, stvr, lipics, 183 | easychair, usenix. 184 | 185 | 3. Write your text as usual in `Source/paper.tex`. Figures should 186 | be placed in the `fig` subfolder. Write your abstract in 187 | `Source/abstract.tex`, and put any other imports and declarations in 188 | `Source/includes.tex`. Write anything that should go after the 189 | bibliography (such as appendices) in `Source/appendices.tex`. 190 | 191 | 4. To compile, use `make all`. To remove temporary files, use `make clean`. 192 | The Makefile has a very comprehensive list of other useful features. To 193 | read them, run `make help`. 194 | 195 | 5. To spell check, type `./aspell-check.sh` (in Linux) or `aspell-check.bat` 196 | (in Windows) from the project's top folder. Any additions to the 197 | personal dictionary will be reflected in changes to files 198 | `.aspell.en.prepl` and `.aspell.en.pws`, which are versioned with the 199 | rest of the project. See the file `aspell-check.readme` for instructions. 200 | (Hint: you may also want to try 201 | [TeXtidote](https://github.com/sylvainhalle/textidote)). 202 | 203 | Extras 204 | ------ 205 | 206 | As an extra, the generated preamble files add a few commands that fix bugs 207 | in some document classes. 208 | 209 | - The preamble for IEEE journal fixes a [problem with a redefinition of the 210 | `\markboth` command](http://tex.stackexchange.com/a/88864) that would 211 | otherwise prevent the document from compiling 212 | - The postamble for Elsevier fixes the fact that the bibliography [does not have a section 213 | title](http://tex.stackexchange.com/questions/188625/no-references-title-using-elsevier-document-class) 214 | - The EPTCS BibTeX file incorrectly handles `doi` fields that contain an underscore. PaperShell contains a fixed version. 215 | - The LIPIcs style is incompatible with the `subfig` package. 216 | PaperShell contains a fixed version. 217 | - The Springer Nature journal style has a [bug causing Tikz to break compilation](https://tex.stackexchange.com/q/615012). PaperShell contains a fixed version. 218 | - The Springer Nature journal style also redefines the `\href` command of the `hyperref` package in a way that the link's text is never shown. PaperShell has a version where this redefinition is commented out. 219 | 220 | It also takes care of using fonts properly: 221 | 222 | - The original style files load obsolete font packages; PaperShell overrides 223 | them with newer ones with much nicer math support (e.g. `lmodern` and 224 | `mathptmx` instead of `cmr` and `times`) 225 | - In all styles, the Helvetica font (used in `\textsf`) [is larger than the 226 | text's normal font](http://www.hep.caltech.edu/~fcp/psnfss2e). 227 | PaperShell fixes this issue by scaling down Helvetica. 228 | 229 | Exporting your sources 230 | ---------------------- 231 | 232 | If your paper is accepted (yay!), you may need to send the sources to the 233 | editor so they can produce the final, "camera-ready version". Just zipping 234 | your PaperShell `Source` folder will confuse a few of them, especially if 235 | they have scripts trying to compile it automatically (many of them just 236 | try to compile the first .tex file they find, which won't be the right one 237 | in most cases). 238 | 239 | From the root folder, you can call 240 | 241 | php export.php 242 | 243 | Creates a stand-alone directory with all the sources. This script 244 | reads the original source file (paper.tex using the defaults) and 245 | replaces all non-commented 246 | `\input{...}` instructions with the content of the file. It also includes 247 | the bibliography (paper.bbl) directly within the file (so no need to 248 | call BibTeX). The resulting, 249 | stand-alone LaTeX file is copied to a new folder (`Export`), along with all 250 | necessary auxiliary files (basically everything in the Source folder that 251 | is not a .tex file). 252 | 253 | Normally, what is present in the `Export` folder is a single compilable .tex 254 | file (no `\include` or `\input`), plus class files and images. It is suitable 255 | for sending as a bundle e.g. to an editor to compile the camera-ready 256 | version. You can also bundle the whole thing (except the main .pdf file and 257 | auxiliary files) in a single zip file using `zip-export.sh`. 258 | 259 | As an option, the `export.php` script can also create a "flat" structure with no folders (some publishers ask for this when submitting source files). Use the `--flatten` command line option when invoking the script. 260 | 261 | Overleaf integration 262 | -------------------- 263 | 264 | [Overleaf](https://www.overleaf.com) is an online collaborative platform for 265 | editing LaTeX documents. Provided you have run `set-style.php` once, you can 266 | import the whole project structure into Overleaf and edit it there; don't forget 267 | to set `Source/paper.tex` as the main file. 268 | 269 | If you want to change the document to another article class, simply re-run 270 | `set-style.php` on your computer and re-upload `preamble.inc.tex`, 271 | `midamble.inc.tex` and `postamble.inc.tex` to Overleaf. This is even easier if 272 | you keep Overleaf in sync with a GitHub repository. 273 | 274 | PaperShell is also available as a 275 | [template](https://www.overleaf.com/latex/templates/papershell/vbtfsrsdjrzc) in 276 | Overleaf. To create a new paper using it, go to the *Templates* section, and 277 | type "PaperShell" in the search bar. 278 | 279 | BibTeX helper scripts 280 | -------------------- 281 | 282 | The project comes with a couple of (PHP) scripts that help manage BibTeX bibliographies. 283 | 284 | ### Cleaning up a BibTeX file 285 | 286 | You can uniformize the presentation of BibTeX entries (indentation, etc.) and 287 | remove duplicate entries by passing it into a script. In the root folder of 288 | your project, type: 289 | 290 | php clean-bibtex.php 291 | 292 | This will read and parse `Source/paper.bib` and re-output a cleaned up version 293 | at `Source/paper-clean.bib`. If everything looks good, you can then overwrite 294 | the original `paper.bib` with this new file. 295 | 296 | ### Importing BibTeX entries 297 | 298 | From an external bib file, you can automatically import in your current paper 299 | all bib entries that are cited in `paper.tex`, but are not present in 300 | `paper.bib`. In the root folder of your project, type: 301 | 302 | php import-citations.php filename 303 | 304 | Where `filename` is the path to the bib file to read from. This way, you can, 305 | for example, extract from a [JabRef](https://jabref.org) bibliography the 306 | entries you actually use in your text, without the need for manual copy-pasting 307 | of the BibTeX code. 308 | 309 | ### `diff`ing two bibliographies 310 | 311 | Given two bib files, it is possible to show the list of entries that are present 312 | in the first but not in the second. In the root folder of your project, type: 313 | 314 | php bib-diff.php file1.bib file2.bib 315 | 316 | Other helper scripts 317 | ------------------- 318 | 319 | A few other functionalities are implemented as shell scripts (with the `.sh` 320 | extension). 321 | 322 | ### Highlight differences between two versions of a paper 323 | 324 | To calculate the difference of two versions of a paper using the PaperShell 325 | template, type: 326 | 327 | ./diff-versions.sh 328 | 329 | where: 330 | 331 | - `old` is the root PaperShell folder of the "old" version of the paper 332 | - `new` is the root PaperShell folder of the "old" version of the paper 333 | - `target` is the name of the target folder that will contain the diff 334 | document (created if does not exist) 335 | 336 | The script produces a file called `changes.pdf`, where the differences between 337 | the versions are highlighted similar to the "track changes" feature in Microsoft 338 | Word (it uses [latexdiff](https://ctan.org/pkg/latexdiff) in the background). 339 | 340 | ### Archive the `Source` folder 341 | 342 | To archive the content of the `Source` folder, excluding files that are not 343 | versioned (as specified by `.gitignore`), type: 344 | 345 | ./archive-source.sh 346 | 347 | This will produce an archive called `Source.tar.gz` in the project's root 348 | folder. 349 | 350 | Overriding defaults 351 | ------------------ 352 | 353 | Default settings can be overridden by giving values to parameters found 354 | in `settings.inc.php`. All these settings are documented in detail in the 355 | file. Make sure to call `generate-preamble.php` again after you change the 356 | file. 357 | 358 | In the case of ACM journals, you also have to overwrite `acm-ccs.tex` and 359 | `acm-bottom.tex` with appropriate content. 360 | 361 | ### Changing the paper's filename 362 | 363 | By default, the main paper is called `paper.tex`. We recommend that you leave 364 | it that way: the whole point of using this environment is to use the same 365 | commands and structure for all your papers, so customizing it for each paper 366 | kind of defeats that. If you *must* change it to something else: 367 | 368 | 1. Make sure the filename does not contain spaces, or the `make` command 369 | will not do anything. 370 | 2. Make sure to change `paper.tex` by your filename in 371 | `Source/Variables.ini`. 372 | 373 | Good practices 374 | -------------- 375 | 376 | ### Use a single tex file 377 | 378 | Try to keep your paper in a single file (`paper.tex` if you use the 379 | project defaults) ---that is, do not split the paper into `section-1.tex`, 380 | `section-2.tex`, etc. that you `\input` inside `paper.tex`. A few reasons 381 | for doing so: 382 | 383 | - When spell checking, you have to run Aspell on a single file. Otherwise, 384 | you need to run it on every input file every time, and you cannot use 385 | the bundled script. 386 | - Some publishers require you to upload a single stand-alone TeX file when 387 | submitting. PaperShell has a script that can do it for you if you use 388 | the defaults, but it may not work if your paper has multiple parts in 389 | separate files (this has not been tested). 390 | - When searching for a word or an expression in your text editor, you have 391 | to search in a single file ---otherwise you have to search in all files. 392 | - If your text editor has a "Compile with LaTeX" button, clicking on it 393 | when editing one of the `section-x.tex` will try to compile only that 394 | file and will fail. You have to go back to the main file every time you 395 | need to compile. 396 | - If the goal is to make it possible to edit different parts of the same 397 | paper in parallel, don't forget you are using Git and that it should take 398 | care of this even if you edit the same file. 399 | - If you move parts of text around, the changes are easier to track in Git 400 | if they don't jump from one file to another. 401 | 402 | In all honesty, we don't see much benefit in splitting a 10-page paper 403 | into multiple parts in separate files. 404 | 405 | ### If not, at least use a single file ending with `.tex` 406 | 407 | Many publishers re-compile the LaTeX sources you upload --but their systems are not very smart. They typically take whatever `.tex` file they come across and attempt to compile it. To avoid rounds of back-and-forth uploads, stick to a single file named `paper.tex`, and avoid using that extension for everything else. 408 | 409 | About the Author 410 | ---------------- 411 | 412 | This project is maintained by [Sylvain Hallé](http://leduotang.ca/sylvain), 413 | Full Professor at [Université du Québec à 414 | Chicoutimi](http://www.uqac.ca), Canada. 415 | 416 | 417 | -------------------------------------------------------------------------------- /bibtex-bib.lib.php: -------------------------------------------------------------------------------- 1 | . 18 | **************************************************************************/ 19 | 20 | /** 21 | * Representation of a set of BibTeX entries. This class can parse a 22 | * BibTeX file and make its contents available as an associative array 23 | * of key-value pairs. Additionally, the class can export this data into 24 | * a MySQL table. 25 | * NOTE:

this class assumes that the default internal encoding for 26 | * strings is UTF-8. If not, set the internal encoding to UTF-8 by calling 27 | *
 28 |  * mb_internal_encoding("UTF-8")
 29 |  * 
30 | */ 31 | class Bibliography // {{{ 32 | { 33 | // The array of all entries 34 | var $m_entries = array(); 35 | 36 | // The name of the database table when exporting to SQL 37 | static $db_name = "entries"; 38 | 39 | /** 40 | * Constructs a Bibliiography object from data in a given filename 41 | * @param $filename The filename to read from 42 | */ 43 | public function __construct($filename = null) // {{{ 44 | { 45 | if (isset($filename)) 46 | { 47 | $cont = file_get_contents($filename); 48 | $this->parse($cont); 49 | } 50 | } // }}} 51 | 52 | /** 53 | * Adds an entry from another bibliography to the current one. 54 | * @param $k The entry's key 55 | * @param $e The entry to add 56 | */ 57 | public function addEntry($k, $e) // {{{ 58 | { 59 | $this->m_entries[$k] = $e; 60 | } // }}} 61 | 62 | /** 63 | * Gets data for entry with a given BibTeX key 64 | * @param $key The entry's key 65 | * @return An associative array containing the entry's data 66 | */ 67 | public function getEntry($key) // {{{ 68 | { 69 | return $this->m_entries[$key]; 70 | } // }}} 71 | 72 | /** 73 | * Determines if the bibliography contains a specific entry. 74 | * @param $key The entry's key 75 | * @return {@code true} if the entry is present, {@code false} otherwise 76 | */ 77 | public function containsEntry($key) // {{{ 78 | { 79 | return isset($this->m_entries[$key]); 80 | } // }}} 81 | 82 | /** 83 | * Get the list of entries in an associative array whose key is 84 | * the value of some parameter (e.g. "year") 85 | * @param $param_name The name of the parameter to group the entries 86 | * @param $allowed_types Only list entries whose bibtex type is an 87 | * element of this array. If not set or empty, all entries will be 88 | * considered. 89 | */ 90 | public function getEntriesByParameter($param_name, $allowed_types = array()) // {{{ 91 | { 92 | $years_array = array(); 93 | foreach ($this->m_entries as $bibtex_name => $bibtex_entry) 94 | { 95 | $type = $bibtex_entry["bibtex_type"]; 96 | if (!empty($allowed_types) && !in_array($type, $allowed_types)) 97 | continue; 98 | if (!isset($bibtex_entry[$param_name])) 99 | { 100 | $pn = "none"; 101 | } 102 | else 103 | $pn = $bibtex_entry[$param_name]; 104 | if (!isset($years_array[$pn])) 105 | $years_array[$pn] = array(); 106 | $years_array[$pn][$bibtex_name] = $bibtex_entry; 107 | } 108 | return $years_array; 109 | } // }}} 110 | 111 | /** 112 | * Gets an entry based on its title. This is useful when combining data 113 | * from another source with data found in the BibTeX, and the BibTeX 114 | * identifier for the paper is not known (hence a search based on the 115 | * title). The method first performs a few translations on the title to 116 | * make sure it can be found: upper/lowercases are ignored, multiple 117 | * spaces are converted to a single space, and braces and other characters 118 | * are ignored. 119 | * @param $title The title of the paper to look for 120 | * @param $entry_type The type of entry (article, inproceedings, etc.) 121 | * to search 122 | * @param $key Optional. If given, the BibTeX key of the found entry will be 123 | * written into that variable. 124 | * @return A single entry for the paper, if found 125 | */ 126 | public function getEntryByTitle($title, $entry_type, &$bibtex_key = null) // {{{ 127 | { 128 | // A little manicure on the input title 129 | $title = Bibliography::replaceAccents($title); 130 | $title = Bibliography::unspace($title); 131 | $title = Bibliography::removeBraces($title); 132 | $title = Bibliography::removePunctuation($title); 133 | $title = strtolower($title); 134 | // Now search 135 | foreach ($this->m_entries as $key => $entry) 136 | { 137 | if ($entry_type !== "" && $entry["bibtex_type"] !== $entry_type) 138 | continue; // Wrong type; skip 139 | if (!isset($entry["title"])) 140 | continue; // No title; skip 141 | $e_title = $entry["title"]; 142 | $e_title = Bibliography::removeBraces($e_title); 143 | $e_title = Bibliography::removePunctuation($e_title); 144 | $e_title = strtolower($e_title); 145 | if ($e_title == $title) 146 | { 147 | $bibtex_key = $key; 148 | return $entry; 149 | } 150 | } 151 | return null; 152 | } // }}} 153 | 154 | /** 155 | * Exports the contents of a bibliography to a set of SQL instructions. 156 | */ 157 | public function toSql() // {{{ 158 | { 159 | $out = ""; 160 | $out .= "-- This file was autogenerated by a Script With No Name\n"; 161 | $out .= "-- on ".date("Y-m-d").". It represents a set of BibTeX entries.\n\n"; 162 | $schema = $this->getParameterSet(); 163 | $out .= "-- Table schema\n"; 164 | $out .= "CREATE TABLE `".Bibliography::$db_name."` (\n"; 165 | $out .= " `identifier` varchar(128) NOT NULL,\n"; 166 | foreach ($schema as $p_name) 167 | { 168 | $type = Bibliography::guessType($p_name); 169 | $out .= " `$p_name` $type DEFAULT NULL,\n"; 170 | } 171 | $out .= " PRIMARY KEY (`identifier`)\n"; 172 | $out .= ") ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n"; 173 | $out .= "-- Entry data\n"; 174 | foreach ($this->m_entries as $bibtex_name => $bibtex_entry) 175 | { 176 | $first = true; 177 | $out .= "INSERT INTO `".Bibliography::$db_name."` SET `identifier` = '".Bibliography::escapeSql($bibtex_name)."'"; 178 | foreach ($bibtex_entry as $k => $v) 179 | { 180 | $out .= ", `$k` = '".Bibliography::escapeSql($v)."'"; 181 | } 182 | $out .= ";\n"; 183 | } 184 | return $out; 185 | } // }}} 186 | 187 | /** 188 | * Guess the (SQL) type of a parameter based on its name. If no guess 189 | * can be made, the type defaults to varchar(128). 190 | * @param The parameter name 191 | * @return The guessed data type 192 | */ 193 | protected static function guessType($name) // {{{ 194 | { 195 | $type = ""; 196 | switch ($name) 197 | { 198 | case "rate": 199 | case "year": 200 | $type = "int(11)"; 201 | break; 202 | default: 203 | $type = "varchar(128)"; 204 | break; 205 | } 206 | return $type; 207 | } // }}} 208 | 209 | /** 210 | * Escapes MySQL special characters 211 | * @param $s The string to escape 212 | * @return The escaped string 213 | */ 214 | private static function escapeSql($s) // {{{ 215 | { 216 | $matches = array("\\", "'", "\"" /*,"\0", "\b", "\n", "\r", "\t"*/); 217 | $replacements = array("\\\\", "\\'", "\\\"", /*"\\0", "\\b", "\\n", "\\r", 218 | "\\t"*/); 219 | $st = str_replace($matches, $replacements, $s); 220 | return $st; 221 | } // }}} 222 | 223 | /** 224 | * Replaces multiple whitespace characters by a single space 225 | * @param $s The string to handle 226 | * @return The transformed string 227 | */ 228 | public static function unspace($s) // {{{ 229 | { 230 | return preg_replace("/\\s\\s*/ms", " ", $s); 231 | } // }}} 232 | 233 | /** 234 | * Replaces LaTeX character sequences for accented letters by their 235 | * proper UTF-8 symbol. 236 | * @param $s The string to handle 237 | * @return The transformed string 238 | */ 239 | public static function replaceAccents($s) // {{{ 240 | { 241 | $out = $s; 242 | $patterns_braces = array( 243 | "{\\'a}", "{\\`a}", "{\\^a}", "{\\\"a}", "{\\~a}", "{\\aa}", "{\\ae}", 244 | "{\\'A}", "{\\`A}", "{\\^A}", "{\\\"A}", "{\\~A}", "{\\AA}", "{\\AE}", 245 | "{\\c{c}}", 246 | "{\\c{C}}", 247 | "{\\'e}", "{\\`e}", "{\\^e}", "{\\\"e}", 248 | "{\\'E}", "{\\`E}", "{\\^E}", "{\\\"E}", 249 | "{\\'i}", "{\\`i}", "{\\^i}", "{\\\"i}", "\'{\i}", 250 | "{\\'I}", "{\\`I}", "{\\^I}", "{\\\"I}", 251 | "{\\~n}", 252 | "{\\~N}", 253 | "{\\'o}", "{\\`o}", "{\\^o}", "{\\\"o}", "{\\~o}", "{\\oe}", "{\\o}", 254 | "{\\'O}", "{\\`O}", "{\\^O}", "{\\\"O}", "{\\~O}", "{\\OE}", "{\\O}", 255 | "{\\'u}", "{\\`u}", "{\\^u}", "{\\\"u}", 256 | "{\\'U}", "{\\`U}", "{\\^U}", "{\\\"U}", 257 | "{\\\"s}", "{!`}", "{?`}", "{\\&}" 258 | ); 259 | // Same thing without enclosing braces 260 | $patterns_nobraces = array( 261 | "\\'a", "\\`a", "\\^a", "\\\"a", "\\~a", "\\aa", "\\ae", 262 | "\\'A", "\\`A", "\\^A", "\\\"A", "\\~A", "\\AA", "\\AE", 263 | "\\c{c}", 264 | "\\c{C}", 265 | "\\'e", "\\`e", "\\^e", "\\\"e", 266 | "\\'E", "\\`E", "\\^E", "\\\"E", 267 | "\\'i", "\\`i", "\\^i", "\\\"i", "\\'i", 268 | "\\'I", "\\`I", "\\^I", "\\\"I", 269 | "\\~n", 270 | "\\~N", 271 | "\\'o", "\\`o", "\\^o", "\\\"o", "\\~o", "\\oe", "\\o", 272 | "\\'O", "\\`O", "\\^O", "\\\"O", "\\~O", "\\OE", "\\O", 273 | "\\'u", "\\`u", "\\^u", "\\\"u", 274 | "\\'U", "\\`U", "\\^U", "\\\"U", 275 | "\\\"s", "!`", "?`", "\\&" 276 | ); 277 | $replacements = array( 278 | "á", "à", "â", "ä", "ã", "å", "æ", 279 | "Á", "À", "Â", "Ä", "Ã", "Å", "Æ", 280 | "ç", 281 | "Ç", 282 | "é", "è", "ê", "ë", 283 | "É", "È", "Ê", "Ë", 284 | "í", "ì", "î", "ï", "í", 285 | "Í", "Ì", "Î", "Ï", 286 | "ñ", 287 | "Ñ", 288 | "ó", "ò", "ô", "ö", "õ", "œ", "ø", 289 | "Ó", "Ò", "Ô", "Ö", "Õ", "Œ", "Ø", 290 | "ú", "ù", "û", "ü", 291 | "Ú", "Ù", "Û", "Ü", 292 | "ß", "¡", "¿", "&"); 293 | $out = str_replace($patterns_braces, $replacements, $out); 294 | $out = str_replace($patterns_nobraces, $replacements, $out); 295 | return $out; 296 | } // }}} 297 | 298 | /** 299 | * Explodes an author name into its first name, von part, last name and 300 | * jr. part according to BibTeX's rules 301 | * @param $s The string of the author's name. It is supposed to be decoded 302 | * (i.e. the MySQL escape sequences are removed). 303 | * @return An array with 4 indexes, numbered 0-3, corresponding to the 4 304 | * parts of the name 305 | */ 306 | public static function explodeAuthorName($name) // {{{ 307 | { 308 | $vons = array("von der", "van der", "von", "van", "du", "de", "de la"); 309 | $jrs = array("Jr.", "Sr.", "II", "III"); 310 | $name_tokens = array(); 311 | $exploded = array("", "", "", ""); 312 | // Enclose every word into braces if not already 313 | $name_parts = explode(" ", $name); 314 | foreach ($name_parts as $name_part) 315 | { 316 | // We use mb_substr instead of $name_part[0] to be multibyte-safe 317 | $first = mb_substr($name_part, 0, 1); 318 | $last = mb_substr($name_part, mb_strlen($name_part) - 1, 1); 319 | if ($first !== "{" && $last !== "}") 320 | $name_tokens[] = $name_part; 321 | if ($first === "{" && $last === "}") 322 | $name_tokens[] = substr($name_part, 1, mb_strlen($name_part) - 2); 323 | if ($first === "{" && $last !== "}") 324 | $temp_name = substr($name_part, 1, mb_strlen($name_part) - 1); 325 | if ($first !== "}" && $last === "}") 326 | $name_tokens[] = $temp_name." ".substr($name_part, 0, mb_strlen($name_part) - 1); 327 | } 328 | // Now, every token that should be considered as a single word is 329 | // an element in the array. We proceed according to BibTeX rules. 330 | for ($i = 0; $i < count($name_tokens); $i++) 331 | { 332 | $token = $name_tokens[$i]; 333 | if (in_array($token, $vons)) 334 | { 335 | // There is a von part; add it and remove it from the name 336 | $exploded[1] = $token; 337 | unset($name_tokens[$i]); 338 | $name_tokens = array_values($name_tokens); 339 | $i--; 340 | } 341 | if (in_array($token, $jrs)) 342 | { 343 | // There is a Jr. part; add it and remove it from the name 344 | $exploded[3] = $token; 345 | unset($name_tokens[$i]); 346 | $name_tokens = array_values($name_tokens); 347 | $i--; 348 | } 349 | } 350 | // The last remaining token is the last name, the rest is the first name 351 | $exploded[2] = $name_tokens[count($name_tokens) - 1]; 352 | unset($name_tokens[count($name_tokens) - 1]); 353 | $exploded[0] = implode($name_tokens, " "); 354 | return $exploded; 355 | } // }}} 356 | 357 | /** 358 | * Rebuilds the author name from the exploded list of all 4 parts 359 | * (see explodeAuthorName) 360 | * @param $parts An array of name parts 361 | * @param $initial Optional. If set to true, will shorten first name to 362 | * initials only 363 | * @return A string with the rebuilt author name 364 | */ 365 | public static function implodeAuthorName($parts, $initials = false) // {{{ 366 | { 367 | $out = ""; 368 | if ($initials === true) 369 | { 370 | $first_names = explode(" ", $parts[0]); 371 | $out_first_name = ""; 372 | foreach ($first_names as $fn) 373 | { 374 | $out_first_name .= mb_substr($fn, 0, 1)."."; 375 | } 376 | $parts[0] = $out_first_name; 377 | } 378 | foreach ($parts as $part) 379 | { 380 | if (!empty($part)) 381 | $out .= $part." "; 382 | } 383 | return trim($out); 384 | } // }}} 385 | 386 | /** 387 | * Removes occurrences of curly brackets from a string 388 | * @param $s The string to handle 389 | * @return The transformed string 390 | */ 391 | public static function removeBraces($s) // {{{ 392 | { 393 | $out = $s; 394 | $out = str_replace(array("{", "}"), array("", ""), $out); 395 | return $out; 396 | } // }}} 397 | 398 | /** 399 | * Removes occurrences of punctuation symbols from a string 400 | * @param $s The string to handle 401 | * @return The transformed string 402 | */ 403 | public static function removePunctuation($s) // {{{ 404 | { 405 | $out = $s; 406 | $out = str_replace(array(".", ",", ";", ":"), array("", "", "", ""), $out); 407 | return $out; 408 | } // }}} 409 | 410 | /** 411 | * Collates all the parameters used in at least one entry in the 412 | * bibliography 413 | */ 414 | private function getParameterSet() // {{{ 415 | { 416 | $parameters = array(); 417 | foreach ($this->m_entries as $bibtex_name => $bibtex_entry) 418 | { 419 | $entry_params = array_keys($bibtex_entry); 420 | $parameters = array_merge($parameters, $entry_params); 421 | } 422 | $unique_parameters = array_unique($parameters); 423 | return $unique_parameters; 424 | } // }}} 425 | 426 | /** 427 | * Parse the contents of a BibTeX file. The parser takes a shortcut, 428 | * and detects the end of an entry by looking for a closing curly 429 | * bracket alone on its line (perhaps surrounded by whitespace 430 | * characters). Caveat emptor! 431 | * @param $contents The contents of the BibTeX file 432 | */ 433 | private function parse($contents) // {{{ 434 | { 435 | $entries = array(); 436 | preg_match_all("/@(\\w+?)\\{([^,]+?),(.*?)\\n\\s*?\\}\\s*?\\n/ms", 437 | $contents, $entries, PREG_SET_ORDER); 438 | foreach ($entries as $entry) 439 | { 440 | $bibtex_type = $entry[1]; 441 | $bibtex_name = $entry[2]; 442 | $bibtex_contents = $entry[3].",\n"; // Newline added so that all entries are followed by one 443 | preg_match_all("/(\\w+?)\\s*=\\s*\\{(.*?)\\},\\n/ms", 444 | $bibtex_contents, $pairs, PREG_SET_ORDER); 445 | $params = array(); 446 | foreach ($pairs as $pair) 447 | { 448 | $k = $pair[1]; 449 | $v = $pair[2]; 450 | $params["raw"][$k] = Bibliography::unspace($v); // We keep the original BibTeX string in the "raw" subarray 451 | $params[$k] = Bibliography::removeBraces( 452 | Bibliography::replaceAccents(Bibliography::unspace($v))); 453 | } 454 | $params["bibtex_type"] = $bibtex_type; 455 | $this->m_entries[$bibtex_name] = $params; 456 | } 457 | } // }}} 458 | 459 | /** 460 | * Outputs the contents of the bibliography as a BibTeX string 461 | */ 462 | public function toBibTeX() // {{{ 463 | { 464 | $out = ""; 465 | $tab_pad = 15; 466 | foreach ($this->m_entries as $bibtex_name => $data) 467 | { 468 | $out .= "@".$data["bibtex_type"]."{".$bibtex_name.",\n"; 469 | foreach ($data["raw"] as $k => $v) 470 | { 471 | if ($k === "bibtex_type") 472 | continue; // We already processed it 473 | $out .= " ".$k.str_repeat(" ", $tab_pad - mb_strlen($k))."= {"; 474 | $out .= str_replace("\n", "\n".str_repeat(" ", $tab_pad + 5), wordwrap($v, 55, "\n")); 475 | $out .= "},\n"; 476 | } 477 | $out = mb_substr($out, 0, mb_strlen($out) - 2); // Remove last comma 478 | $out .= "\n}\n\n"; 479 | } 480 | return $out; 481 | } // }}} 482 | 483 | /** 484 | * Sets/replaces the value of a field in a BibTeX entry. The new 485 | * value overwrites the old one both in the formatted and in the 486 | * "raw" copy of the entry. 487 | * @param $bibtex_key The ID of the entry to modify 488 | * @param $p The field name 489 | * @param $v The field value 490 | */ 491 | public function setValue($bibtex_key, $p, $v) // {{{ 492 | { 493 | $entry = $this->m_entries[$bibtex_key]; 494 | $entry[$p] = $v; 495 | $entry["raw"][$p] = $v; 496 | $this->m_entries[$bibtex_key] = $entry; 497 | } // }}} 498 | 499 | public static function dotifyName($name) // {{{ 500 | { 501 | if (strpos($name, "{") !== false) 502 | { 503 | // Last name delimited by braces: TO BE IMPLEMENTED LATER 504 | } 505 | else 506 | { 507 | // Last name is the last word 508 | $parts = explode(" ", $name); 509 | $out = ""; 510 | for ($i = 0; $i < count($parts) - 1; $i++) 511 | { 512 | $n_part = $parts[$i]; 513 | $out .= $n_part[0].". "; 514 | } 515 | $out .= $parts[count($parts) - 1]; 516 | return $out; 517 | } 518 | } // }}} 519 | 520 | public static function dotifyNames($names) // {{{ 521 | { 522 | $new_names = array(); 523 | $name_list = explode(" and ", $names); 524 | foreach ($name_list as $name) 525 | { 526 | $new_name = Bibliography::dotifyName($name); 527 | $new_names[] = $new_name; 528 | } 529 | $new_name_string = implode(", ", $new_names); 530 | return $new_name_string; 531 | } // }}} 532 | 533 | } // }}} 534 | 535 | // :folding=explicit:wrap=none: 536 | ?> 537 | -------------------------------------------------------------------------------- /Source/easychair.cls: -------------------------------------------------------------------------------- 1 | % 2 | % Some credits 3 | % 4 | 5 | \def\easychairstyleauthor{easychair class style, by Serguei A. Mokhov and Andrei Voronkov <10 December 2015>} 6 | \def\easychairstylerevision{CVS Revision: $Id: easychair.cls,v 3.4 2017/03/26 09:52 voronkov Exp $} 7 | \def\easychairstylepurpose{Designed for easyChair.org, under guidelines and suggestions of} 8 | \def\easychairstylevoronkov{\space\space\space\space\space\space\space\space\space\space\space\space\space Andrei Voronkov , and} 9 | \def\easychairstylesutcliffe{\space\space\space\space\space\space\space\space\space\space\space\space\space Geoff Sutcliffe } 10 | \def\easychairstylecopyright{Copyright terms are that of easychair.org} 11 | \def\easychairstylebugs{For bug reports, please contact } 12 | 13 | \everyjob{\typeout{\easychairstyleauthor}} 14 | \everyjob{\typeout{\easychairstylerevision}} 15 | \everyjob{\typeout{\easychairstylepurpose}} 16 | \everyjob{\typeout{\easychairstylevoronkov}} 17 | \everyjob{\typeout{\easychairstylesutcliffe}} 18 | \everyjob{\typeout{\easychairstylecopyright}} 19 | \everyjob{\typeout{\easychairstylebugs}} 20 | 21 | \immediate\write10{\easychairstyleauthor} 22 | \immediate\write10{\easychairstylerevision} 23 | \immediate\write10{\easychairstylepurpose} 24 | \immediate\write10{\easychairstylevoronkov} 25 | \immediate\write10{\easychairstylesutcliffe} 26 | \immediate\write10{\easychairstylecopyright} 27 | \immediate\write10{\easychairstylebugs} 28 | 29 | % 30 | % Require LaTeX 2.09 or later 31 | % 32 | 33 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 34 | \ProvidesClass{easychair}[2017/03/26 v3.5] 35 | \def\@tempa#1#2\@nil{\edef\@classname{#1}} 36 | \expandafter\@tempa\@currnamestack{}{}{}\@nil 37 | \ifx\@classname\@empty \edef\@classname{\@currname}\fi 38 | 39 | \RequirePackage{xcolor} 40 | 41 | % 42 | % Debug 43 | % 44 | 45 | \def\easychairdebug#1{\gdef\@EasyDebug{#1}} 46 | \def\@EasyDebug{} 47 | 48 | \newif\ifdebug 49 | \debugfalse 50 | \DeclareOption{debug}{\debugtrue} 51 | 52 | \newif\ifEPiC 53 | \EPiCfalse 54 | \DeclareOption{EPiC}{\EPiCtrue} 55 | \newif\ifKalpa 56 | \Kalpafalse 57 | \DeclareOption{Kalpa}{\Kalpatrue} 58 | 59 | % EPiC with the empty header 60 | \newif\ifEPiCempty 61 | \EPiCemptyfalse 62 | \DeclareOption{EPiCempty}{\EPiCemptytrue} 63 | 64 | % Kalpa with the empty header 65 | \newif\ifKalpaempty 66 | \Kalpaemptyfalse 67 | \DeclareOption{Kalpaempty}{\Kalpa emptytrue} 68 | 69 | \newif\ifEPiCfinal 70 | \EPiCfinalfalse 71 | \DeclareOption{EPiCfinal}{\EPiCfinaltrue} 72 | 73 | \def\easychairframe#1{\gdef\@EasyFrame{#1}} 74 | \def\@EasyFrame{} 75 | 76 | \newif\ifframe 77 | \framefalse 78 | 79 | \DeclareOption{frame}{\frametrue} 80 | 81 | \def\easychairverbose#1{\gdef\@EasyVerbose{#1}} 82 | \def\@EasyVerbose{} 83 | 84 | \newif\ifverbose 85 | \verbosefalse 86 | 87 | \DeclareOption{verbose}{\verbosetrue} 88 | 89 | 90 | % 91 | % Thesis 92 | % Perh Geoff, February 23, 2010 with support from Andrei 93 | % 94 | 95 | \def\easythesis#1{\gdef\@EasyThesis{#1}} 96 | \def\@EasyThesis{} 97 | 98 | \newif\ifthesis 99 | \thesisfalse 100 | 101 | \DeclareOption{thesis}{\thesistrue} 102 | 103 | 104 | % 105 | % Times New Roman or not 106 | % 107 | 108 | \def\easytimes#1{\gdef\@EasyTimes{#1}} 109 | \def\@EasyTimes{} 110 | 111 | \newif\ifnotimes 112 | \notimesfalse 113 | 114 | \DeclareOption{notimes}{\notimestrue} 115 | 116 | \newif\ifwithtimes 117 | \withtimesfalse 118 | 119 | \DeclareOption{withtimes}{\withtimestrue} 120 | 121 | 122 | %% Code added to use llncs style author list 123 | \newcounter{@inst} 124 | \newcounter{@auth} 125 | \newcounter{auco} 126 | \newdimen\instindent 127 | \def\institute#1{\gdef\@institute{#1}} 128 | 129 | \def\institutename{\par 130 | \begingroup 131 | \parskip=\z@ 132 | \parindent=\z@ 133 | \setcounter{@inst}{1}% 134 | \def\and{\par\stepcounter{@inst}% 135 | \noindent$^{\the@inst}$\enspace\ignorespaces}% 136 | \setbox0=\vbox{\def\thanks##1{}\@institute}% 137 | \ifnum\c@@inst=1\relax 138 | \gdef\fnnstart{0}% 139 | \else 140 | \xdef\fnnstart{\c@@inst}% 141 | \setcounter{@inst}{1}% 142 | \noindent$^{\the@inst}$\enspace 143 | \fi 144 | \ignorespaces 145 | \@institute\par 146 | \endgroup} 147 | 148 | \def\inst#1{\unskip$^{#1}$} 149 | \def\fnmsep{\unskip$^,$} 150 | \def\email#1{{\tt#1}} 151 | 152 | %% 153 | 154 | \newif\ifauthorundefined 155 | \authorundefinedtrue 156 | 157 | \let\oldauthor=\author 158 | \renewcommand 159 | {\author} 160 | [1] 161 | {% 162 | \ifauthorundefined 163 | \oldauthor{#1} 164 | \authorundefinedfalse 165 | \else 166 | \PackageWarning{easychair}{Another use of author ignored} 167 | \fi 168 | } 169 | 170 | \newif\iftitleundefined 171 | \titleundefinedtrue 172 | 173 | \let\oldtitle=\title 174 | \renewcommand 175 | {\title} 176 | [1] 177 | { 178 | \iftitleundefined 179 | \oldtitle{#1} 180 | \titleundefinedfalse 181 | \else 182 | \PackageWarning{easychair}{Another use of title ignored} 183 | \fi 184 | } 185 | 186 | 187 | % 188 | % Running heads definitions 189 | % 190 | 191 | %\def\titlerunning#1{\gdef\@titleRunning{#1}} 192 | %\def\authorrunning#1{\gdef\@authorRunning{#1}} 193 | %\titlerunning{easychair: Running title head is undefined.} 194 | %\authorrunning{easychair: Running author head is undefined.} 195 | 196 | \newif\iftitlerunningundefined 197 | \titlerunningundefinedtrue 198 | 199 | \newif\ifauthorrunningundefined 200 | \authorrunningundefinedtrue 201 | 202 | \gdef\@titleRunning{easychair: Running title head is undefined.} 203 | \gdef\@authorRunning{easychair: Running author head is undefined.} 204 | 205 | \def\titlerunning#1 206 | { 207 | \iftitlerunningundefined 208 | \gdef\@titleRunning{#1} 209 | \titlerunningundefinedfalse 210 | \else 211 | \PackageWarning{easychair}{Another use of titlerunning ignored} 212 | \fi 213 | } 214 | 215 | \def\authorrunning#1 216 | { 217 | \ifauthorrunningundefined 218 | \gdef\@authorRunning{#1} 219 | \authorrunningundefinedfalse 220 | \else 221 | \PackageWarning{easychair}{Another use of authorrunning ignored} 222 | \fi 223 | } 224 | 225 | % 226 | % Affiliations 227 | % 228 | 229 | \newcommand{\affiliation}[1]{\footnotesize{#1}\vspace{-3pt}} 230 | 231 | 232 | % 233 | % Decide between letter and A4 paper formats 234 | % as well as orientation 235 | % 236 | 237 | % Default is 'letterpaper' 238 | \def\paperformat#1{\gdef\@PaperFormat{#1}} 239 | \def\@PaperFormat{letterpaper} 240 | 241 | \newif\ifletterpaper 242 | \newif\ifafourpaper 243 | \newif\ifcustompaper 244 | 245 | \letterpapertrue 246 | 247 | \DeclareOption{letterpaper}{\paperformat{letterpaper}\afourpaperfalse\custompaperfalse} 248 | \DeclareOption{a4paper}{\paperformat{a4paper}\afourpapertrue\letterpaperfalse\custompaperfalse} 249 | \DeclareOption{custompaper}{\paperformat{letterpaper}\afourpaperfalse\letterpaperfalse\custompapertrue} 250 | \ExecuteOptions{letterpaper} 251 | 252 | \newlength{\@LMarginSize} 253 | \newlength{\@RMarginSize} 254 | \newlength{\@TMarginSize} 255 | \newlength{\@BMarginSize} 256 | 257 | \DeclareOption{lmargin}{} 258 | \DeclareOption{rmargin}{} 259 | \DeclareOption{tmargin}{} 260 | \DeclareOption{bmargin}{} 261 | 262 | 263 | % Default is portrait {} 264 | \def\paperorientation#1{\gdef\@PaperOrientation{#1}} 265 | \def\@PaperOrientation{} 266 | 267 | \DeclareOption{portrait}{\paperorientation{}} 268 | \DeclareOption{landscape}{\paperorientation{landscape}} 269 | 270 | % Two sided running heads for titlerunning and author running 271 | % twosided is the default 272 | \newif\iftwosided 273 | \twosidedfalse 274 | 275 | \DeclareOption{onesided}{} 276 | \DeclareOption{twosided}{\twosidedtrue} 277 | 278 | % 279 | % Decide between 1- or 2-column formats 280 | % 281 | 282 | \def\columnCount#1{\gdef\@ColumnCount{#1}} 283 | \def\@ColumnCount{onecolumn} 284 | 285 | \DeclareOption{onecolumn}{} 286 | \DeclareOption{twocolumn}{\columnCount{twocolumn}} 287 | 288 | % 289 | % Decide on line spacing 290 | % 291 | 292 | \def\lineSpacing#1{\gdef\@LineSpacing{#1}} 293 | \def\@LineSpacing{1.0} 294 | 295 | \DeclareOption{zerospacing}{\lineSpacing{0.0}} 296 | \DeclareOption{singlespacing}{\lineSpacing{1.0}} 297 | \DeclareOption{lineandhalfspacing}{\lineSpacing{1.5}} 298 | \DeclareOption{doublespacing}{\lineSpacing{2.0}} 299 | 300 | \DeclareOption{0.0}{\lineSpacing{0.0}} 301 | \DeclareOption{1.0}{\lineSpacing{1.0}} 302 | \DeclareOption{1.5}{\lineSpacing{1.5}} 303 | \DeclareOption{2.0}{\lineSpacing{2.0}} 304 | 305 | \DeclareOption{0.0pt}{\lineSpacing{0.0}} 306 | \DeclareOption{1.0pt}{\lineSpacing{1.0}} 307 | \DeclareOption{1.5pt}{\lineSpacing{1.5}} 308 | \DeclareOption{2.0pt}{\lineSpacing{2.0}} 309 | 310 | % 311 | % Font point size; default is 10pt 312 | % 313 | % The \headheight will have to be changed later accordingly 314 | % such that fancyhdr does not complain it is too small. 315 | % 316 | 317 | \def\baseFontSize#1{\gdef\@BaseFontSize{#1}} 318 | \def\headHeightSize#1{\gdef\@HeadHeightSize{#1}} 319 | \def\headSepSize#1{\gdef\@HeadSepSize{#1}} 320 | \def\footSkipSize#1{\gdef\@FootSkipSize{#1}} 321 | 322 | \def\@BaseFontSize{10pt} 323 | \def\@HeadHeightSize{12.0pt} 324 | \def\@HeadSepSize{16.0pt} % instead of the default 25pt 325 | \def\@FootSkipSize{26.0pt} % instead of the default 30pt 326 | 327 | \DeclareOption{8pt}{\PackageWarning{easychair}{Option '\CurrentOption' is not supported.}} 328 | \DeclareOption{9pt}{\PackageWarning{easychair}{Option '\CurrentOption' is not supported.}} 329 | \DeclareOption{10pt}{\baseFontSize{10pt}\headHeightSize{12.0pt}\headSepSize{16.0pt}\footSkipSize{26pt}} 330 | \DeclareOption{11pt}{\baseFontSize{11pt}\headHeightSize{13.6pt}\headSepSize{23.0pt}\footSkipSize{28pt}} 331 | \DeclareOption{12pt}{\baseFontSize{12pt}\headHeightSize{14.5pt}\headSepSize{25.0pt}\footSkipSize{30pt}} 332 | \ExecuteOptions{10pt} 333 | 334 | % 335 | % Page sizing 336 | % 337 | 338 | %\newif\iffullpage 339 | %\newif\ifsavetrees 340 | % 341 | %\DeclareOption{fullpage}{\fullpagetrue} 342 | %\DeclareOption{savetrees}{\savetreestrue} 343 | 344 | % Bark at any unknown package option 345 | \DeclareOption*{\PackageWarning{easychair}{Unknown option '\CurrentOption'}} 346 | \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{geometry}} 347 | %\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 348 | 349 | %\ExecuteOptions{centertags,portrait,10pt,twoside,onecolumn,final} 350 | %\ExecuteOptions{} 351 | \ProcessOptions\relax 352 | 353 | % 354 | % Required packages and classes. 355 | % 356 | % All must be standard as per most common LaTeX 357 | % distributions. 358 | % 359 | 360 | \ifthesis 361 | \LoadClass[\@PaperFormat,\@PaperOrientation,\@ColumnCount,\@BaseFontSize,twoside]{report} 362 | \RequirePackage{makeidx} 363 | \else 364 | % We are an article (more customized later) 365 | \LoadClass[\@PaperFormat,\@PaperOrientation,\@ColumnCount,\@BaseFontSize,twoside]{article} 366 | %\LoadClass[\@PaperFormat,\@PaperOrientation,\@ColumnCount,\@BaseFontSize]{article} 367 | \fi 368 | 369 | % Require UTF8 encoding, per Andrei Voronkov, to accomodate 370 | % all sorts of author names. 371 | %\RequirePackage[utf8]{inputenc} 372 | 373 | % To ensure the footnotes are always at the bottom. 374 | % IMPORTANT: footmisc should precede hyperref for the footnotes to hyperlink 375 | % correctly to their pages where they are at instead of always at 376 | % page 1. Per bug reports from a couple of users and a suggestion by 377 | % Uwe Pfeiffer. 378 | \RequirePackage[bottom]{footmisc} 379 | 380 | % TOC/thumbnail LHS preview in the PDFs as well as active URLs and other cross-refs 381 | % Newer versions of hyperref declare a4paper or letterpaper as obsolete and issue warnings 382 | \definecolor{linkcolor}{RGB}{170,0,0} % aa0000 383 | \definecolor{citecolor}{RGB}{44,160,46} % 2ca02d 384 | \definecolor{urlcolor}{RGB}{0,51,153} % 003399 385 | \RequirePackage[linktocpage,pdfcreator=easychair.cls-3.4,colorlinks=True,urlcolor=urlcolor,citecolor=citecolor,linkcolor=linkcolor]{hyperref} 386 | 387 | % Traditional graphics processing 388 | \RequirePackage{graphicx} 389 | %\RequirePackage{pdflscape} 390 | %\RequirePackage{lscape} 391 | 392 | 393 | %% Fonts, generally more compact but preserving point size 394 | 395 | % Pick "Times Roman" as a base font unless explicitly told not to 396 | \ifnotimes 397 | \ifwithtimes 398 | \PackageWarning{easychair}{Cannot really use 'notimes' and 'withtimes' together} 399 | \PackageWarning{easychair}{Defaulting to 'notimes'...} 400 | \else 401 | \PackageWarning{easychair}{'notimes' has been deprecated as it is the default in 2.0} 402 | \fi 403 | \else 404 | \ifwithtimes 405 | \RequirePackage{mathptmx} 406 | \fi 407 | \fi 408 | 409 | % Pick "Helvetica" as a "Sans-Serif" font 410 | %\RequirePackage[scaled=.85]{helvet} 411 | 412 | % For algorithm and source code listings 413 | \RequirePackage{listings} 414 | 415 | %% Different Math and non-Math symbols and definitions 416 | 417 | \RequirePackage{latexsym} 418 | \RequirePackage{amsthm} 419 | \RequirePackage{empheq} 420 | 421 | %% Line spacing to be applied AFTER the above space saving packages 422 | 423 | \renewcommand{\baselinestretch}{\@LineSpacing} 424 | 425 | %% Final text printing area, per Geoff Sutcliffe 426 | 427 | \RequirePackage{keyval} 428 | 429 | \define@key{Ec}{lmargin}{\Ec@defbylen{lmargin}{#1}} 430 | 431 | \newlength{\@MarginSize} 432 | \setlength{\@MarginSize}{1in} 433 | 434 | \setlength{\@LMarginSize}{\@MarginSize} 435 | %\setlength{\@LMarginSize}{\Ec@lmargin} 436 | \setlength{\@RMarginSize}{\@MarginSize} 437 | \setlength{\@TMarginSize}{\@MarginSize} 438 | \setlength{\@BMarginSize}{\@MarginSize} 439 | 440 | 441 | % Head height is dependent on the font point size 442 | \setlength{\headheight}{\@HeadHeightSize} 443 | \setlength{\headsep}{\@HeadSepSize} 444 | \setlength{\footskip}{\@FootSkipSize} 445 | 446 | \ifletterpaper 447 | \immediate\write10{easychair: Selecting letter paper margin sizes.} 448 | \RequirePackage[% 449 | papersize={8.5in,11in}, 450 | total={145mm,224mm}, 451 | centering, 452 | twoside, 453 | includeheadfoot]{geometry} 454 | \fi 455 | \ifafourpaper 456 | \immediate\write10{easychair: Selecting A4 paper margin sizes.} 457 | \RequirePackage[% 458 | papersize={210mm,297mm}, 459 | total={145mm,224mm}, 460 | centering, 461 | twoside, 462 | includeheadfoot]{geometry} 463 | \fi 464 | 465 | \ifcustompaper 466 | \immediate\write10{easychair: Selecting custom paper margin sizes.} 467 | \RequirePackage[% 468 | papersize={189mm,246mm}, 469 | total={145mm,224mm}, 470 | top=9mm, 471 | left=24mm, 472 | twoside, 473 | includeheadfoot]{geometry} 474 | \headHeightSize{12.0pt} 475 | \headSepSize{16.0pt} 476 | \footSkipSize{26pt} 477 | \fi 478 | 479 | %\setlength{\textwidth}{16cm} 480 | %\setlength{\textheight}{9in} 481 | 482 | 483 | % 484 | % Volume 485 | % 486 | 487 | \RequirePackage{lastpage} 488 | 489 | \newif\ifvolumeundefined 490 | \volumeundefinedtrue 491 | 492 | % e.g. 493 | % \volumeinfo 494 | % {J. Bloe} % editor(s) #1 495 | % {1} % No. of editors #2 496 | % {LICS 2008} % event title #3 497 | % {1} % volume number #4 498 | % {4} % issue #5 499 | % {134} % start page #6 500 | 501 | \def\@EasyFontStyle{\footnotesize} 502 | \newcommand{\headfootstyle}[1]{\def\@EasyFontStyle{#1}} 503 | 504 | \def\@EasyVolumeInfo{} 505 | 506 | \ifthesis 507 | \newcommand{\volumeinfo}[6] 508 | {\PackageWarning{easychair}{Cannot use volumeinfo with 'thesis' option. Ignoring...}} 509 | \else 510 | \newcommand{\volumeinfo}[6]{% 511 | \ifvolumeundefined 512 | % \def\@makefntext##1{\noindent ##1}% 513 | \def\@EasyEdsNames{#1}% 514 | \def\@EasyEds{ed.}% 515 | \def\@EasyEvent{#3}% 516 | \def\@EasyVolume{}% 517 | \def\@EasyIssue{}% 518 | \def\@EasyFirstPage{#6}% 519 | \ifnum #2>1 \gdef\@EasyEds{eds.}\fi% 520 | \ifnum #4>0 \gdef\@EasyVolume{; Volume #4}\fi% 521 | \ifnum #5>0 \gdef\@EasyIssue{, issue: #5} \fi% 522 | % \footnotetext[0]{\sf \@EasyEdsNames (\@EasyEds); \@EasyEvent\@EasyVolume\@EasyIssue, pp. #6-\pageref*{LastPage}}% 523 | % \def\@EasyVolumeInfo{\footnotesize{\sf\@EasyEdsNames~(\@EasyEds); \@EasyEvent\@EasyVolume\@EasyIssue, pp. \@EasyFirstPage--\pageref*{LastPage}}}% 524 | \def\@EasyVolumeInfo{\@EasyFontStyle\@EasyEdsNames~(\@EasyEds); \@EasyEvent\@EasyVolume\@EasyIssue, pp. \@EasyFirstPage--\pageref*{LastPage}}% 525 | %\def\@makefntext##1{\noindent\@makefnmark##1}% 526 | \setcounter{page}{\@EasyFirstPage} 527 | \volumeundefinedfalse 528 | \else 529 | {\PackageWarning{easychair}{May not redefine volumeinfo}} 530 | \fi 531 | } 532 | \fi 533 | 534 | \def\@EventInfo{} 535 | \def\@VolumeInfo{} 536 | 537 | % 538 | % Allow for more space to place floats. 539 | % 540 | 541 | \renewcommand{\topfraction}{0.95} 542 | \renewcommand{\bottomfraction}{0.95} 543 | \renewcommand{\textfraction}{0.05} 544 | \renewcommand{\floatpagefraction}{0.8} 545 | 546 | 547 | % 548 | % Running heads and ``foots'' 549 | % 550 | 551 | \RequirePackage{fancyhdr} 552 | \pagestyle{fancy} 553 | 554 | \fancyhead{} 555 | %\ifdebug 556 | % \iftwosided 557 | % \fancyhead[RE]{\overline{\@titleRunning}} 558 | % \fancyhead[RO]{\overline{\@authorRunning}} 559 | % \else 560 | % \fancyhead[LO,LE]{\begin{math}\overline{\mbox{\@titleRunning}}\end{math}} 561 | % \fancyhead[RO,RE]{\begin{math}\overline{\mbox{\@authorRunning}}\end{math}} 562 | % \fi 563 | %\else 564 | \iftwosided 565 | \fancyhead[RE]{{\@EasyFontStyle\@titleRunning}} 566 | \fancyhead[RO]{{\@EasyFontStyle\@authorRunning}} 567 | \else 568 | \fancyhead[LO,LE]{{\@EasyFontStyle\@titleRunning}} 569 | \fancyhead[RO,RE]{{\@EasyFontStyle\@authorRunning}} 570 | \fi 571 | %\fi 572 | 573 | \fancyfoot{} 574 | \ifodd\c@page 575 | \fancyfoot[LO]{{\@EasyFontStyle\@VolumeInfo}} 576 | \fancyfoot[RE]{{\@EasyFontStyle\@EventInfo}} 577 | \else 578 | \fancyfoot[RE]{{\@EasyFontStyle\@VolumeInfo}} 579 | \fancyfoot[LO]{{\@EasyFontStyle\@EventInfo}} 580 | \fi 581 | \ifodd\c@page 582 | \fancyfoot[RO]{{\normalsize\thepage}} 583 | \fancyfoot[LE]{{\normalsize\thepage}} 584 | \else 585 | \fancyfoot[LE]{{\normalsize\thepage}} 586 | \fancyfoot[RO]{{\normalsize\thepage}} 587 | \fi 588 | \renewcommand{\headrulewidth}{0pt} 589 | \renewcommand{\footrulewidth}{0pt} 590 | %\fi 591 | 592 | % Suppress the default date, per Geoff 593 | \date{} 594 | 595 | % For the first page 596 | \fancypagestyle{plain}{% 597 | \fancyhf{} % clear all header and footer fields 598 | \ifodd\c@page 599 | \fancyfoot[L]{\@EasyVolumeInfo{}}% 600 | \fancyfoot[R]{} 601 | \else 602 | \fancyfoot[R]{\@EasyVolumeInfo}% 603 | \fancyfoot[L]{} 604 | \fi 605 | \renewcommand{\headrulewidth}{0pt} 606 | \renewcommand{\footrulewidth}{0pt}} 607 | 608 | \def\@maketitle{% 609 | %% Code added to use llncs style author list 610 | \def\andname{and} 611 | \def\lastandname{\unskip, and} 612 | \def\lastand{\ifnum\value{@inst}=2\relax 613 | \unskip{} \andname\ 614 | \else 615 | \unskip \lastandname\ 616 | \fi}% 617 | \def\and{\stepcounter{@auth}\relax 618 | \ifnum\value{@auth}=\value{@inst}% 619 | \lastand 620 | \else 621 | \unskip, 622 | \fi}% 623 | %% 624 | \newpage 625 | \null 626 | % Facelift a bit the title and make it bold, per Geoff 627 | \vspace{-1cm} 628 | \begin{center}% 629 | \let\footnote\thanks% 630 | \ifwithtimes 631 | {\LARGE{\@title}\par} 632 | \else 633 | {\LARGE\@title\par} 634 | \fi 635 | \vskip \baselineskip 636 | \@date 637 | {\large 638 | \setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}% 639 | \def\thanks##1{}\@author}% 640 | \global\value{@inst}=\value{@auth}% 641 | \global\value{auco}=\value{@auth}% 642 | \setcounter{@auth}{1}% 643 | {\lineskip .5em 644 | \noindent\ignorespaces 645 | \@author\vskip.35cm}} 646 | {\small\institutename} 647 | \end{center}% 648 | } 649 | 650 | \ifEPiCfinal 651 | \definecolor{volume}{RGB}{0,112,144} 652 | \def\EPiCSeries{EPiC Series in Computer Science} 653 | \def\EPiCVolume{XXX} 654 | \def\EPiCYear{2017} 655 | \def\EPiCPages{Pages 19--27} 656 | \def\EPiCConference{99th International Conference on Topics of Superb Significance (CATSS)} 657 | \def\ChairLogo{logo_chair.png} 658 | \def\EPiCLogo{logo_epic.png} 659 | \fi 660 | 661 | % ------------------------------------------------ 662 | % Change the maketitle command in EPiC 663 | \let\oldmaketitle=\@maketitle 664 | % ------------------------------------------------ 665 | \def\@maketitle{% 666 | \ifEPiCfinal 667 | 668 | %\vspace*{-10mm}\par 669 | \definecolor{headerframe}{rgb}{0.473,0.676,0.656} % 79ada8 670 | \definecolor{headerback}{rgb}{0.953125,0.95703125,0.9609375} % f4f5f6 671 | 672 | \begin{tcolorbox}[ 673 | enhanced,center,width=\linewidth-2cm, 674 | underlay={ 675 | \node[inner sep=0pt,outer sep=0pt,right] at ([xshift=-1cm]frame.west) 676 | {\includegraphics[height=74.5pt]{\ChairLogo}}; 677 | \node[inner sep=0pt,outer sep=0pt,left] at ([xshift=1cm]frame.east) 678 | {\includegraphics[height=73pt]{\EPiCLogo}}; 679 | }, 680 | before skip=0pt,% <--- before box 681 | after skip=6pt,% <--- after box 682 | left=71.54pt-1cm+4mm, 683 | right=56.22423pt-1cm+4mm, 684 | sharp corners,text fill, 685 | colback=headerback,colframe=headerframe, 686 | height=73pt,toprule=0.5pt,bottomrule=0.5pt,leftrule=0pt,rightrule=0pt, 687 | halign=center,valign=center,boxsep=0pt, 688 | top=2mm,% space to top border 689 | bottom=2mm,% space to bottom border 690 | ]% 691 | {\Large \EPiCSeries}\par\vfill% 692 | {\color{volume}Volume \EPiCVolume, \EPiCYear, \EPiCPages}\par\vfill% 693 | \EPiCConference 694 | \end{tcolorbox} 695 | 696 | \par\ \vspace*{12pt}\par 697 | {\let\newpage\relax\oldmaketitle}% 698 | \else \ifEPiC 699 | \definecolor{grayheader}{RGB}{112,112,112}% 700 | {\color{grayheader}\vspace*{-23pt}\noindent \hrulefill\\ 701 | \noindent\centering 702 | \raisebox{0pt}[36.5pt][36.5pt]{This space is reserved for the EPiC Series header, do not use it}% 703 | 704 | \noindent\hrulefill}% 705 | \\ 706 | 707 | {\let\newpage\relax\oldmaketitle}% 708 | \else \ifEPiCempty 709 | \raisebox{0pt}[47pt][47pt]{~} 710 | \\ 711 | 712 | {\let\newpage\relax\oldmaketitle}% 713 | 714 | % otherwise the old maketitle 715 | 716 | \else 717 | \oldmaketitle 718 | \fi\fi\fi 719 | } 720 | % ------------------------------------------------ 721 | 722 | % Tighten up bibliography 723 | \let\oldthebibliography=\thebibliography 724 | \let\endoldthebibliography=\endthebibliography 725 | \renewenvironment{thebibliography}[1] 726 | { 727 | \small 728 | \begin{oldthebibliography}{#1} 729 | \setlength{\parskip}{2pt} 730 | \setlength{\itemsep}{0pt} 731 | } 732 | { 733 | \end{oldthebibliography} 734 | } 735 | 736 | \ifdebug 737 | \ifverbose 738 | \RequirePackage[colorgrid,pscoord]{eso-pic}% 739 | \else 740 | \RequirePackage[pscoord]{eso-pic} 741 | \newcommand\ShowFramePicture{% 742 | \begingroup 743 | \color{red} 744 | \AtTextLowerLeft{\framebox(\LenToUnit{\textwidth},\LenToUnit{\textheight}){}}% 745 | \AtTextUpperLeft{\put(0,\LenToUnit{\headsep}){\framebox(\LenToUnit{\textwidth},\LenToUnit{\headheight}){}}}% 746 | \AtTextLowerLeft{\put(0,\LenToUnit{-\footskip}){\framebox(\LenToUnit{\textwidth},\LenToUnit{\headheight}){}}}% 747 | \endgroup 748 | } 749 | \AddToShipoutPicture{\ShowFramePicture} 750 | \fi 751 | %\RequirePackage[a4,cam,center]{crop}% 752 | %\RequirePackage[cam,center]{crop}% 753 | \fi 754 | 755 | \ifframe 756 | \ifverbose 757 | \RequirePackage[colorgrid,pscoord]{eso-pic}% 758 | \else 759 | \RequirePackage[pscoord]{eso-pic} 760 | \newcommand\ShowBlueFrame{% 761 | \begingroup 762 | \color{blue} 763 | % odd page 764 | % \AtTextLowerLeft{\put(\LenToUnit{-23.6mm},\LenToUnit{-21.8mm}){\framebox(\LenToUnit{188.3mm},\LenToUnit{245.4mm}){}}}% 765 | % even page 766 | % \AtTextLowerLeft{\put(\LenToUnit{-19.6mm},\LenToUnit{-21.8mm}){\framebox(\LenToUnit{188.3mm},\LenToUnit{245.4mm}){}}}% 767 | \endgroup 768 | } 769 | \AddToShipoutPicture{\ShowBlueFrame} 770 | \fi 771 | \fi 772 | 773 | % \geometry{papersize={170mm,240mm},total={124mm,185mm}} 774 | 775 | %% Indexing options for proceedings to link up people's names to their 776 | %% various participation and affiliation options. 777 | 778 | \newcommand 779 | {\indexedperson} 780 | [3] 781 | {\index{#2!#1}\index{#1}\index{#1!#3}} 782 | 783 | \newcommand 784 | {\indexedauthor} 785 | [1] 786 | {\indexedperson{#1}{Authors}{Author}} 787 | 788 | \newcommand 789 | {\indexededitor} 790 | [1] 791 | {\indexedperson{#1}{Editors}{Editor}} 792 | 793 | \newcommand 794 | {\indexedpcmember} 795 | [1] 796 | {\indexedperson{#1}{PC Members}{PC Member}} 797 | 798 | \newcommand 799 | {\indexedreviewer} 800 | [1] 801 | {\indexedperson{#1}{Reviewers}{Reviewer}} 802 | 803 | \newcommand 804 | {\indexedorganizer} 805 | [1] 806 | {\indexedperson{#1}{Organizers}{Organizer}} 807 | 808 | \newcommand 809 | {\indexedwebmaster} 810 | [1] 811 | {\indexedperson{#1}{Webmasters}{Webmaster}} 812 | 813 | \newcommand 814 | {\indexedaffiliation} 815 | [2] 816 | {\indexedperson{#1}{#2}{#2}} 817 | 818 | \newcommand 819 | {\indexedsupervisor} 820 | [2] 821 | {\indexedperson{#1}{}{Supervisor: #2}\indexedperson{#2}{Supervisors}{Supervisor}} 822 | 823 | \endinput 824 | 825 | % \crop[font=\upshape\mdseries\small\textsf] 826 | 827 | % EOF 828 | -------------------------------------------------------------------------------- /Source/elsarticle.cls: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `elsarticle.cls', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% elsarticle.dtx (with options: `class') 8 | %% 9 | %% Copyright 2007, 2008, 2009 Elsevier Ltd 10 | %% 11 | %% This file is part of the 'Elsarticle Bundle'. 12 | %% ------------------------------------------- 13 | %% 14 | %% It may be distributed under the conditions of the LaTeX Project Public 15 | %% License, either version 1.2 of this license or (at your option) any 16 | %% later version. The latest version of this license is in 17 | %% http://www.latex-project.org/lppl.txt 18 | %% and version 1.2 or later is part of all distributions of LaTeX 19 | %% version 1999/12/01 or later. 20 | %% 21 | %% The list of all files belonging to the 'Elsarticle Bundle' is 22 | %% given in the file `manifest.txt'. 23 | %% 24 | %% 25 | %% $Id: elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp $ 26 | %% 27 | \def\RCSfile{elsarticle}% 28 | \def\RCSversion{1.2.0}% 29 | \def\RCSdate{2009/09/17}% 30 | \def\@shortjnl{\relax} 31 | \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd} 32 | \def\@issn{000-0000} 33 | \def\@shortjid{elsarticle} 34 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 35 | \ProvidesClass{\@shortjid}[\RCSdate, \RCSversion: \@journal] 36 | \def\ABD{\AtBeginDocument} 37 | \newif\ifpreprint \preprintfalse 38 | \newif\iflongmktitle \longmktitlefalse 39 | 40 | \def\@blstr{1} 41 | \newdimen\@bls 42 | \@bls=\baselineskip 43 | 44 | \def\@finalWarning{% 45 | *****************************************************\MessageBreak 46 | This document is typeset in the CRC style which\MessageBreak 47 | is not suitable for submission.\MessageBreak 48 | \MessageBreak 49 | Please typeset again using 'preprint' option\MessageBreak 50 | for creating PDF suitable for submission.\MessageBreak 51 | ******************************************************\MessageBreak 52 | } 53 | 54 | \DeclareOption{preprint}{\global\preprinttrue 55 | \gdef\@blstr{1}\xdef\jtype{0}% 56 | \AtBeginDocument{\@twosidefalse\@mparswitchfalse}} 57 | \DeclareOption{final}{\gdef\@blstr{1}\global\preprintfalse} 58 | \DeclareOption{review}{\global\preprinttrue\gdef\@blstr{1.5}} 59 | \DeclareOption{authoryear}{\xdef\@biboptions{round,authoryear}} 60 | \DeclareOption{number}{\xdef\@biboptions{numbers}} 61 | \DeclareOption{numbers}{\xdef\@biboptions{numbers}} 62 | \DeclareOption{longtitle}{\global\longmktitletrue} 63 | \DeclareOption{5p}{\xdef\jtype{5}\global\preprintfalse 64 | \ExecuteOptions{twocolumn}} 65 | \def\jtype{0} 66 | \DeclareOption{3p}{\xdef\jtype{3}\global\preprintfalse} 67 | \DeclareOption{1p}{\xdef\jtype{1}\global\preprintfalse 68 | \AtBeginDocument{\@twocolumnfalse}} 69 | \DeclareOption{times}{\IfFileExists{txfonts.sty}% 70 | {\AtEndOfClass{\RequirePackage{txfonts}% 71 | \gdef\ttdefault{cmtt}% 72 | \let\iint\relax 73 | \let\iiint\relax 74 | \let\iiiint\relax 75 | \let\idotsint\relax 76 | \let\openbox\relax}}{\RequirePackage{times}}} 77 | \ExecuteOptions{a4paper,10pt,oneside,onecolumn,number,preprint} 78 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 79 | \ProcessOptions 80 | \LoadClass{article} 81 | \RequirePackage{graphicx} 82 | \let\comma\@empty 83 | \let\tnotesep\@empty 84 | \def\title#1{\gdef\@title{#1}} 85 | \let\@title\@empty 86 | 87 | \def\elsLabel#1{\@bsphack\protected@write\@auxout{}% 88 | {\string\Newlabel{#1}{\@currentlabel}}\@esphack} 89 | \def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}} 90 | 91 | \def\elsRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}% 92 | } 93 | 94 | \def\tnotemark[#1]{\textsuperscript{\@for\@@tmark:=#1\do{% 95 | \edef\tnotenum{\@ifundefined{X@\@@tmark}{1}{\elsRef{\@@tmark}}}% 96 | \ifcase\tnotenum\or\ding{73}\or,\ding{73}\ding{73}\fi}}% 97 | } 98 | \let\@tnotemark\@empty 99 | 100 | \let\@tnotes\@empty 101 | \RequirePackage{pifont} 102 | \newcounter{tnote} 103 | \def\tnotetext[#1]#2{\g@addto@macro\@tnotes{% 104 | \refstepcounter{tnote}\elsLabel{#1}% 105 | \def\thefootnote{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}% 106 | \footnotetext{#2}}} 107 | 108 | \let\@nonumnotes\@empty 109 | \def\nonumnote#1{\g@addto@macro\@nonumnotes{% 110 | \let\thefootnote\relax\footnotetext{#1}}} 111 | 112 | \newcounter{fnote} 113 | \def\fnmark[#1]{\let\comma\@empty 114 | \def\@fnmark{\@for\@@fnmark:=#1\do{% 115 | \edef\fnotenum{\@ifundefined{X@\@@fnmark}{1}{\elsRef{\@@fnmark}}}% 116 | \unskip\comma\fnotenum\let\comma,}}% 117 | } 118 | 119 | \let\@fnotes\@empty\let\@fnmark\@empty 120 | \def\fntext[#1]#2{\g@addto@macro\@fnotes{% 121 | \refstepcounter{fnote}\elsLabel{#1}% 122 | \def\thefootnote{\thefnote}% 123 | \global\setcounter{footnote}{\thefnote}% 124 | \footnotetext{#2}}} 125 | 126 | \def\cormark[#1]{\edef\cnotenum{\elsRef{#1}}% 127 | \unskip\textsuperscript{\sep\ifcase\cnotenum\or 128 | $\ast$\or$\ast\ast$\fi\hspace{-1pt}}\let\sep=,} 129 | 130 | \let\@cormark\@empty 131 | \let\@cornotes\@empty 132 | \newcounter{cnote} 133 | \def\cortext[#1]#2{\g@addto@macro\@cornotes{% 134 | \refstepcounter{cnote}\elsLabel{#1}% 135 | \def\thefootnote{\ifcase\thecnote\or$\ast$\or 136 | $\ast\ast$\fi}% 137 | \footnotetext{#2}}} 138 | 139 | \let\@corref\@empty 140 | \def\corref#1{\edef\cnotenum{\elsRef{#1}}% 141 | \edef\@corref{\ifcase\cnotenum\or 142 | $\ast$\or$\ast\ast$\fi\hskip-1pt}} 143 | 144 | \def\fnref#1{\fnmark[#1]} 145 | \def\tnoteref#1{\tnotemark[#1]} 146 | 147 | \def\resetTitleCounters{\c@cnote=0 148 | \c@fnote=0 \c@tnote=0 \c@footnote=0} 149 | 150 | \let\eadsep\@empty 151 | \let\@elseads\@empty 152 | \let\@elsuads\@empty 153 | \let\@cormark\@empty 154 | \def\hashchar{\expandafter\@gobble\string\~} 155 | \def\underscorechar{\expandafter\@gobble\string\_} 156 | \def\lbracechar{\expandafter\@gobble\string\{} 157 | \def\rbracechar{\expandafter\@gobble\string\}} 158 | 159 | \def\ead{\@ifnextchar[{\@uad}{\@ead}} 160 | \gdef\@ead#1{\bgroup\def\_{\string\underscorechar\space}% 161 | \def\{{\string\lbracechar\space}% 162 | \def~{\hashchar\space}% 163 | \def\}{\string\rbracechar\space}% 164 | \edef\tmp{\the\@eadauthor} 165 | \immediate\write\@auxout{\string\emailauthor 166 | {#1}{\expandafter\strip@prefix\meaning\tmp}}% 167 | \egroup 168 | } 169 | \newcounter{ead} 170 | \gdef\emailauthor#1#2{\stepcounter{ead}% 171 | \g@addto@macro\@elseads{\raggedright% 172 | \let\corref\@gobble 173 | \eadsep\texttt{#1} (#2)\def\eadsep{\unskip,\space}}% 174 | } 175 | \gdef\@uad[#1]#2{\bgroup 176 | \def~{\string\hashchar\space}% 177 | \def\_{\string\underscorechar\space}% 178 | \edef\tmp{\the\@eadauthor} 179 | \immediate\write\@auxout{\string\urlauthor 180 | {#2}{\expandafter\strip@prefix\meaning\tmp}}% 181 | \egroup 182 | } 183 | \def\urlauthor#1#2{\g@addto@macro\@elsuads{\let\corref\@gobble% 184 | \raggedright\eadsep\texttt{#1}\space(#2)% 185 | \def\eadsep{\unskip,\space}}% 186 | } 187 | 188 | \def\elsauthors{} 189 | \def\pprinttitle{} 190 | \let\authorsep\@empty 191 | \let\sep\@empty 192 | \newcounter{author} 193 | \def\author{\@ifnextchar[{\@@author}{\@author}} 194 | 195 | \newtoks\@eadauthor 196 | \def\@@author[#1]#2{\g@addto@macro\elsauthors{% 197 | \def\baselinestretch{1}% 198 | \authorsep#2\unskip\textsuperscript{%#1% 199 | \@for\@@affmark:=#1\do{% 200 | \edef\affnum{\@ifundefined{X@\@@affmark}{1}{\elsRef{\@@affmark}}}% 201 | \unskip\sep\affnum\let\sep=,}% 202 | \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi 203 | \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi 204 | }% 205 | \def\authorsep{\unskip,\space}% 206 | \global\let\sep\@empty\global\let\@corref\@empty 207 | \global\let\@fnmark\@empty}% 208 | \@eadauthor={#2} 209 | } 210 | 211 | \def\@author#1{\g@addto@macro\elsauthors{\normalsize% 212 | \def\baselinestretch{1}% 213 | \upshape\authorsep#1\unskip\textsuperscript{% 214 | \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi 215 | \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi 216 | }% 217 | \def\authorsep{\unskip,\space}% 218 | \global\let\@fnmark\@empty 219 | \global\let\sep\@empty}% 220 | \@eadauthor={#1} 221 | } 222 | 223 | \def\elsaddress{} 224 | \def\addsep{\par\vskip6pt} 225 | \def\address{\@ifnextchar[{\@@address}{\@address}} 226 | 227 | \def\@alph#1{% 228 | \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or 229 | l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or 230 | y\or z% 231 | \or aa\or ab\or ac\or ad\or ae\or af\or ag\or ah\or ai\or aj\or 232 | ak\or al\or am\or an\or ao\or ap\or aq\or ar\or as\or at\or au\or 233 | av\or aw\or ax\or ay\or az% 234 | \or ba\or bb\or bc\or bd\or be\or bf\or bg\or bh\or bi\or bj\or 235 | bk\or bl\or bm\or bn\or bo\or bp\or bq\or br\or bs\or bt\or bu\or 236 | bv\or bw\or bx\or by\or bz% 237 | \or ca\or cb\or cc\or cd\or ce\or cf\or cg\or ch\or ci\or cj\or 238 | ck\or cl\or cm\or cn\or co\or cp\or cq\or cr\or cs\or ct\or cu\or 239 | cv\or cw\or cx\or cy\or cz% 240 | \or da\or db\or dc\or dd\or de\or df\or dg\or dh\or di\or dj\or 241 | dk\or dl\or dm\or dn\or do\or dp\or dq\or dr\or ds\or dt\or du\or 242 | dv\or dw\or dx\or dy\or dz% 243 | \or ea\or eb\or ec\or ed\or ee\or ef\or eg\or eh\or ei\or ej\or 244 | ek\or el\or em\or en\or eo\or ep\or eq\or er\or es\or et\or eu\or 245 | ev\or ew\or ex\or ey\or ez% 246 | \or fa\or fb\or fc\or fd\or fe\or ff\or fg\or fh\or fi\or fj\or 247 | fk\or fl\or fm\or fn\or fo\or fp\or fq\or fr\or fs\or ft\or fu\or 248 | fv\or fw\or fx\or fy\or fz% 249 | \or ga\or gb\or gc\or gd\or ge\or gf\or gg\or gh\or gi\or gj\or 250 | gk\or gl\or gm\or gn\or go\or gp\or gq\or gr\or gs\or gt\or gu\or 251 | gv\or gw\or gx\or gy\or gz% 252 | \else\@ctrerr\fi} 253 | 254 | \newcounter{affn} 255 | \renewcommand\theaffn{\alph{affn}} 256 | 257 | \long\def\@@address[#1]#2{\g@addto@macro\elsaddress{% 258 | \def\baselinestretch{1}% 259 | \refstepcounter{affn} 260 | \xdef\@currentlabel{\theaffn} 261 | \elsLabel{#1}% 262 | \textsuperscript{\theaffn}#2\par}} 263 | 264 | \long\def\@address#1{\g@addto@macro\elsauthors{% 265 | \def\baselinestretch{1}% 266 | \addsep\footnotesize\itshape#1\def\addsep{\par\vskip6pt}% 267 | \def\authorsep{\par\vskip8pt}}} 268 | 269 | \newbox\absbox 270 | \renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup 271 | \hsize=\textwidth\def\baselinestretch{1}% 272 | \noindent\unskip\textbf{Abstract} 273 | \par\medskip\noindent\unskip\ignorespaces} 274 | {\egroup} 275 | 276 | \newbox\keybox 277 | \def\keyword{% 278 | \def\sep{\unskip, }% 279 | \def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}} 280 | \def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}% 281 | \def\PACS{\par\leavevmode\hbox {\it PACS:\space}}% 282 | \def\JEL{\par\leavevmode\hbox {\it JEL:\space}}% 283 | \global\setbox\keybox=\vbox\bgroup\hsize=\textwidth 284 | \normalsize\normalfont\def\baselinestretch{1} 285 | \parskip\z@ 286 | \noindent\textit{Keywords: } 287 | \raggedright % Keywords are not justified. 288 | \ignorespaces} 289 | \def\endkeyword{\par \egroup} 290 | 291 | \newdimen\Columnwidth 292 | \Columnwidth=\columnwidth 293 | 294 | \def\printFirstPageNotes{% 295 | \iflongmktitle 296 | \let\columnwidth=\textwidth\fi 297 | \ifx\@tnotes\@empty\else\@tnotes\fi 298 | \ifx\@nonumnotes\@empty\else\@nonumnotes\fi 299 | \ifx\@cornotes\@empty\else\@cornotes\fi 300 | \ifx\@elseads\@empty\relax\else 301 | \let\thefootnote\relax 302 | \footnotetext{\ifnum\theead=1\relax 303 | \textit{Email address:\space}\else 304 | \textit{Email addresses:\space}\fi 305 | \@elseads}\fi 306 | \ifx\@elsuads\@empty\relax\else 307 | \let\thefootnote\relax 308 | \footnotetext{\textit{URL:\space}% 309 | \@elsuads}\fi 310 | \ifx\@fnotes\@empty\else\@fnotes\fi 311 | \iflongmktitle\if@twocolumn 312 | \let\columnwidth=\Columnwidth\fi\fi 313 | } 314 | 315 | \long\def\pprintMaketitle{\clearpage 316 | \iflongmktitle\if@twocolumn\let\columnwidth=\textwidth\fi\fi 317 | \resetTitleCounters 318 | \def\baselinestretch{1}% 319 | \printFirstPageNotes 320 | \begin{center}% 321 | \thispagestyle{pprintTitle}% 322 | \def\baselinestretch{1}% 323 | \Large\@title\par\vskip18pt 324 | \normalsize\elsauthors\par\vskip10pt 325 | \footnotesize\itshape\elsaddress\par\vskip36pt 326 | \hrule\vskip12pt 327 | \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi 328 | \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi 329 | \hrule\vskip12pt 330 | \end{center}% 331 | \gdef\thefootnote{\arabic{footnote}}% 332 | } 333 | 334 | \def\printWarning{% 335 | \mbox{}\par\vfill\par\bgroup 336 | \fboxsep12pt\fboxrule1pt 337 | \hspace*{.18\textwidth} 338 | \fcolorbox{gray50}{gray10}{\box\warnbox} 339 | \egroup\par\vfill\thispagestyle{empty} 340 | \setcounter{page}{0} 341 | \clearpage} 342 | 343 | \long\def\finalMaketitle{% 344 | \resetTitleCounters 345 | \def\baselinestretch{1}% 346 | \MaketitleBox 347 | \thispagestyle{pprintTitle}% 348 | \gdef\thefootnote{\arabic{footnote}}% 349 | } 350 | 351 | \long\def\MaketitleBox{% 352 | \resetTitleCounters 353 | \def\baselinestretch{1}% 354 | \begin{center}% 355 | \def\baselinestretch{1}% 356 | \Large\@title\par\vskip18pt 357 | \normalsize\elsauthors\par\vskip10pt 358 | \footnotesize\itshape\elsaddress\par\vskip36pt 359 | \hrule\vskip12pt 360 | \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi 361 | \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi 362 | \hrule\vskip12pt 363 | \end{center}% 364 | } 365 | 366 | \def\FNtext#1{\par\bgroup\footnotesize#1\egroup} 367 | \newdimen\space@left 368 | \def\alarm#1{\typeout{******************************}% 369 | \typeout{#1}% 370 | \typeout{******************************}% 371 | } 372 | \long\def\getSpaceLeft{%\global\@twocolumnfalse% 373 | \global\setbox0=\vbox{\hsize=\textwidth\MaketitleBox}% 374 | \global\setbox1=\vbox{\hsize=\textwidth 375 | \let\footnotetext\FNtext 376 | \printFirstPageNotes}% 377 | \xdef\noteheight{\the\ht1}% 378 | \xdef\titleheight{\the\ht0}% 379 | \@tempdima=\vsize 380 | \advance\@tempdima-\noteheight 381 | \advance\@tempdima-1\baselineskip 382 | } 383 | 384 | \skip\footins=24pt 385 | 386 | \newbox\els@boxa 387 | \newbox\els@boxb 388 | 389 | \ifpreprint 390 | \def\maketitle{\pprintMaketitle} 391 | \else 392 | \ifnum\jtype=1 393 | \def\maketitle{% 394 | \iflongmktitle\getSpaceLeft 395 | \global\setbox\els@boxa=\vsplit0 to \@tempdima 396 | \box\els@boxa\par\resetTitleCounters 397 | \thispagestyle{pprintTitle}% 398 | \printFirstPageNotes 399 | \box0% 400 | \else 401 | \finalMaketitle\printFirstPageNotes 402 | \fi 403 | \gdef\thefootnote{\arabic{footnote}}}% 404 | \else 405 | \ifnum\jtype=5 406 | \def\maketitle{% 407 | \iflongmktitle\getSpaceLeft 408 | \global\setbox\els@boxa=\vsplit0 to \@tempdima 409 | \box\els@boxa\par\resetTitleCounters 410 | \thispagestyle{pprintTitle}% 411 | \printFirstPageNotes 412 | \twocolumn[\box0]%\printFirstPageNotes 413 | \else 414 | \twocolumn[\finalMaketitle]\printFirstPageNotes 415 | \fi 416 | \gdef\thefootnote{\arabic{footnote}}} 417 | \else 418 | \if@twocolumn 419 | \def\maketitle{% 420 | \iflongmktitle\getSpaceLeft 421 | \global\setbox\els@boxa=\vsplit0 to \@tempdima 422 | \box\els@boxa\par\resetTitleCounters 423 | \thispagestyle{pprintTitle}% 424 | \printFirstPageNotes 425 | \twocolumn[\box0]% 426 | \else 427 | \twocolumn[\finalMaketitle]\printFirstPageNotes 428 | \fi 429 | \gdef\thefootnote{\arabic{footnote}}}% 430 | \else 431 | \def\maketitle{% 432 | \iflongmktitle\getSpaceLeft 433 | \global\setbox\els@boxa=\vsplit0 to \@tempdima 434 | \box\els@boxa\par\resetTitleCounters 435 | \thispagestyle{pprintTitle}% 436 | \printFirstPageNotes 437 | \box0% 438 | \else 439 | \finalMaketitle\printFirstPageNotes 440 | \fi 441 | \gdef\thefootnote{\arabic{footnote}}}% 442 | \fi 443 | \fi 444 | \fi 445 | \fi 446 | \def\ps@pprintTitle{% 447 | \let\@oddhead\@empty 448 | \let\@evenhead\@empty 449 | \def\@oddfoot{\footnotesize\itshape 450 | Preprint submitted to \ifx\@journal\@empty Elsevier 451 | \else\@journal\fi\hfill\today}% 452 | \let\@evenfoot\@oddfoot} 453 | \def\@seccntDot{.} 454 | \def\@seccntformat#1{\csname the#1\endcsname\@seccntDot\hskip 0.5em} 455 | 456 | \renewcommand\section{\@startsection {section}{1}{\z@}% 457 | {18\p@ \@plus 6\p@ \@minus 3\p@}% 458 | {9\p@ \@plus 6\p@ \@minus 3\p@}% 459 | {\normalsize\bfseries\boldmath}} 460 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% 461 | {12\p@ \@plus 6\p@ \@minus 3\p@}% 462 | {3\p@ \@plus 6\p@ \@minus 3\p@}% 463 | {\normalfont\normalsize\itshape}} 464 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% 465 | {12\p@ \@plus 6\p@ \@minus 3\p@}% 466 | {\p@}% 467 | {\normalfont\normalsize\itshape}} 468 | 469 | \def\paragraph{\secdef{\els@aparagraph}{\els@bparagraph}} 470 | \def\els@aparagraph[#1]#2{\elsparagraph[#1]{#2.}} 471 | \def\els@bparagraph#1{\elsparagraph*{#1.}} 472 | 473 | \newcommand\elsparagraph{\@startsection{paragraph}{4}{0\z@}% 474 | {10\p@ \@plus 6\p@ \@minus 3\p@}% 475 | {-6\p@}% 476 | {\normalfont\itshape}} 477 | \newdimen\leftMargin 478 | \leftMargin=2em 479 | \newtoks\@enLab %\newtoks\@enfont 480 | \def\@enQmark{?} 481 | \def\@enLabel#1#2{% 482 | \edef\@enThe{\noexpand#1{\@enumctr}}% 483 | \@enLab\expandafter{\the\@enLab\csname the\@enumctr\endcsname}% 484 | \@enloop} 485 | \def\@enSpace{\afterassignment\@enSp@ce\let\@tempa= } 486 | \def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop} 487 | \def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop} 488 | \def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop} 489 | \def\@enloop{\futurelet\@entemp\@enloop@} 490 | \def\@enloop@{% 491 | \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else 492 | \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else 493 | \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else 494 | \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else 495 | \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else 496 | \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else 497 | \ifx \bgroup\@entemp \let\@tempa\@enGroup \else 498 | \ifx \@enum@\@entemp \let\@tempa\@gobble \else 499 | \let\@tempa\@enOther 500 | \fi\fi\fi\fi\fi\fi\fi\fi 501 | \@tempa} 502 | \newlength{\@sep} \newlength{\@@sep} 503 | \setlength{\@sep}{.5\baselineskip plus.2\baselineskip 504 | minus.2\baselineskip} 505 | \setlength{\@@sep}{.1\baselineskip plus.01\baselineskip 506 | minus.05\baselineskip} 507 | \providecommand{\sfbc}{\rmfamily\upshape} 508 | \providecommand{\sfn}{\rmfamily\upshape} 509 | \def\@enfont{\ifnum \@enumdepth >1\let\@nxt\sfn \else\let\@nxt\sfbc \fi\@nxt} 510 | \def\enumerate{% 511 | \ifnum \@enumdepth >3 \@toodeep\else 512 | \advance\@enumdepth \@ne 513 | \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi 514 | \@ifnextchar[{\@@enum@}{\@enum@}} 515 | \def\@@enum@[#1]{% 516 | \@enLab{}\let\@enThe\@enQmark 517 | \@enloop#1\@enum@ 518 | \ifx\@enThe\@enQmark\@warning{The counter will not be printed.% 519 | ^^J\space\@spaces\@spaces\@spaces The label is: \the\@enLab}\fi 520 | \expandafter\edef\csname label\@enumctr\endcsname{\the\@enLab}% 521 | \expandafter\let\csname the\@enumctr\endcsname\@enThe 522 | \csname c@\@enumctr\endcsname7 523 | \expandafter\settowidth 524 | \csname leftmargin\romannumeral\@enumdepth\endcsname 525 | {\the\@enLab\hskip\labelsep}% 526 | \@enum@} 527 | \def\@enum@{\list{{\@enfont\csname label\@enumctr\endcsname}}% 528 | {\usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}% 529 | \ifnum \@enumdepth>1\setlength{\topsep}{\@@sep}\else 530 | \setlength{\topsep}{\@sep}\fi 531 | \ifnum \@enumdepth>1\setlength{\itemsep}{0pt plus1pt minus1pt}% 532 | \else \setlength{\itemsep}{\@@sep}\fi 533 | %\setlength\leftmargin{\leftMargin}%%%{1.8em} 534 | \setlength{\parsep}{0pt plus1pt minus1pt}% 535 | \setlength{\parskip}{0pt plus1pt minus1pt} 536 | }} 537 | 538 | \def\endenumerate{\par\ifnum \@enumdepth >1\addvspace{\@@sep}\else 539 | \addvspace{\@sep}\fi \endlist} 540 | 541 | \def\sitem{\@noitemargtrue\@item[\@itemlabel *]} 542 | 543 | \def\itemize{\@ifnextchar[{\@Itemize}{\@Itemize[]}} 544 | 545 | \def\@Itemize[#1]{\def\next{#1}% 546 | \ifnum \@itemdepth >\thr@@\@toodeep\else 547 | \advance\@itemdepth\@ne 548 | \ifx\next\@empty\else\expandafter\def\csname 549 | labelitem\romannumeral\the\@itemdepth\endcsname{#1}\fi% 550 | \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% 551 | \expandafter\list\csname\@itemitem\endcsname 552 | {\def\makelabel##1{\hss\llap{##1}}}% 553 | \fi} 554 | \def\newdefinition#1{% 555 | \@ifnextchar[{\@odfn{#1}}{\@ndfn{#1}}}%] 556 | \def\@ndfn#1#2{% 557 | \@ifnextchar[{\@xndfn{#1}{#2}}{\@yndfn{#1}{#2}}} 558 | \def\@xndfn#1#2[#3]{% 559 | \expandafter\@ifdefinable\csname #1\endcsname 560 | {\@definecounter{#1}\@newctr{#1}[#3]% 561 | \expandafter\xdef\csname the#1\endcsname{% 562 | \expandafter\noexpand\csname the#3\endcsname \@dfncountersep 563 | \@dfncounter{#1}}% 564 | \global\@namedef{#1}{\@dfn{#1}{#2}}% 565 | \global\@namedef{end#1}{\@enddefinition}}} 566 | \def\@yndfn#1#2{% 567 | \expandafter\@ifdefinable\csname #1\endcsname 568 | {\@definecounter{#1}% 569 | \expandafter\xdef\csname the#1\endcsname{\@dfncounter{#1}}% 570 | \global\@namedef{#1}{\@dfn{#1}{#2}}% 571 | \global\@namedef{end#1}{\@enddefinition}}} 572 | \def\@odfn#1[#2]#3{% 573 | \@ifundefined{c@#2}{\@nocounterr{#2}}% 574 | {\expandafter\@ifdefinable\csname #1\endcsname 575 | {\global\@namedef{the#1}{\@nameuse{the#2}} 576 | \global\@namedef{#1}{\@dfn{#2}{#3}}% 577 | \global\@namedef{end#1}{\@enddefinition}}}} 578 | \def\@dfn#1#2{% 579 | \refstepcounter{#1}% 580 | \@ifnextchar[{\@ydfn{#1}{#2}}{\@xdfn{#1}{#2}}} 581 | \def\@xdfn#1#2{% 582 | \@begindefinition{#2}{\csname the#1\endcsname}\ignorespaces} 583 | \def\@ydfn#1#2[#3]{% 584 | \@opargbegindefinition{#2}{\csname the#1\endcsname}{#3}\ignorespaces} 585 | \def\@dfncounter#1{\noexpand\arabic{#1}} 586 | \def\@dfncountersep{.} 587 | \def\@begindefinition#1#2{\trivlist 588 | \item[\hskip\labelsep{\bfseries #1\ #2.}]\upshape} 589 | \def\@opargbegindefinition#1#2#3{\trivlist 590 | \item[\hskip\labelsep{\bfseries #1\ #2\ (#3).}]\upshape} 591 | \def\@enddefinition{\endtrivlist} 592 | 593 | \def\@begintheorem#1#2{\trivlist 594 | \let\baselinestretch\@blstr 595 | \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape} 596 | \def\@opargbegintheorem#1#2#3{\trivlist 597 | \let\baselinestretch\@blstr 598 | \item[\hskip \labelsep{\bfseries #1\ #2\ (#3).}]\itshape} 599 | 600 | \def\newproof#1{% 601 | \@ifnextchar[{\@oprf{#1}}{\@nprf{#1}}} 602 | \def\@nprf#1#2{% 603 | \@ifnextchar[{\@xnprf{#1}{#2}}{\@ynprf{#1}{#2}}} 604 | \def\@xnprf#1#2[#3]{% 605 | \expandafter\@ifdefinable\csname #1\endcsname 606 | {\@definecounter{#1}\@newctr{#1}[#3]% 607 | \expandafter\xdef\csname the#1\endcsname{% 608 | \expandafter\noexpand\csname the#3\endcsname \@prfcountersep 609 | \@prfcounter{#1}}% 610 | \global\@namedef{#1}{\@prf{#1}{#2}}% 611 | \global\@namedef{end#1}{\@endproof}}} 612 | \def\@ynprf#1#2{% 613 | \expandafter\@ifdefinable\csname #1\endcsname 614 | {\@definecounter{#1}% 615 | \expandafter\xdef\csname the#1\endcsname{\@prfcounter{#1}}% 616 | \global\@namedef{#1}{\@prf{#1}{#2}}% 617 | \global\@namedef{end#1}{\@endproof}}} 618 | \def\@oprf#1[#2]#3{% 619 | \@ifundefined{c@#2}{\@nocounterr{#2}}% 620 | {\expandafter\@ifdefinable\csname #1\endcsname 621 | {\global\@namedef{the#1}{\@nameuse{the#2}}% 622 | \global\@namedef{#1}{\@prf{#2}{#3}}% 623 | \global\@namedef{end#1}{\@endproof}}}} 624 | \def\@prf#1#2{% 625 | \refstepcounter{#1}% 626 | \@ifnextchar[{\@yprf{#1}{#2}}{\@xprf{#1}{#2}}} 627 | \def\@xprf#1#2{% 628 | \@beginproof{#2}{\csname the#1\endcsname}\ignorespaces} 629 | \def\@yprf#1#2[#3]{% 630 | \@opargbeginproof{#2}{\csname the#1\endcsname}{#3}\ignorespaces} 631 | \def\@prfcounter#1{\noexpand\arabic{#1}} 632 | \def\@prfcountersep{.} 633 | \def\@beginproof#1#2{\trivlist\let\baselinestretch\@blstr 634 | \item[\hskip \labelsep{\scshape #1.}]\rmfamily} 635 | \def\@opargbeginproof#1#2#3{\trivlist\let\baselinestretch\@blstr 636 | \item[\hskip \labelsep{\scshape #1\ (#3).}]\rmfamily} 637 | \def\@endproof{\endtrivlist} 638 | \newcommand*{\qed}{\hbox{}\hfill$\Box$} 639 | 640 | \@ifundefined{@biboptions}{\xdef\@biboptions{numbers}}{} 641 | \InputIfFileExists{\jobname.spl}{}{} 642 | \RequirePackage[\@biboptions]{natbib} 643 | 644 | \newwrite\splwrite 645 | \immediate\openout\splwrite=\jobname.spl 646 | \def\biboptions#1{\def\next{#1}\immediate\write\splwrite{% 647 | \string\g@addto@macro\string\@biboptions{% 648 | ,\expandafter\strip@prefix\meaning\next}}} 649 | 650 | \let\baselinestretch=\@blstr 651 | 652 | \ifnum\jtype=1 653 | \RequirePackage{geometry} 654 | \geometry{twoside, 655 | paperwidth=210mm, 656 | paperheight=297mm, 657 | textheight=562pt, 658 | textwidth=384pt, 659 | centering, 660 | headheight=50pt, 661 | headsep=12pt, 662 | footskip=12pt, 663 | footnotesep=24pt plus 2pt minus 12pt, 664 | } 665 | \global\let\bibfont=\footnotesize 666 | \global\bibsep=0pt 667 | \if@twocolumn\global\@twocolumnfalse\fi 668 | \else\ifnum\jtype=3 669 | \RequirePackage{geometry} 670 | \geometry{twoside, 671 | paperwidth=210mm, 672 | paperheight=297mm, 673 | textheight=622pt, 674 | textwidth=468pt, 675 | centering, 676 | headheight=50pt, 677 | headsep=12pt, 678 | footskip=18pt, 679 | footnotesep=24pt plus 2pt minus 12pt, 680 | columnsep=2pc 681 | } 682 | \global\let\bibfont=\footnotesize 683 | \global\bibsep=0pt 684 | \if@twocolumn\input{fleqn.clo}\fi 685 | \else\ifnum\jtype=5 686 | \RequirePackage{geometry} 687 | \geometry{twoside, 688 | paperwidth=210mm, 689 | paperheight=297mm, 690 | textheight=682pt, 691 | textwidth=522pt, 692 | centering, 693 | headheight=50pt, 694 | headsep=12pt, 695 | footskip=18pt, 696 | footnotesep=24pt plus 2pt minus 12pt, 697 | columnsep=18pt 698 | }% 699 | \global\let\bibfont=\footnotesize 700 | \global\bibsep=0pt 701 | \input{fleqn.clo} 702 | \global\@twocolumntrue 703 | %% 704 | %% End of option '5p' 705 | %% 706 | \fi\fi\fi 707 | \def\journal#1{\gdef\@journal{#1}} 708 | \let\@journal\@empty 709 | \newenvironment{frontmatter}{}{\maketitle} 710 | 711 | \long\def\@makecaption#1#2{% 712 | \vskip\abovecaptionskip\footnotesize 713 | \sbox\@tempboxa{#1: #2}% 714 | \ifdim \wd\@tempboxa >\hsize 715 | #1: #2\par 716 | \else 717 | \global \@minipagefalse 718 | \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% 719 | \fi 720 | \vskip\belowcaptionskip} 721 | 722 | \AtBeginDocument{\@ifpackageloaded{hyperref} 723 | {\def\@linkcolor{blue} 724 | \def\@anchorcolor{blue} 725 | \def\@citecolor{blue} 726 | \def\@filecolor{blue} 727 | \def\@urlcolor{blue} 728 | \def\@menucolor{blue} 729 | \def\@pagecolor{blue} 730 | \begingroup 731 | \@makeother\`% 732 | \@makeother\=% 733 | \edef\x{% 734 | \edef\noexpand\x{% 735 | \endgroup 736 | \noexpand\toks@{% 737 | \catcode 96=\noexpand\the\catcode`\noexpand\`\relax 738 | \catcode 61=\noexpand\the\catcode`\noexpand\=\relax 739 | }% 740 | }% 741 | \noexpand\x 742 | }% 743 | \x 744 | \@makeother\` 745 | \@makeother\= 746 | }{}} 747 | %% 748 | \renewcommand\appendix{\par 749 | \setcounter{section}{0}% 750 | \setcounter{subsection}{0}% 751 | \setcounter{equation}{0} 752 | \gdef\thefigure{\@Alph\c@section.\arabic{figure}}% 753 | \gdef\thetable{\@Alph\c@section.\arabic{table}}% 754 | \gdef\thesection{\appendixname\@Alph\c@section}% 755 | \@addtoreset{equation}{section}% 756 | \gdef\theequation{\@Alph\c@section.\arabic{equation}}% 757 | } 758 | \def\appendixname{Appendix } 759 | 760 | %% Added for work with amsrefs.sty 761 | 762 | \@ifpackageloaded{amsrefs}% 763 | {} 764 | {\let\bibsection\relax% 765 | \AtBeginDocument{\def\cites@b#1#2,#3{% 766 | \begingroup[% 767 | \toks@{\InnerCite{#2}#1}% 768 | \ifx\@empty#3\@xp\@gobble\fi 769 | \cites@c#3% 770 | }}} 771 | %% 772 | \endinput 773 | %% 774 | %% End of file `elsarticle.cls'. 775 | --------------------------------------------------------------------------------