diff --git a/Source/.gitignore b/Source/.gitignore index 0d574d1..0a1d39d 100644 --- a/Source/.gitignore +++ b/Source/.gitignore @@ -30,7 +30,3 @@ # ...and this LabPal plots file if you use LabPal !labpal-plots.pdf - -# Don't version auto-generated LaTeX files -preamble*.inc.tex -postamble*.inc.tex diff --git a/Source/paper.tex b/Source/paper.tex index 4fed330..732144d 100755 --- a/Source/paper.tex +++ b/Source/paper.tex @@ -1,4 +1,4 @@ -%% *************************************************************************** +%% *************************************************************************** %% My paper %% %% Authors: Emmett Brown, Marty McFly, Biff Tannen @@ -9,23 +9,12 @@ %% %% This paper is an instance of the PaperShell template. For more %% information, please visit https://github.com/sylvainhalle/PaperShell -%% *************************************************************************** +%% *************************************************************************** %% --------------------------- -%% Author preamble. Uncomment the one corresponding to the -%% stylesheet you want. **Don't forget to also uncomment the proper -%% line for the postamble at the end!!** +%% Author preamble. The contents of this file change depending on the +%% paper class you choose. %% --------------------------- -%\input{preamble-aaai.inc.tex} -%\input{preamble-acm.inc.tex} -\input{preamble-acm-journal.inc.tex} -%\input{preamble-easychair.inc.tex} -%\input{preamble-elsarticle.inc.tex} -%\input{preamble-ieee.inc.tex} -%\input{preamble-ieee-journal.inc.tex} -%\input{preamble-lipics.inc.tex} -%\input{preamble-lncs.inc.tex} -%\input{preamble-stvr.inc.tex} -%\input{preamble-svjour.inc.tex} +\input{preamble.inc.tex} %% --------------------------- %% If you wish to include additional packages, define new environments or @@ -64,20 +53,9 @@ \section{Donec id eros non nisl pharetra} %% {{{ %% }}} --- Section %% --------------------------- -%% Bibliography. Uncomment the one corresponding to the -%% stylesheet you want. +%% Bibliography and postamble %% --------------------------- -%\input{postamble-aaai.inc.tex} -%\input{postamble-acm.inc.tex} -\input{postamble-acm-journal.inc.tex} -%\input{postamble-easychair.inc.tex} -%\input{postamble-elsarticle.inc.tex} -%\input{postamble-ieee.inc.tex} -%\input{postamble-ieee-journal.inc.tex} -%\input{postamble-lipics.inc.tex} -%\input{postamble-lncs.inc.tex} -%\input{postamble-stvr.inc.tex} -%\input{postamble-svjour.inc.tex} +\input{postamble.inc.tex} \end{document} diff --git a/generate-preamble.php b/set-style.php similarity index 93% rename from generate-preamble.php rename to set-style.php index b79e8ef..3e61597 100755 --- a/generate-preamble.php +++ b/set-style.php @@ -18,24 +18,17 @@ **************************************************************************/ // Version -$version_string = "1.9.2"; +$version_string = "2.0"; $autogen_comment = "%% This file was autogenerated by PaperShell v$version_string on ".date("Y-m-d H:i:s")."\n%% https://github.com/sylvainhalle/PaperShell\n%% DO NOT EDIT!"; // Read author-title file $input_filename = "authors.txt"; $out_folder = "Source/"; -// Just show version number; used by satellite scripts to show the same version -// as the main program -if (count($argv) > 0 && $argv[1] === "--show-version") -{ - echo $version_string; - exit(0); -} - // Read default config settings. All these settings can be modified with // settings.inc.php. Do not modify them here. $config = array( + "style" => "", "tex-name" => "paper", "bib-name" => "paper", "short-title" => "", @@ -71,6 +64,30 @@ { include("settings.inc.php"); } + +// Just show version number; used by satellite scripts to show the same version +// as the main program +$to_set = ""; +for ($i = 1; $i < count($argv); $i++) +{ + $arg = $argv[$i]; + if ($arg === "--show-version") + { + echo $version_string; + exit(0); + } + $config["style"] = strtolower($arg); +} +$generated = false; +if ($config["style"] === "") +{ + // No style was provided. Stop. + echo "No style has been provided. Usage:\n"; + echo "php set-style.php