Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arxiv target #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ TARGET_FOLDER = publishing-artifacts
ARTICLE_INFO_FILE = $(OPENJOURNALS_PATH)/default-article-info.yaml

.PHONY: all
all: cff pdf html jats crossref native preprint
all: cff pdf html jats crossref native preprint arxiv

.PHONY: cff pdf html jats crossref native preprint
.PHONY: cff pdf html jats crossref native preprint arxiv
cff: $(TARGET_FOLDER)/paper.cff
pdf: $(TARGET_FOLDER)/paper.pdf
html: $(TARGET_FOLDER)/paper.html
jats: $(TARGET_FOLDER)/paper.jats
native: $(TARGET_FOLDER)/paper.native
crossref: $(TARGET_FOLDER)/paper.crossref
preprint: $(TARGET_FOLDER)/paper.preprint
arxiv: $(TARGET_FOLDER)/paper.arxiv.tex

$(TARGET_FOLDER)/paper.%: $(ARTICLE) \
$(INARA_DATA_PATH)/defaults/%.yaml \
Expand Down Expand Up @@ -68,3 +69,4 @@ clean:
rm -rf $(TARGET_FOLDER)/paper.native
rm -rf $(TARGET_FOLDER)/paper.pdf
rm -rf $(TARGET_FOLDER)/paper.preprint
rm -rd $(TARGET_FOLDER)/paper.arxiv.tex
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ the mounted folder, is expected as the only argument.

- The Docker image will generate PDF and JATS files by default. To
select specific output formats to be generated use the `-o` flag.
Supported options are: `pdf`, `jats`, `html`, `crossref`, `cff`, and `preprint`. To get multiple outputs
Supported options are: `pdf`, `jats`, `html`, `crossref`, `cff`, `preprint`, and `arxiv`. To get multiple outputs
use a comma separated list.
- By default PDF files will be compiled in _draft mode_ to include a draft
watermark and linenumbers. To create a _production_ PDF add the `-p` flag.
Expand Down Expand Up @@ -45,7 +45,7 @@ variable. So if the paper Markdown source is in file

All supported publishing formats are generated by default, but you
can select a specific format to be generated by passing it as an
argument. Available options: `html`, `pdf`, `jats`, `crossref`, `cff`, and `preprint`.
argument. Available options: `html`, `pdf`, `jats`, `crossref`, `cff`, `preprint`, and `arxiv`.

E.g., to generate only a PDF file, the command would be

Expand Down
14 changes: 14 additions & 0 deletions data/defaults/arxiv.tex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
to: latex
output-file: paper.arxiv.tex
filters:
- type: lua
path: add-images.lua
- type: lua
path: draft.lua
variables:
arxiv: true
# styling options
colorlinks: true
linkcolor: '[rgb]{0.0, 0.5, 1.0}'
urlcolor: '[rgb]{0.0, 0.5, 1.0}'

37 changes: 35 additions & 2 deletions data/templates/default.latex
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ $endif$
>>
]
}

$if(arxiv)$
$-- \pdfvariable omitcidset=* requires lualatex but arxiv.org only does pdflatex.
$else$
\pdfvariable omitcidset=1
$endif$
\usepackage{caption}
\usepackage{orcidlink}
\usepackage{tcolorbox}
Expand Down Expand Up @@ -134,7 +139,11 @@ $endif$
\fancyhf{}
%\renewcommand{\headrulewidth}{0.50pt}
\renewcommand{\headrulewidth}{0pt}
$if(arxiv)$
$-- arxiv submissions don't get journal's logo
$else$
\fancyhead[L]{\hspace{-0.75cm}\includegraphics[width=5.5cm]{$logo_path$}}
$endif$
\fancyhead[C]{}
\fancyhead[R]{}
\renewcommand{\footrulewidth}{0.25pt}
Expand Down Expand Up @@ -243,11 +252,18 @@ $endif$
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}

$if(arxiv)$
$else$
%% Font settings
\usepackage{fontsetup} % Lazy way to get proper Greek lowercase glyphs
$endif$

$if(arxiv)$
$-- \setmonofont requires lualatex but arxiv.org only does pdflatex.
$else$
% Use Hack https://sourcefoundry.org/hack/
\setmonofont{Hack}
$endif$

$if(colorlinks)$
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
Expand Down Expand Up @@ -426,11 +442,23 @@ $endif$
%\hrule
\sffamily\small

$if(arxiv)$
{\bfseries Preprint:} Prepared for submission to $journal.title$
$else$
{\bfseries DOI:} \href{https://doi.org/$article.doi$}{\color{linky}{$article.doi$}}
$endif$

\vspace{2mm}
$if(retraction)$
$-- Retraction notices don't show Software info
$elseif(arxiv)$
{\bfseries Software}
\begin{itemize}
\setlength\itemsep{0em}
\item \href{$software_repository_url$}{\color{linky}{Repository}} \ExternalLink
\end{itemize}

\vspace{2mm}
$else$
{\bfseries Software}
\begin{itemize}
Expand All @@ -443,7 +471,9 @@ $endif$
\vspace{2mm}
$endif$

$if(joss)$
$if(arxiv)$
$-- arxiv submissions don't get Editor, Reviewer, etc
$elseif(joss)$
$if(retraction)$
$-- Retraction notices don't show Editor/Reviewers info
$else$
Expand All @@ -469,10 +499,13 @@ $endif$

$if(retraction)$
$-- Retraction notices don't have submission date
{\bfseries Published:} $published$
$elseif(arxiv)$
$-- arxiv submissions won't necessarily have journal submission date
$else$
{\bfseries Submitted:} $submitted$\\
$endif$
{\bfseries Published:} $published$
$endif$

\vspace{2mm}
{\bfseries License}\\
Expand Down