diff --git a/.github/workflows/build-latex-diff.yml b/.github/workflows/build-latex-diff.yml new file mode 100644 index 0000000..fa883c3 --- /dev/null +++ b/.github/workflows/build-latex-diff.yml @@ -0,0 +1,39 @@ +name: Build LaTeX diff document +on: + push: + branches: + - master + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build_latex: + runs-on: ubuntu-latest + env: + PAPER: ${{ github.event.repository.name }} + MAIN: ${{ github.event.pull_request.base.sha }} + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Compile LaTeX diff + uses: xu-cheng/latex-action@v3 + with: + root_file: | + ${{ env.PAPER }}-diff${{ env.MAIN }}.tex + working_directory: . + extra_system_packages: "git patch" + latexmk_shell_escape: true + pre_compile: git config --global --add safe.directory /github/workspace && latexdiff-vc --git --flatten --disable-auto-mbox --exclude-safecmd="Cref,Cref\*,hspace" -r ${{ env.MAIN }} ${{ env.PAPER }}.tex + env: + TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:" + BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common" + BIBINPUTS: ".:$PWD/../latex-styles-master/share" + - name: Upload PDF + uses: actions/upload-artifact@v2 + with: + name: DiffPDF + path: | + ${{ env.PAPER }}-diff${{ env.MAIN }}.pdf diff --git a/.github/workflows/build-latex.yml b/.github/workflows/build-latex.yml new file mode 100644 index 0000000..31e0f52 --- /dev/null +++ b/.github/workflows/build-latex.yml @@ -0,0 +1,38 @@ +name: Build LaTeX document +on: + push: + branches: + - master + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build_latex: + runs-on: ubuntu-latest + env: + PAPER: ${{ github.event.repository.name }} + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Compile LaTeX document + uses: xu-cheng/latex-action@v3 + with: + root_file: | + ${{ env.PAPER }}.tex + working_directory: . + extra_system_packages: "git patch" + latexmk_shell_escape: true + pre_compile: git config --global --add safe.directory /github/workspace + env: + TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:" + BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common" + BIBINPUTS: ".:$PWD/../latex-styles-master/share" + - name: Upload PDF + uses: actions/upload-artifact@v3 + with: + name: PDF + path: | + ${{ env.PAPER }}.pdf diff --git a/.github/workflows/latexindent.yml b/.github/workflows/latexindent.yml new file mode 100644 index 0000000..cfbab01 --- /dev/null +++ b/.github/workflows/latexindent.yml @@ -0,0 +1,26 @@ +name: latexindent + +on: + push: + branches: + - 'main' + - 'master' + +jobs: + build: + runs-on: macos-latest + steps: + - name: Checking out repository + uses: actions/checkout@v3 + - name: Install latexindent + run: brew install latexindent + - name: Run latexindent + id: run-latexindent + run: | + shopt -s nullglob # allow empty loops below + cd paper + for f in *.tex; do latexindent -l ./localSettings.yaml -m -r -w $f; done + for f in *.bib; do latexindent -l ./localSettings.yaml -m -r -w $f; done + rm *.bak[0-9] + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..5f986a2 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: ChkTeX + +on: + pull_request: + branches: + - master + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checking out repository + uses: actions/checkout@v4 + - name: LaTeX linter (chktex) + uses: dpo/chktex-action@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build comment + id: build-comment + uses: actions/github-script@v6 + with: + github-token: ${{ github.token }} + result-encoding: string + script: | + const fs = require('fs'); + return "Chktex output: \n```\n" + fs.readFileSync("${{ github.workspace }}/chktex_output.txt", "utf8").toString() + "```"; + - name: Comment in PR + uses: thollander/actions-comment-pull-request@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + message: ${{ steps.build-comment.outputs.result }} diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml new file mode 100644 index 0000000..3625d54 --- /dev/null +++ b/.github/workflows/pr-comment.yml @@ -0,0 +1,19 @@ +name: add artifact links to pr +on: + workflow_run: + workflows: ["Build LaTeX document", "Build LaTeX diff document"] + types: [completed] + +jobs: + artifacts-url-comments: + name: add artifact links to pull request and related issues job + runs-on: [ubuntu-latest] + steps: + - name: add artifact links to pull request and related issues step + uses: veitbjarsch/artifacts-url-comments@v1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prefix: "Here is the compiled" + format: "name" + addTo: "pull" diff --git a/code/README.md b/code/README.md new file mode 100644 index 0000000..6d698b6 --- /dev/null +++ b/code/README.md @@ -0,0 +1,5 @@ +# Code + +Put all the code necessary to reproduce numerical results here. +All results, tables and figures should be generated by running a single script. +Add a `Project.toml` with appropriate versions here so results can be reproduced. diff --git a/paper/.chktexrc b/paper/.chktexrc new file mode 100644 index 0000000..660e657 --- /dev/null +++ b/paper/.chktexrc @@ -0,0 +1,803 @@ +## +## ChkTeX, example resource file for ChkTeX. +## Copyright (C) 1995-96 Jens T. Berger Thielemann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +## +## Contact the author at: +## Jens Berger +## Spektrumvn. 4 +## N-0666 Oslo +## Norway +## E-mail: +## + +##################################################################### +# +# Note: The format has changed slightly (again). The { ... } +# syntax does now mean case-sensitive comparing, while [ ... ] means +# case-insensitive comparing of the keywords. Case-insensitive +# comparing of the keywords is only supported on a few of the +# keywords (it's not meaningful in all contexts, and it slows ChkTeX +# down). Keywords supporting this are marked throughout the file. +# +# You may also reset a list by saying "KEYWORD = { ... }"; it will +# then be set equal to the contents of the list you specify. +# +# Comments begin with `#', and continues for the rest of the line. +# Blank lines plus leading and trailing spaces are of course ignored. +# +# The general format of this file is the following: +# +# KEYWORD { item item ...} [ item item ... ] /* Adds items */ +# +# KEYWORD [ item item ...] { item item ... } /* Adds items */ +# +# KEYWORD = item +# +# KEYWORD = { item item ... } /* Clears list before adding */ +# +# KEYWORD = [ item item ... ] /* Clears list before adding */ +# +# This does _not_ mean that you may alternate the forms; certain +# keywords demands a list, other a single value. You thus have to +# look at the examples of their use. +# +# Please also note that if you specify a list-keyword twice, we'll +# concatenate the lists. If you specify a item-keyword twice, we'll +# kill the previous value. +# +# We are slightly context-sensitive when detecting tokens like "}" +# and "]"; they have to be preceded by a space. This generally makes +# life easier. +# +# Items are separated by spaces. Newlines are considered as spaces, +# but can't be escaped. You may surround items with quotes (`"') to +# easily put spaces into them. +# +# Escape sequences available: +# +# Sequence Resulting character +# ! A space (type `! ', not just a exclamation mark) +# !" " +# !# # +# !! ! +# !{ { +# !} } +# ![ [ +# !] ] +# != = +# !b Backspace +# !n New line +# !r Carriage return +# !t Tab +# !f Form feed +# !xNN NN must be a hexadecimal number (00 - ff), +# _both_ characters must be included. +# !dNNN DDD must be a decimal number (000 - 255), all +# three characters must be included. Unspecified +# results if DDD > 255. +# !NNN DDD must be a octal number (000 - 377), all +# three characters must be included. Unspecified +# results if DDD > 377. +# +# Minor note: As you can see, most of these escape sequences are +# equal to those in C (with some extensions); however, we use ! +# instead of \ as escape character for obvious reasons. +# +# +# Quick summary of keywords follows. Keywords marked with a * accept +# keywords accepting case-insensitive lists. +# +# Abbrev* - A list of abbreviations not automatically caught. +# CenterDots - Commands/characters which should have \cdots in +# between. +# CmdLine - Default commandline options. These will be +# processed before the ones you give on the command +# line. +# HyphDash \ +# NumDash - Number of dashes allowed in different contexts. +# WordDash / +# IJAccent - Commands which puts an accent _over_ their +# argument. +# Italic - Commands immediately turning on italic mode. +# ItalCmd - Commands putting their argument into italic. +# Linker - Commands which should have a non-breaking space in +# front. +# LowDots - Commands/characters which should have \ldots in +# between. +# MathEnvir - Environments which turn on math mode. +# MathCmd - Commands which turn on math mode. +# TextCmd - Commands which turn off math mode. +# MathRoman - Mathematical operators with LaTeX replacement +# defined. +# NoCharNext - Insists on that certain commands aren't followed by +# certain characters. +# NonItalic - Commands immediately turning off italic mode. +# NotPreSpaced- Commands which should not have a space in front of +# them. +# Primitives - Primitive TeX commands. +# PostLink - Commands which generates a page reference. +# OutFormat - Formats to use for output. See the -f & -v switch +# in the main doc. +# QuoteStyle - Either "Traditional" or "Logical". See main doc, +# warning 38. +# Silent - These commands do not produce any textual output; +# and are thus allowed to have a space after them. +# TabSize - Tab size you are using. +# TeXInputs - Paths to search \input and \include files for. +# UserWarn* - These strings will be searched for throughout the +# text. +# VerbEnvir - Environments which contents should be ignored. +# VerbClear - String we will overwrite unwanted data with. +# WipeArg - Commands (with arguments) which should be ignored +# in the checking. +# + + +##################################################################### +# +# Enter which type of quote-style you are using here. Currently, we +# support the following styles: +# +# Style Example of use +# Traditional "An example," he said, "would be great." +# Logical "An example", he said, "would be great". +# + +QuoteStyle = Traditional + +##################################################################### +# +# Enter here what interval you have between your tabs. Only regular +# intervals are supported. +# + +TabSize = 8 + +##################################################################### +# +# Here, you can put default commandline options; most users would for +# instance like to put -v2 here. +# + +CmdLine +{ + -n 1 + -n 44 +} + +##################################################################### +# +# These patterns will be searched for through the text; no matter +# whether they appear as normal text, commands or whatever. +# Currently case-sensitive. They are not found in comments. +# +# I usually define a special command like this: +# +# \def\unknown{\large\bf??} +# +# which I use whenever there is some information I don't have at the +# moment of writing. Thus, it makes sense to search for it. +# +# You should be able to develop your own uses for this. +# + +UserWarn +{ + + \unknown +### +# +# Another example; one should write \chktex or Chk\TeX - never ChkTeX. +# +### + + ChkTeX +} +[ + +### +# +# You may put case-insensitive patterns here. +# +### + +] + + +### +# +# These patterns will be searched for, no matter whether they appear +# as normal text, commands or arguments. However, they will _not_ +# match in verbatim environments. +# +# Remember that you have to escape (with a !) the following +# characters: "#!= as well as spaces and {}[] if they are proceeded by +# a space. +# +# Since these are PCRE regular expressions, you can use (?i) to make +# the expression case insensitive. See the man pages (man pcresyntax) +# or the nicely formatted http://perldoc.perl.org/perlre.html for +# documentation on the regular expression syntax. Note however that +# some the features of perl regular expression are not available such +# as running code (callouts), and replacing. +# +# An initial PCRE comment (?# ... ) can be used change what is +# displayed, thereby reminding yourself how to fix the problem. +# +### +UserWarnRegex +{ + + (?!#Always! use! \nmid)\\not! *(\||\\mid) + + # capitalize section when saying Section 6. + (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref + (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref + + # spell it out. + # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.) + # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$) + + # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf + (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline + # This relies on it being on a single line, and not having anything + # else on that line. With PCRE we could match balanced [] and {}, + # but I wonder if it's worth the complexity... + (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\} + +} + + +##################################################################### +# +# Here you can list the path of where ChkTeX should look for files it +# \inputs. The // postfix is now supported; if you append a double +# path-separator we'll recursively search that directory directories. +# MS-DOS users must append \\ instead, e.g. "C:\EMTEX\\". +# +# If you under either MS-DOS or UNIX wish to search an entire +# partition or the complete directory tree, you must use *three* +# slashes, e.g. "c:\\\" or "///". This may be considered to be a bug. +# +# By default, we'll search the current directory (not recursively, +# put "//" in the list for this); any paths specified below will be +# searched in addition to this. +# + +TeXInputs +{ + +} + +##################################################################### +# +# Here you may specify more output formats for use with the -v option, +# it simply indexes into this list. Remember to use ! instead of \, +# though. +# +# For explanation of how % fields expand; look at ChkTeX.{dvi,ps,pdf}. +# +# We will by default select entry number _two_ in this list (we count +# from 0), and -v without any parameter selects entry number _three_. +# + +OutFormat +{ + +# -v0; silent mode +%f%b%l%b%c%b%n%b%m!n + +# -v1; normal mode +"%k %n in %f line %l: %m!n%r%s%t!n%u!n" + +# -v2; fancy mode +"%k %n in %f line %l: %m!n%r%i%s%I%t!n!n" + +# -v3; lacheck mode +"!"%f!", line %l: %m!n" + +# -v4; verbose lacheck mode +"!"%f!", line %l: %m!n%r%s%t!n%u!n" + +# -v5; no line number, ease auto-test +"%k %n in %f: %m!n%r%s%t!n%u!n" + +# -v6; emacs compilation mode +"!"%f!", line %l.%c:(#%n) %m!n" + +} + + + +##################################################################### +# +# These commands should be ignored when detecting whether a command +# is ended by a space. You can specify regular expressions in the [] +# section in case you have many custom macros that can be safely +# terminated with a space. +# + +Silent +{ + \rm \em \bf \it \sl \sf \sc \tt \selectfont + \rmfamily \sffamily \ttfamily \mdseries \bfseries + \slshape \scshape \relax + \vskip \pagebreak \nopagebreak + + \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt + + \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak + \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy + \twocolumn \vdots + \today \kill \newline \thicklines \thinlines + + \columnsep \space \item \tiny \footnotesize \small \normalsize + \normal \large \Large \LARGE \huge \Huge \printindex + + \newpage \listoffigures \listoftables \tableofcontents + \maketitle \makeindex + + \hline \hrule \vrule + + \centering + + \bigskip \medskip \smallskip + + \noindent \expandafter + + \makeatletter \makeatother + + \columnseprule + + \textwidth \textheight \hsize \vsize + + \if \fi \else + + \csname \endcsname + + \z@ \p@ \@warning \typeout + + \dots \ldots \input \endinput \nextline \leavevmode \cdots + \appendix \listfiles \and \quad + \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin + \frenchspacing \nonfrenchspacing + \begingroup \endgroup \par + + \vrefwarning \upshape \headheight \headsep \hoffset \voffset + \cdot \qquad + \left \right + \qedhere + + \xspace + + \addlinespace \cr \fill \frontmatter + \toprule \midrule \bottomrule + +}[ +# Here you can put regular expressions to match Silent macros. It was +# designed for the case where you have many custom macros sharing a +# common prefix, but can of course be used for other things. + +# Support ConTeXt to at least some extent +\\start.* \\stop.* + +] + +##################################################################### +# +# Here, you can specify the length of various dashes. We sort the +# dash according to which type of characters that are on the left and +# right of it. We are only conclusive if they are the same. +# +# We associate as follows: +# +# Name Type of character on each side +# HyphDash Alphabetic (foo-bar) +# NumDash Numeric (2--3) +# WordDash Space (like this --- see?) +# +# Below you specify how many dashes which are legal in each case. We +# define 0 as a magic constant which always generates an error. You +# may specify more than one legal dash-length. +# +# Let's look at an example. You use the following dash-syntax: +# +# foo-bar +# 2--3 +# like this---see? +# +# +# HYPHDASH { 1 3 } # Either a hyphen, or inter-word +# NUMDASH { 2 } # Between words +# WORDDASH { 0 } # We never use this +# + +HyphDash +{ + 1 3 +} + +NumDash +{ + 2 +} + +WordDash +{ + 3 +} + +##################################################################### +# +# Here are exceptions to the dash rules above. For example, an +# n-dash -- between words is usually wrong, but in some cases it is +# correct, such as when naming a theorem. The Birch--Swinnerton-Dyer +# conjecture is one example where the difference matters. You can +# tell that Birch is one person and Swinnerton-Dyer is another. +# +# Adding line suppressions for these is possible, but can quickly +# become tedious if a certain theorem is referenced often. For this +# reason exceptions can be specified here. They are case-sensitive. +# + +DashExcpt +{ + Birch--Swinnerton-Dyer +} + +##################################################################### +# +# This keyword indicates commands whose argument isn't LaTeX code, +# and thus should be ignored. +# +# After the command, you may place arguments that you wish that +# should be wiped in the process; use [] for optional arguments, {} +# for required ones and * if the command supports an alternative +# variant. These should be separated from the command with a colon. +# Some commands (e.g. \cmidrule) use () to delimit and optional +# argument and so this syntax is supported as well. +# +# For instance, if you would like to wipe the \newcommand command, +# you would declare it as \newcommand:*[][]{} +# +# These commands may be "executed" before they're wiped, so you will +# typically also wish to list filehandling commands and similar here. +# + +WipeArg +{ + \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{} + \cite:[][]{} \nocite:{} + \input:{} \verbatiminput:[]{} \listinginput:[]{}{} + \verbatimtabinput:[]{} \include:{} \includeonly:{} + \bibitem:[]{} + \cline:{} \cmidrule:[](){} + \href:{}{} + # Cleveref -- there are many others that could be here as well... + \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{} + \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{} + # natbib + \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{} + \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{} + \citetext:{} \citeyear:*{} \citeyearpar:{} + # tipa which uses " + \textipa:{} +} + +##################################################################### +# +# These environments contain material which will be typeset as +# mathematics by LaTeX. This turns on/off some warnings. +# +# We will automagically append a * to each keyword. +# + +MathEnvir +{ + displaymath math eqnarray array equation + align alignat gather flalign multline +} + +##################################################################### +# +# These commands contain material which will be typeset as mathematics +# by LaTeX. The commands are assumed to have one mandatory argument +# which is in math mode. This turns on/off some warnings. +# + +MathCmd +{ + \ensuremath +} + +##################################################################### +# +# These commands contain material which will _not_ be typeset as +# mathematics by LaTeX even if it would otherwise be in mathmode. The +# commands are assumed to have one mandatory argument which is in text +# mode. This turns on/off some warnings. +# + +TextCmd +{ + \text \intertext \shortintertext \mbox +} + +##################################################################### +# +# These environments contains material which contents should be +# ignored. +# +# We will automagically append a * to each keyword. +# + +VerbEnvir +{ + verbatim comment listing verbatimtab rawhtml errexam picture texdraw + filecontents pgfpicture tikzpicture minted lstlisting IPA +} + +##################################################################### +# +# ChkTeX does automagically catch most abbreviations; the ones we +# need to list here, are those which are most likely to be followed +# by a word with an upper-case letter (that is not the beginning of a +# new sentence). +# +# The case-insensitive abbreviations are not really case-insensitive, +# it seems to be more practical to only let the first character be +# case-insensitive, while the remaining are case-sensitive. +# +# To speed up the searching process somewhat, we require that these +# end in a `.', this should not be a problem. +# +# Much of this work (both the abbreviations below, and the regexps +# necessary to catch the remaining automatically) have been provided +# by Russ Bubley, . +# + +Abbrev +{ +# Ordinals +1st. 2nd. 3rd. 4th. +# Titles +Mr. Mrs. Miss. Ms. Dr. Prof. St. + +# +# Days +# Mon. Tue. Wed. Thu. Fri. Sat. Sun. +# +# Months +# Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec. +# +# Letters +# Kt. Jr. +# +# Corporate +# Co. Ltd. +# +# Addresses +# Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn. +# +# Misc. +# oe. pbab. ps. rsvp. Tx. +} +[ +### +# +# The first letter is case-insensitive in the abbrevs in this +# list. Due to the nature of the checking algorithm used for +# this, entries consisting of only one character will be +# silently ignored. +# +## + +# Latin +# cf. "et al." etc. qed. qv. viz. +# +# Corporate +# inc. plc. +# +# Misc +# fax. pcs. qty. tel. misc. +] + +##################################################################### +# +# Commands which accent characters, meaning that \i or \j (\imath and +# \jmath in mathmode) should be used instead of `i' and `j' +# + +IJAccent +{ + \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot + + \' \` \^ \" \~ \= \. \u \v \H \t + +### +# +# The remaining accent commands (\c,\d,\b) put their accent _under_ +# the character, not above, and should thus be used with normal i's +# and j's. +# +### + +} + +##################################################################### +# +# Commands which, when the group is terminated, needs italic +# correction. +# + +Italic +{ + \it \em \sl + \itshape \slshape +} + +##################################################################### +# +# Commands which makes the font non-italic. +# + +NonItalic +{ + \bf \rm \sf \tt \sc + \upshape +} + +##################################################################### +# +# Commands which put their argument into italic (and thus possibly +# needs italic correction in the end). +# +# This is currently empty, since \textit, \textsl and \emph do that +# automatically. +# + +ItalCmd +{ +} + +##################################################################### +# +# These commands all have in common that a pagebreak right in front +# of them is highly undesirable; thus there should be no space in +# front of them. +# + +PostLink +{ + \index \label +} + +##################################################################### +# +# These commands should not have a space in front of them for various +# reasons. I.e. much the same as POSTLINK, but produces another +# warning. +# + +NotPreSpaced +{ + \footnote \footnotemark \/ +} + +##################################################################### +# +# The commands listed here, should be prepended with a `~', as in +# "look in table~\ref{foo}", to avoid the references being split +# across lines. +# + +Linker +{ + \ref \vref \pageref \eqref \cite +} + +##################################################################### +# +# Commands/characters which should have \cdots in between, e.g. +# $1+2+3+\cdots+n$. +# + +CenterDots +{ + = + - \cdot \div & \times \geq \leq < > +} + +##################################################################### +# +# Commands/characters which should have \ldots in between, e.g. +# $1,2,3,\ldots,n$. +# + +LowDots +{ + . , ; +} + +##################################################################### +# +# In maths mode, there are certain aliases for mathematical operators +# like sin, cos, etc. Ignore the leading backslash in the commands, +# and so forth. You should list these below. +# + +MathRoman +{ + log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan + arctan tanh cot coth sec csc max min sup inf arg ker dim hom det + exp Pr gcd deg bmod pmod mod +} + +##################################################################### +# +# These TeX commands have become unnecessary, as there are LaTeX +# commands that does the same. Purists should thus avoid these in +# their code. +# +# (These are a spell-corrected version of those lacheck uses). +# + +Primitives +{ + \above \advance \catcode \chardef \closein \closeout \copy \count + \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide + \expandafter \font \hskip \vskip \openout +} + +##################################################################### +# +# Format: \command:characters +# +# We'll emit a warning if any of characters are found after the +# command. +# + +NoCharNext +{ + \left:{}$ \right:{}$ +} + +##################################################################### +# +# We're killing \verb@...@ commands and the arguments of the commands +# listed above in WipeArg by overwriting them with a string or a +# single character. +# +# This should not contain an alphabetic character (in case the user +# writes (\foo\verb@bar@), neither should it contain be one of +# LaTeX's reserved characters (`#$%&~_^\{}'), or any parenthesis +# character ('()[]{}'). If possible, don't use a punctuation +# character, either, or any spacing character. +# +# The asterisk is also unsuitable, as some commands behave in another +# way if they are appended with an asterisk. Which more or less +# leaves us with the pipe. +# +# Please note that this may also be a _string_, which will be +# repeated until the proper length is reached. +# + +VerbClear = "|" + +# +# All for now - have fun. +# +##################################################################### diff --git a/paper/abbrv.bib b/paper/abbrv.bib new file mode 100644 index 0000000..07c1b04 --- /dev/null +++ b/paper/abbrv.bib @@ -0,0 +1,193 @@ +@string{acta = {Acta Numer.}} +@string{acha = {Appl. Comput. Harmon. A.}} +@string{aor = {Annals of Operations Research}} +@string{anm = {Appl. Numer. Math.}} +@string{ast = {Ann. Stat.}} +@string{bit = {BIT Numer. Math.}} +@string{bmb = {B. Math. Biophys.}} +@string{cacm = {Commun. ACM}} +@string{cj = {Computer Journal}} +@string{coap = {Comput. Optim. Appl.}} +@string{cpam = {Commun. Pur. Appl. Math.}} +@string{cpc = {Comput. Phys. Commun.}} +@string{csb = {Chinese Science Bulletin}} +@string{dnam = {Report DNAM}} +@string{etna = {ETNA}} +@string{euro = {EURO J. Comput. Optim.}} +@string{geophysics = {Geophysics}} +@string{ieee-tif = {IEEE T. Inform. Theory}} +@string{ieee-tsp = {IEEE T. Signal Proces.}} +@string{ijcma = {Intern. J. of Computers and Mathematics with Applications}} +@string{ijcv = {Int. J. Comput. Vis.}} +@string{ijmpc = {Int J Mod Phys C}} +@string{ijnme = {International Journal on Numerical Methods in Engineering}} +@string{imajna = {IMA J. Numer. Anal.}} +@string{infjoc = {INFORMS J. Comput.}} +@string{jacm = {J. Assoc. Comput. Mach.}} +@string{jasa = {J. Am. Stat. Assoc.}} +@string{jcam = {J. Comput. Appl. Math.}} +@string{jcm = {J. Comput. Math.}} +@string{jco = {J. Complexity}} +@string{jgc = {J. of Guidance, Control, and Dynamics}} +@string{jima = {J. I. Math. Appl.}} +@string{jmaa = {J. Math. Anal. Appl.}} +@string{jmiv = {J. Math. Imaging Vis.}} +@string{jmlr = {J. Mach. Learn Res.}} +@string{jmphy = {J. Math. Phys. Camb.}} +@string{jor = {J. Open Res. Softw.}} +@string{jota = {J. Optim. Theory and Applics.}} +@string{jrnbs = {J. Res. Natl. Bur. Stand.}} +@string{jrssb = {J. Roy. Statist. Soc. Ser. B}} +@string{jvcir = {J. Vis. Commun. Image R.}} +@string{laa = {Linear Algebra Appl.}} +@string{mc = {Math. Comp.}} +@string{mor = {Math. Oper. Res.}} +@string{mp = {Math. Program.}} +@string{mpa = {Math. Program., Series~A}} +@string{mpb = {Math. Program., Series~B}} +@string{mpc = {Math. Program. Comp.}} +@string{mps = {Math. Program. Stud.}} +@string{mpstudy = {Math. Program. Study}} +@string{ms = {Manage. Sci.}} +@string{mtac = {Math. Tables Aids Comput.}} +@string{nac = {Report NAC}} +@string{nlaa = {Numer. Linear Algebra Appl.}} +@string{numalg = {Numer. Algor.}} +@string{nm = {Numer. Math.}} +@string{npl = {National Physical Laboratory, England}} +@string{oms = {Optim. Method Softw.}} +@string{opt = {Optimization}} +@string{opte = {Optim. Eng.}} +@string{optl = {Optim. Lett.}} +@string{optsyst = {Division of Optimization and Systems Theory, Department of Mathematics, Royal Institute of Technology}} +@string{or = {Operations Research}} +@string{orl = {Operations Research Letters}} +@string{orsajoc = {ORSA J. of Computing}} +@string{pc = {Parallel Comput.}} +@string{qam = {Q. Appl. Math.}} +@string{rairo-mm = {RAIRO-Mathematical Modelling and Numerical Analysis---Mod\'{e}lisation Math\'{e}matique et Analyse Num\'{e}rique}} +@string{rairo-or = {RAIRO-Recherche Op\'{e}rationnelle---Operations Research}} +@string{siadm = {SIAM Journal on Algebraic and Discrete Methods}} +@string{siapm = {SIAM J. Appl. Math.}} +@string{sic = {SIAM J. Computing}} +@string{sico = {SIAM J. Control Optim.}} +@string{siims = {SIAM J. Imaging Sci.}} +@string{simax = {SIAM J. Matrix Anal. Appl.}} +@string{sinum = {SIAM J. Numer. Anal.}} +@string{siopt = {SIAM J. Optim.}} +@string{sirev = {SIAM Rev.}} +@string{sisc = {SIAM J. Sci. Comput.}} +@string{sissc = {SIAM J. Sci. and Statist. Comput.}} +@string{tams = {Trans. Amer. Math. Soc.}} +@string{toms = {ACM Trans. Math. Software}} + +@string{adw = {Addison-Wesley Publishing Company}} +@string{adw-address = {Reading, Massachusetts, USA}} +@string{aeat = {{AEA} {T}echnology}} +@string{ams = {American Mathematical Society}} +@string{ams-address = {Providence, Rhode-Island, USA}} +@string{cup = {Cambridge University Press}} +@string{cup-address = {Cambridge, England}} +@string{elsevier = {Elsevier}} +@string{freeman = {W. H. Freeman and Company}} +@string{freeman-address = {New York and San Francisco}} +@string{kluwer = {Kluwer Academic Publishers}} +@string{kluwer-address = {Dordrecht, The Netherlands}} +@string{longman = {Longman Scientific {\&} Technical}} +@string{longman-address = {Harlow, Essex, England}} +@string{macgh = {McGraw-Hill}} +@string{macgh-address = {New York, USA}} +@string{nh = {North Holland}} +@string{nh-address = {Amsterdam, The Netherlands}} +@string{oup = {Oxford University Press}} +@string{oup-address = {Oxford, England}} +@string{ph = {Prentice-Hall}} +@string{ph-address = {Englewood Cliffs, New Jersey, USA}} +@string{siam = {SIAM}} +@string{siam-address = {Philadelphia, USA}} +@string{springer = {Springer Verlag}} +@string{springer-address = {Heidelberg, Berlin, New York}} +@string{wiley = {J. Wiley and Sons}} +@string{wiley-address = {Chichester, England}} +@string{wsp = {World Scientific Publishers}} +@string{wsp-address = {Singapore}} + +@string{acri-cornell = {Advanced Computing Research Institute, Cornell Theory Center}} +@string{anl = {Argonne National Laboratory}} +@string{anl-address = {Argonne, Illinois, USA}} +@string{ap = {Academic Press}} +@string{ap-address = {London}} +@string{belllabs = {Bell Laboratories}} +@string{belllabs-address = {Murray Hill, New Jersey, USA}} +@string{caam = {Department of Computational and Applied Mathematics, Rice University}} +@string{cerfacs = {CERFACS}} +@string{cerfacs-address = {Toulouse, France}} +@string{coimbra = {Department of Mathematics, University of Coimbra}} +@string{coimbra-address = {Coimbra, Portugal}} +@string{compj = {Computer Journal}} +@string{cornell-address = {Ithaca, New York, USA}} +@string{crpc = {Center for Research on Parallel Computers}} +@string{cs-cornell = {Department of Computer Science, Cornell University}} + +@string{damtp = {Department of Applied Mathematics and Theoretical Physics, Cambridge University}} +@string{damtp-address = {Cambridge, England}} + +@string{dundee = {Department of Mathematics, University of Dundee}} +@string{dundee-address = {Dundee, Scotland}} + +@string{fundp = {Department of Mathematics, University of Namur}} +@string{fundp-address = {Namur, Belgium}} + +@string{gerad = {GERAD}} +@string{gerad-address = {Montr\'eal, QC, Canada}} +@string{cahier = {Cahier du GERAD}} + +@string{hamburg = {Institute of Applied Mathematics, University of Hamburg}} +@string{hamburg-address = {Hamburg, Germany}} + +@string{harwell = {{AERE} {H}arwell Laboratory}} +@string{harwell-address = {Harwell, Oxfordshire, England}} + +@string{hatfield = {Numerical Optimization Center, Hatfield Polytechnic}} + +@string{ibmwatson = {T. J. Watson Research Center}} +@string{ibmwatson-address = {Yorktown Heights, NY, USA}} + +@string{icase = {Institute for Computer Applications in Science and Engineering}} +@string{icase-address = {NASA Langley Research Center Hampton, Virginia, USA}} + +@string{icmsec = {Institute of Computational Mathematics and Scientific/Enginering Computing, Chinese Academy of Sciences}} +@string{icmsec-address = {Beijing, China}} + +@string{madison = {Computer Sciences Department, University of Wisconsin}} +@string{madison-address = {Madison, Wisconsin, USA}} + +@string{mathwaterloo = {Faculty of Mathematics, University of Waterloo}} +@string{mathwaterloo-address = {Waterloo, Ontario, Canada}} + +@string{mccm = {Manchester Centre for Computational Mathematics}} +@string{mccm-address = {Manchester, England}} + +@string{nist = {Applied and Computational Mathematics Division}} +@string{nist-address = {National Institute of Standards and Technology, Gaithersburg, Maryland, USA}} + +@string{npl = {National Physical Laboratory}} +@string{npl-address = {London, England}} + +@string{nwu = {Department of Electrical Engineering and Computer Science, Northwestern University}} +@string{nwu-address = {Evanston, Illinois, USA}} + +@string{otc = {Optimization Technology Center, Argonnne National Laboratory}} +@string{otc-address = {Argonne, Illinois, USA}} + +@string{ral = {Rutherford Appleton Laboratory}} +@string{ral-address = {Chilton, Oxfordshire, England}} + +@string{rice = {Department of Mathematical Sciences, Rice University}} +@string{rice-address = {Houston, Texas, USA}} + +@string{stanford = {Department of Operations Research, Stanford University}} +@string{stanford-address = {Stanford, California, USA}} + +@string{unicamp = {Department of Applied Mathematics, IMECC-UNICAMP}} +@string{unicamp-address = {Campinas, Brasil}} diff --git a/paper/abbrvnat.bst b/paper/abbrvnat.bst new file mode 100644 index 0000000..53253bf --- /dev/null +++ b/paper/abbrvnat.bst @@ -0,0 +1,1448 @@ +%% File: `abbrvnat.bst' +%% A modification of `abbrv.bst' for use with natbib package +%% +%% Copyright 1993-2007 Patrick W Daly +%% Max-Planck-Institut f\"ur Sonnensystemforschung +%% Max-Planck-Str. 2 +%% D-37191 Katlenburg-Lindau +%% Germany +%% E-mail: daly@mps.mpg.de +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +%% + % Version and source file information: + % \ProvidesFile{natbst.mbs}[2007/11/26 1.93 (PWD)] + % + % BibTeX `plainnat' family + % version 0.99b for BibTeX versions 0.99a or later, + % for LaTeX versions 2.09 and 2e. + % + % For use with the `natbib.sty' package; emulates the corresponding + % member of the `plain' family, but with author-year citations. + % + % With version 6.0 of `natbib.sty', it may also be used for numerical + % citations, while retaining the commands \citeauthor, \citefullauthor, + % and \citeyear to print the corresponding information. + % + % For version 7.0 of `natbib.sty', the KEY field replaces missing + % authors/editors, and the date is left blank in \bibitem. + % + % Includes field EID for the sequence/citation number of electronic journals + % which is used instead of page numbers. + % + % Includes fields ISBN and ISSN. + % + % Includes field URL for Internet addresses. + % + % Includes field DOI for Digital Object Idenfifiers. + % + % Works best with the url.sty package of Donald Arseneau. + % + % Works with identical authors and year are further sorted by + % citation key, to preserve any natural sequence. + % +ENTRY + { address + author + booktitle + chapter + doi + eid + edition + editor + howpublished + institution + isbn + issn + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + url + volume + year + } + {} + { label extra.label sort.label short.list } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { ", editors" * } + { ", editor" * } + if$ + } + if$ +} + +FUNCTION {format.isbn} +{ isbn empty$ + { "" } + { new.block "ISBN " isbn * } + if$ +} + +FUNCTION {format.issn} +{ issn empty$ + { "" } + { new.block "ISSN " issn * } + if$ +} + +FUNCTION {format.url} +{ url empty$ + { "" } + { new.block "\url{" url * "}" * } + if$ +} + +FUNCTION {format.doi} +{ doi empty$ + { "" } + { new.block "\doi{" doi * "}" * } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { doi empty$ + { url empty$ + { title "t" change.case$ } + { "\href{" url * "}{" * title "t" change.case$ * "}" * } + if$ + } + { "\doilink{" doi * "}{" * title "t" change.case$ * "}" * } + if$ + } + if$ +} + +FUNCTION {format.full.names} +{'s := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.full} +{ author empty$ + { editor empty$ + { "" } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.full} +{ author empty$ + { "" } + { author format.full.names } + if$ +} + +FUNCTION {editor.full} +{ editor empty$ + { "" } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.full + { type$ "proceedings" = + 'editor.full + 'author.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.date} +{ year duplicate$ empty$ + { "empty year in " cite$ * warning$ + pop$ "" } + 'skip$ + if$ + month empty$ + 'skip$ + { month + " " * swap$ * + } + if$ + extra.label * +} + +FUNCTION {format.btitle} +{ doi empty$ + { title emphasize } + { "\doilink{" doi * "}{" * title emphasize * "}" * } + if$ +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "volume" volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pages" pages n.dashify tie.or.space.connect } + { "page" pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.eid} +{ eid empty$ + { "" } + { "art." eid tie.or.space.connect } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { "\penalty0 (" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ":\penalty0 " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.vol.num.eid} +{ volume field.or.null + number empty$ + 'skip$ + { "\penalty0 (" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + eid empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.eid } + { ":\penalty0 " * eid * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { "In " booktitle emphasize * } + { "In " format.editors * ", " * booktitle emphasize * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In \emph{" journal * "}" * } + if$ + } + { "In " } + if$ + " \citet{" * crossref * "}" * +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "\emph{" * series * "}" * } + if$ + } + 'skip$ + if$ + } + 'skip$ + if$ + " \citet{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In \emph{" booktitle * "}" * } + if$ + } + { "In " } + if$ + } + { "In " } + if$ + " \citet{" * crossref * "}" * +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + new.block + crossref missing$ + { journal emphasize "journal" output.check + eid empty$ + { format.vol.num.pages output } + { format.vol.num.eid output } + if$ + format.date "year" output.check + } + { format.article.crossref output.nonnull + eid empty$ + { format.pages output } + { format.eid output } + if$ + } + if$ + format.issn output + % format.doi output + % format.url output + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.date "year" output.check + format.isbn output + % format.doi output + format.url output + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output + new.block + format.title "title" output.check + howpublished address new.block.checkb + howpublished output + address output + format.date output + format.isbn output + format.doi output + format.url output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.date "year" output.check + format.isbn output + format.doi output + format.url output + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.chapter.pages output + new.sentence + publisher "publisher" output.check + address output + format.edition output + format.date "year" output.check + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.isbn output + % format.doi output + format.url output + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.pages output + address empty$ + { organization publisher new.sentence.checkb + organization output + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + organization output + publisher output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + format.isbn output + % format.doi output + % format.url output + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output + new.block + format.btitle "title" output.check + organization address new.block.checkb + organization output + address output + format.edition output + format.date output + format.url output + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + format.url output + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output + title howpublished new.block.checkb + format.title output + howpublished new.block.checka + howpublished output + format.date output + format.issn output + % format.url output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.btitle "title" output.check + new.block + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + format.url output + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.editors output + editor format.key output + new.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + address output + format.date "year" output.check + new.sentence + organization output + publisher output + format.isbn output + format.doi output + format.url output + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + format.date "year" output.check + % format.doi output + % format.url output + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + new.block + note "note" output.check + format.date output + format.url output + fin.entry +} + +FUNCTION {default.type} { misc } + + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sept."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + + + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Softw. Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Programming"} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Gr."} + +MACRO {toms} {"ACM Trans. Math. Softw."} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} + +MACRO {tcs} {"Theoretical Comput. Sci."} + + +READ + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {format.lab.names} +{ 's := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * s #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.organization.label + { type$ "manual" = + 'author.key.organization.label + 'author.key.label + if$ + } + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { numnames #2 > nameptr #2 = and + { "zz" * year field.or.null * " " * } + 'skip$ + if$ + t sortify * + } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + + +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + 'author.sort + if$ + } + if$ + } + if$ + " " + * + year field.or.null sortify + * + " " + * + cite$ + * + #1 entry.max$ substring$ + 'sort.label := + sort.label * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT + +STRINGS { longest.label last.label next.extra } + +INTEGERS { longest.label.width last.extra.num number.label } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'longest.label.width := + #0 'last.extra.num := + #0 'number.label := +} + +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} + +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} + +EXECUTE {initialize.longest.label} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +FUNCTION {bib.sort.order} +{ sort.label 'sort.key$ := +} + +ITERATE {bib.sort.order} + +SORT + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\expandafter\ifx\csname urlstyle\endcsname\relax" + write$ newline$ + " \providecommand{\doi}[1]{doi: #1}\else" + write$ newline$ + " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi" + write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} diff --git a/paper/defs.sty b/paper/defs.sty new file mode 100644 index 0000000..87482fc --- /dev/null +++ b/paper/defs.sty @@ -0,0 +1,327 @@ +\usepackage{gitinfo} + +% +% To-do notes. +% +\usepackage[textwidth=.8\marginparwidth, + backgroundcolor=lightgray, + linecolor=gray, + textsize=scriptsize, + colorinlistoftodos]{todonotes} +% +\newcommand{\smarttodo}[2][]{% + \todo[caption={\protect\hypertarget{todo}{} #2}, #1]{\hyperlink{todo}{#2} +}} + +\makeatletter +% +% Tech report number to go at top of first page. +% +\def\cahierline{\gdef\@cahierline} +\cahierline{\textcolor{gray}{Cahier du GERAD G-\number\year-\cahiernumber}} +% +% Git info line. +% +\def\gitline{\gdef\@gitline} +\gitline{\textcolor{gray}{Commit \gitAbbrevHash\ by \gitAuthorName\ on \gitAuthorIsoDate}} +% +% Headings. +% +\def\ps@mytitlepage{\let\@mkboth\@gobbletwo + \def\@oddfoot{\normalfont\scriptsize\ttfamily\hfil\@gitline} + \def\@evenfoot{\normalfont\scriptsize\ttfamily\@gitline\hfil} + \def\@evenhead{\normalfont\small\rlap{\@cahierline}%\hspace{\headlineindent} + \hfil} + \def\@oddhead{\normalfont\small\hfil%\hspace{\headlineindent} + \llap{\@cahierline}} + % \def\chaptermark##1{}% + % \def\sectionmark##1{}% + % \def\subsectionmark##1{}% +} + +\def\ps@myheadings{\let\@mkboth\@gobbletwo + \def\@oddfoot{\normalfont\scriptsize\ttfamily\@cahierline\hfil\@gitline} + \def\@evenfoot{\normalfont\scriptsize\ttfamily\@gitline\hfil\@cahierline} + \def\@evenhead{\normalfont\small\rlap{\thepage}%\hspace{\headlineindent}% + % \leftmark\hfil\scshape\hyperlink{contents}{[toc]} + } + \def\@oddhead{\normalfont\small\scshape%\hyperlink{contents}{[toc]} + \hfil\rightmark%\hspace{\headlineindent} + \llap{\thepage}} + % \def\chaptermark##1{}% + % \def\sectionmark##1{}% + % \def\subsectionmark##1{}% +} +\makeatother + +% For the Cahier du GERAD. +%\renewcommand{\year}{2020} % If you don't want the current year. +\newcommand{\cahiernumber}{00} % Insert your Cahier du GERAD number. + +\usepackage[margin=1in]{geometry} +\usepackage[T1]{fontenc} +\usepackage{amsthm} % must come before newpxtext and newpxmath +\usepackage{amssymb} +\renewcommand{\rmdefault}{pplx} +\usepackage{eulervm} % Euler math + +\usepackage{amsmath} +\usepackage{thmtools} +\usepackage[final]{microtype} % Less badboxes +\usepackage{xspace} +\usepackage{subdepth} % Equalize depth of subscripts. Amazing! + +\usepackage{graphicx} +\graphicspath{{figs/}} + +\usepackage{xcolor} +\usepackage{tikz} +\usepackage{tikzscale} +\usetikzlibrary{external} +\tikzexternalize[optimize=false,prefix=./figs/] % must compile with -shell-escape ! + +% tikz-generated PDFs should have the same name as the source tikz file +\newcommand*{\includetikzgraphics}[2][]{% + \tikzsetnextfilename{#2}% + \includegraphics[#1]{#2.tikz} +} + +% compile TikZ figures with LuaLaTeX to avoid running out of memory +\tikzset{external/system call={lualatex \tikzexternalcheckshellescape + -halt-on-error + -interaction=batchmode + -jobname "\image" "\texsource"}} + +% uncomment the following to simply include the generated PDFs +% \newcommand*{\includetikzgraphics}[2][]{% +% \includegraphics[#1]{#2} +% } + +% prevent TODO notes from being exported by \tikzexternalize +% and weird effects to happen as a consequence +% https://tex.stackexchange.com/questions/42486/todonotes-and-tikzexternalize +\makeatletter +\renewcommand{\todo}[2][]{\tikzexternaldisable\@todo[#1]{#2}\tikzexternalenable} +\makeatother + +\usepackage{pgfplots} +% Moves axis labels near ticklabels (respects tick label widths). +\pgfplotsset{compat=newest} +\pgfplotsset{ + tick label style={font=\scriptsize}, + title style={font=\scriptsize}, + label style={font=\scriptsize}, + legend style={font=\scriptsize}, + scaled x ticks = false, + scaled y ticks = false, + height = {50mm}, + width = {50mm}, + xticklabel style = {font=\scriptsize}, + yticklabel style = {font=\scriptsize}, + table/search path={figs}, % location of dat files for TikZ figures +} + +\usepackage{algorithmicx} +\usepackage[section]{algorithm} +\usepackage[noend]{algpseudocode} +\renewcommand{\algorithmiccomment}[1]{\hfill\textcolor{gray}{\textit{#1}}} + +% \usepackage[theme=grayscale,charsperline=90]{jlcode} + +\usepackage{xurl} +\usepackage[pdfpagelabels]{hyperref} % Internal hyperlinks +\hypersetup{ + colorlinks, + linkcolor={blue!70!black}, + urlcolor={red!50!black}, + citecolor={green!50!black}, + pdfborder={0 0 0}, % No borders around internal hyperlinks +} +\usepackage[nameinlink]{cleveref} + +\declaretheorem[name=Theorem]{theorem} +\declaretheorem[name=Lemma]{lemma} +\declaretheorem[name=Proposition]{proposition} +\declaretheorem[name=Corollary]{corollary} + +\declaretheorem[name=Definition]{definition} +\declaretheorem[name=Assumption]{assumption} +\declaretheorem[name=Example]{example} +\declaretheorem[name=Exercise]{exercise} + +\declaretheorem[name=Remark]{remark} + +\makeatletter +\def\dedicatory#1{\def\@dedicatory{#1}} +\let\@dedicatory=\@empty +\def\@maketitle{% + \newpage + \vspace*{-\topskip} % remove the initial space + \begingroup\centering % instead of \begin{center} + \let\footnote\thanks + \hrule height \z@ % to avoid the insertion of lineskip glue + {\LARGE \@title \par}% + \vskip 1.5em + {\large + \lineskip .5em + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em + \@date% + \par\endgroup % instead of \end{center} + \ifx\@empty\@dedicatory + \else + \baselineskip26\p@ + \vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}% + \global\dimen@i\prevdepth}\prevdepth\dimen@i + \fi + \vskip 1.5em % <--- modify this to adjust the separation +} +\makeatother + +% +% Bibliography style. +% +\usepackage[numbers,sort&compress]{natbib} +% \bibhang only works for author-year style +% this patch sets the indent after the first line to \bibindent in number style +\setlength{\bibsep}{0pt} +\setlength{\bibindent}{0pt} +\makeatletter +\renewcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}% + \setlength{\leftmargin}{\bibindent}\addtolength{\leftmargin}{\dimexpr\labelwidth+\labelsep\relax}% + \setlength{\itemindent}{-\bibindent}% + \setlength{\listparindent}{\itemindent} +\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}% + \ifNAT@openbib + \addtolength{\leftmargin}{\bibindent}% + \setlength{\itemindent}{-\bibindent}% + \setlength{\listparindent}{\itemindent}% + \setlength{\parsep}{0pt}% + \fi +} +\makeatother + +% patch natbib to hyperlink author names when using the number style +% https://tex.stackexchange.com/questions/76067/how-to-hyperlink-name-part-in-citet-using-natbib-numerical-and-hyperref +\usepackage{etoolbox} +\makeatletter +\patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@hyper@{\NAT@nm}}{}{} +\makeatother +% +% Hyperlink DOIs and URLs in the bibliography. +% +\newcommand*{\doi}[1]{DOI\@: \href{http://dx.doi.org/\detokenize{#1}}{\detokenize{#1}}} +\newcommand*{\doilink}[2]{\href{http://dx.doi.org/\detokenize{#1}}{#2}} +% +% Double-stroke symbols for number sets. +% +\usepackage{dsfont} +\newcommand{\R}{\mathds{R}} +\newcommand{\N}{\mathds{N}} +\newcommand{\Q}{\mathds{Q}} +\newcommand{\Z}{\mathds{Z}} +\newcommand{\C}{\mathds{C}} +\newcommand{\B}{\mathds{B}} + +\newcommand{\minim}{\mathop{\textup{minimize}}} +\newcommand{\minimize}[1]{\minim_{#1}} +\newcommand{\st}{\textup{subject to}} +\newcommand{\argminim}{\mathop{\textup{argmin}}} +\newcommand{\argmin}[1]{\argminim_{#1}} +\newcommand{\argmaxim}{\mathop{\textup{argmax}}} +\newcommand{\argmax}[1]{\argmaxim_{#1}} +\newcommand{\supp}{\mathop{\textup{supp}}} +\newcommand{\proj}{\mathop{\textup{proj}}} +\newcommand{\prox}{\mathop{\textup{prox}}} +\newcommand{\iprox}{\mathop{\textup{iprox}}} +\newcommand{\interior}{\mathop{\textup{int}}} +\newcommand{\trace}{\mathop{\textup{trace}}} +\newcommand{\epi}{\mathop{\textup{epi}}} +\renewcommand{\vec}{\mathop{\textup{vec}}} + +\newcommand{\diag}{\mathop{\text{diag}}} + +% an implementation of \widebar that does not require mathabx +% https://tex.stackexchange.com/questions/16337/can-i-get-a-widebar-without-using-the-mathabx-package +\makeatletter +\let\save@mathaccent\mathaccent +\newcommand*\if@single[3]{% + \setbox0\hbox{${\mathaccent"0362{#1}}^H$}% + \setbox2\hbox{${\mathaccent"0362{\kern0pt#1}}^H$}% + \ifdim\ht0=\ht2 #3\else #2\fi + } +%The bar will be moved to the right by a half of \macc@kerna, which is computed by amsmath: +\newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna} +%If there's a superscript following the bar, then no negative kern may follow the bar; +%an additional {} makes sure that the superscript is high enough in this case: +\newcommand*\widebar[1]{\@ifnextchar^{{\wide@bar{#1}{0}}}{\wide@bar{#1}{1}}} +%Use a separate algorithm for single symbols: +\newcommand*\wide@bar[2]{\if@single{#1}{\wide@bar@{#1}{#2}{1}}{\wide@bar@{#1}{#2}{2}}} +\newcommand*\wide@bar@[3]{% + \begingroup + \def\mathaccent##1##2{% +%Enable nesting of accents: + \let\mathaccent\save@mathaccent +%If there's more than a single symbol, use the first character instead (see below): + \if#32 \let\macc@nucleus\first@char \fi +%Determine the italic correction: + \setbox\z@\hbox{$\macc@style{\macc@nucleus}_{}$}% + \setbox\tw@\hbox{$\macc@style{\macc@nucleus}{}_{}$}% + \dimen@\wd\tw@ + \advance\dimen@-\wd\z@ +%Now \dimen@ is the italic correction of the symbol. + \divide\dimen@ 3 + \@tempdima\wd\tw@ + \advance\@tempdima-\scriptspace +%Now \@tempdima is the width of the symbol. + \divide\@tempdima 10 + \advance\dimen@-\@tempdima +%Now \dimen@ = (italic correction / 3) - (Breite / 10) + \ifdim\dimen@>\z@ \dimen@0pt\fi +%The bar will be shortened in the case \dimen@<0 ! + \rel@kern{0.6}\kern-\dimen@ + \if#31 + \overline{\rel@kern{-0.6}\kern\dimen@\macc@nucleus\rel@kern{0.4}\kern\dimen@}% + \advance\dimen@0.4\dimexpr\macc@kerna +%Place the combined final kern (-\dimen@) if it is >0 or if a superscript follows: + \let\final@kern#2% + \ifdim\dimen@<\z@ \let\final@kern1\fi + \if\final@kern1 \kern-\dimen@\fi + \else + \overline{\rel@kern{-0.6}\kern\dimen@#1}% + \fi + }% + \macc@depth\@ne + \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar + \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}% + \macc@set@skewchar\relax + \let\mathaccentV\macc@nested@a +%The following initialises \macc@kerna and calls \mathaccent: + \if#31 + \macc@nested@a\relax111{#1}% + \else +%If the argument consists of more than one symbol, and if the first token is +%a letter, use that letter for the computations: + \def\gobble@till@marker##1\endmarker{}% + \futurelet\first@char\gobble@till@marker#1\endmarker + \ifcat\noexpand\first@char A\else + \def\first@char{}% + \fi + \macc@nested@a\relax111{\first@char}% + \fi + \endgroup +} +\makeatother + +\newtheorem{problemassumption}{Problem Assumption}[section] +\newtheorem{modelassumption}{Model Assumption}[section] +\newtheorem{stepassumption}{Step Assumption}[section] + +\crefname{problemassumption}{Problem Assumption}{Problem Assumptions} +\Crefname{problemassumption}{Problem Assumption}{Problem Assumptions} +\crefname{modelassumption}{Model Assumption}{Model Assumptions} +\Crefname{modelassumption}{Model Assumption}{Model Assumptions} +\crefname{stepassumption}{Step Assumption}{Step Assumptions} +\Crefname{stepassumption}{Step Assumption}{Step Assumptions} diff --git a/paper/figs/README.md b/paper/figs/README.md new file mode 100644 index 0000000..659751e --- /dev/null +++ b/paper/figs/README.md @@ -0,0 +1,5 @@ +# Figures + +Place your figures here. + +Only PDF or TikZ figures should be used. If possible, use TikZ figures. diff --git a/paper/localSettings.yaml b/paper/localSettings.yaml new file mode 100644 index 0000000..b7e89f7 --- /dev/null +++ b/paper/localSettings.yaml @@ -0,0 +1,95 @@ +indentPreamble: 0 +defaultIndent: " " +removeTrailingWhitespace: 1 + +dos2unixlinebreaks: 1 + +indentRules: + item: " " + +indentAfterItems: + itemize: 1 + itemize*: 1 + enumerate: 1 + enumerate*: 1 + description: 1 + description*: 1 + list: 1 + +verbatimEnvironments: + verbatim: 1 + lstlisting: 1 + minted: 1 + jllisting: 1 + +verbatimCommands: + verb: 1 + lstinline: 1 + +# https://github.com/cmhughes/latexindent.pl/issues/393#issuecomment-1529162115 +# lookForAlignDelims: +# align: +# alignContentAfterDoubleBackSlash: 1 + +modifyLineBreaks: + oneSentencePerLine: + manipulateSentences: 1 + removeSentenceLineBreaks: 0 + sentencesBeginWith: + A-Z: 0 + a-z: 0 + other: "\([A-Z]|[A-Z]|\$|\\\\\(" # account for parenthetical sentences + sentencesEndWith: + basicFullStop: 0 + betterFullStop: 0 + exclamationMark: 0 + questionMark: 0 + other: "\.\)|\?\)|\!\)|\. |\? |\! " # account for parenthetical sentences + commands: + label: + CommandStartsOnOwnLine: 1 + State: + CommandNameFinishesWithLineBreak: 2 + mandatoryArguments: + label: + RCuBFinishesWithLineBreak: 2 + section: + RCuBFinishesWithLineBreak: 2 + subsection: + RCuBFinishesWithLineBreak: 2 + # poly-switches below here + textWrapOptions: + columns: 0 + multipleSpacesToSingle: 1 + comments: + wrap: 0 + environments: + DBSStartsOnOwnLine: 0 + DBSFinishesWithLineBreak: 1 + BeginStartsOnOwnLine: 1 + BodyStartsOnOwnLine: 2 # add % after \begin{env} to preserve page reference + EndStartsOnOwnLine: 1 + EndFinishesWithLineBreak: 1 + optionalArguments: + cases: + LSqBStartsOnOwnLine: 1 + specialBeginEnd: + displayMath: + SpecialBeginStartsOnOwnLine: 1 + SpecialBodyStartsOnOwnLine: 1 + SpecialEndStartsOnOwnLine: 1 + SpecialEndFinishesWithLineBreak: 1 + and: + SpecialEndFinishesWithLineBreak: 1 + +specialBeginEnd: + and: + begin: \\an + end: d # d + lookForThis: 1 + +replacements: + - + when: after + substitution: |- + s/%{2,}/%/sg diff --git a/paper/report.bib b/paper/report.bib new file mode 100644 index 0000000..e69de29 diff --git a/paper/report.tex b/paper/report.tex new file mode 100644 index 0000000..2bc757e --- /dev/null +++ b/paper/report.tex @@ -0,0 +1,83 @@ +\documentclass[10pt]{article} +\usepackage{defs} + +\newcommand{\papertitle}{% + Insert Your Title Here +} + +% For debugging. +%\usepackage{showframe} + +% Meta-information for the PDF file generated.. +\hypersetup{ + pdftitle={\papertitle}, + pdfauthor={Author One and Author Two}, + pdfsubject={Report Subject}, + pdfkeywords={Keyword1, keyword2, keyword3}, +} + +% \usepackage{newunicodechar} +% \newunicodechar{Δ}{\ensuremath{\Delta}} + +\title{\papertitle} +\author{% + Author One\footnote{% + GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montr\'eal. E-mail: \href{mailto:geoffroy.leconte@polymtl.ca}{geoffroy.leconte@polymtl.ca}. + } + \and + Dominique Orban\footnote{% + GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montr\'eal. E-mail: \href{mailto:dominique.orban@gerad.ca}{dominique.orban@gerad.ca}. + } + \thanks{Research supported by an NSERC Discovery grant.} +} + +% \dedicatory{Add a dedication if appropriate.} + +\begin{document} +\maketitle +\thispagestyle{mytitlepage} + +\begin{abstract} +\end{abstract} + +% Résumé en français pour le Cahier du GERAD +% \begin{resume} +% \end{resume} + +\pagestyle{myheadings} + +\section{Introduction}% +\label{sec:introduction} + + +\subsection*{Related research} + + +\subsection*{Notation} + + +\section{Background}% +\label{sec:background} + + +\section{Another Section}% +\label{sec:another-section} + + +\section{Implementation and numerical experiments}% +\label{sec:numerical} + + +\section{Discussion and future work}% +\label{sec:discussion} + + +\small +\subsection*{Acknowledgements} + + +\bibliographystyle{abbrvnat} +\bibliography{abbrv,report} +\normalsize + +\end{document} diff --git a/paper/tables/README.md b/paper/tables/README.md new file mode 100644 index 0000000..9492459 --- /dev/null +++ b/paper/tables/README.md @@ -0,0 +1,3 @@ +# Tables + +Place your tables here. diff --git a/talks/README.md b/talks/README.md new file mode 100644 index 0000000..eef6b8a --- /dev/null +++ b/talks/README.md @@ -0,0 +1,3 @@ +# Talks + +Add a beamer presentation here.