Skip to content
Merged
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
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ supported by the `copernicus.cls`, and fix an issue where the section headers we
- Added `\setlength{\emergencystretch}{3em}` to prevent overfull lines.
- Updated CSL citation helper commands (`\CSLBlock`, `\CSLLeftMargin`, `\CSLRightInline`) to match current Pandoc defaults, improving bibliography spacing and baseline alignment.

- Update `lipics_article()` to the tagged LIPIcs v2021.1.3 author kit and `lipics-v2021.cls` v3.1.3, including current runtime assets, subtitle and structured related-material metadata, compact-author and PDF/A options, and new theorem/proof interfaces. The default engine is now pdfLaTeX after testing both pdfLaTeX and XeLaTeX; XeLaTeX remains selectable. Citation processing remains user-selectable, with guidance for the official BibTeX/`plainurl` workflow. Existing drafts that carry `lipics-v2019.cls` continue to render through a compatibility fallback that normalizes their legacy thin-space metadata and degrades v2021-only metadata to supported v2019 forms; rendering now warns once per R session that these drafts should be updated from the current template, or suggests removing the unused legacy class when both class files are present (#608).

- The `lipics_article()` skeleton now makes theorem restatement support opt-in to avoid an incompatibility between `thmtools` and LaTeX 2026. Existing documents that enable it use a temporary compatibility workaround while the upstream fix remains unreleased (#607).

- Fix `oup_article(oup_version = 1)` rendering with `oup-authoring-template` v1.5 on CTAN by supplying the empty society logo default expected by OUP's sample article (#610).
Expand Down
59 changes: 50 additions & 9 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -300,29 +300,70 @@ jasa_article <- function(..., keep_tex = TRUE, latex_engine = "xelatex",
}

#' @section `lipics_article`: Format for creating submissions to
#' LIPIcs - Leibniz International Proceedings Informatics - articles.
#' Adapted from the official Instructions for Authors at
#' <https://submission.dagstuhl.de/documentation/authors> and the
#' template from the archive `authors-lipics-v2019.zip` downloaded
#' with version tag v2019.2. The template is provided under The LaTeX
#' Project Public License (LPPL), Version 1.3c.
#' LIPIcs - Leibniz International Proceedings in Informatics - articles.
#' Adapted from the official [Instructions for
#' Authors](https://submission.dagstuhl.de/documentation/authors) and the
#' tagged LIPIcs author kit v2021.1.3, which contains `lipics-v2021.cls`
#' v3.1.3. The kit is provided under The LaTeX Project Public License
#' (LPPL), Version 1.3c.
#'
#' Dagstuhl's official bibliography workflow uses BibTeX, raw LaTeX
#' citations such as `\cite{key}`, and the fixed `plainurl` bibliography
#' style. The `citation_package` argument remains user-selectable: `"natbib"`
#' makes Pandoc translate Markdown citations to natbib commands, but this
#' custom template does not load the unsupported natbib package; `"default"`
#' uses Pandoc citeproc and is not the official BibTeX workflow. Structured
#' related-version and supplement `cite` fields emit raw LaTeX citations and
#' therefore require the BibTeX route; omit them when using citeproc. Other
#' rmarkdown citation settings may require user-supplied LaTeX configuration.
#' The template keeps `plainurl` fixed regardless of this argument.
#'
#' pdfLaTeX is the default and XeLaTeX remains selectable. With the tagged
#' class, the `pdfa` class option works with pdfLaTeX but not XeLaTeX. Existing
#' drafts retain their local v2019 class and legacy thin-space metadata is
#' normalized when rendering with pdfLaTeX.
#' @export
#' @rdname article
lipics_article <- function(..., latex_engine = "xelatex", # xelatex used for 'thin space' Unicode
# character, see YAML field 'authorrunning'
lipics_article <- function(..., latex_engine = "pdflatex",
keep_tex = TRUE, citation_package = "natbib",
md_extensions = c(
"-autolink_bare_uris", # disables automatic links
"-auto_identifiers" # disables \hypertarget commands
)) {
# quick dev shortcut for Ubuntu: click "Install and restart" then run:
# unlink("MyArticle/", recursive = TRUE); rmarkdown::draft("MyArticle.Rmd", template = "lipics", package = "rticles", edit = FALSE); rmarkdown::render("MyArticle/MyArticle.Rmd"); system(paste0("xdg-open ", here::here("MyArticle", "MyArticle.pdf")))
pdf_document_format(
format <- pdf_document_format(
"lipics",
latex_engine = latex_engine,
citation_package = citation_package, keep_tex = keep_tex,
md_extensions = md_extensions, ...
)

pre_knit <- format$pre_knit
format$pre_knit <- function(input, metadata, ...) {
if (is.function(pre_knit)) pre_knit(input, metadata, ...)

input_dir <- dirname(input)
legacy_class <- file.path(input_dir, "lipics-v2019.cls")
current_class <- file.path(input_dir, "lipics-v2021.cls")
if (file.exists(legacy_class) && !file.exists(current_class)) {
warn_once(
"rticles.warn_lipics_v2019",
"Detected 'lipics-v2019.cls' next to the input file. ",
"This class remains supported for backward compatibility, but the ",
"article should be updated from the current `rticles::lipics_article()` ",
"template to use 'lipics-v2021.cls' and current YAML metadata."
)
} else if (file.exists(legacy_class) && file.exists(current_class)) {
warn_once(
"rticles.warn_lipics_both_classes",
"Detected both 'lipics-v2019.cls' and 'lipics-v2021.cls' next to the ",
"input file. The LIPIcs template will use 'lipics-v2021.cls'; you may ",
"remove the unused 'lipics-v2019.cls' file."
)
}
}
format
}


Expand Down
13 changes: 13 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ knitr_fun <- function(name) utils::getFromNamespace(name, "knitr")

output_asis <- knitr_fun("output_asis")

warn_once <- function(option, ...) {
xfun::do_once(
warning(
...,
"\nThis warning is shown once per R session.",
immediate. = TRUE,
call. = FALSE
),
option = option,
hint = ""
)
}

merge_list <- function(x, y) {
fun <- knitr_fun("merge_list")
fun(as.list(x), y)
Expand Down
55 changes: 52 additions & 3 deletions inst/rmarkdown/templates/lipics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,59 @@
LIPICS Style - CHANGELOG

* 11/05/2023 lipics-v2021 v3.1.3
* Bugfix
* changed order of loading hyperxmp and hyperref to avoid minor bug when using lastest version of hyperxmp

* 04/05/2021 lipics-v2021 v3.1.2
* New feature
* added optional \subtitle
* revised displaying of swhids (hid contextual information)
* Bugfix
* fixed problem with numberwithinsect in combination with thm-restate,cleveref, autoref (This fixes #15)
* Fixing "supplemenatary" typo #14

* 25/02/2021 lipics-v2021 v3.1.1
* Bugfix
* corrected typo

* 04/01/2021 lipics-v2021 v3.1.0
* New feature
* added documentclass option pdfa to explicitly enable generation of PDF according PDF/A standard
* Bugfix
* fixed problems when using old versions of hyperxmp package (This fixes #11)

* 09/12/2020 LIPIcs-v2021 v3.0.1
* Bugfix
* fixed bug related to unavailable sRGB.icc (This fixes #10)

* 01/12/2020 LIPIcs-v2021 v3.0
* New Feature
* more compact presentation of author information (email address and homepage URL only as logo)
* adjustment of document licence to CC-BY 4.0
* added anonymization (documentclass option "anonymous") also for \relatedversion and \supplement macros; resolves #9
* added \claimqedhere to be used in claimproof environments (similar to qedhere in proof environments); resolves #4
* added new macro \flag to display a flag or logo near the funding information as requested by some funding agencies (e.g. ERC grant)
* added \proofsubparagraph to allow structuring of proofs
* added new macros \relatedversiondetails and \supplementdetails to collect information regarding related version/supplementary material in a more structured way
* added new theorem-like environments 'conjecture' and 'observation'
* added support to produce PDFs according PDF/A-3B standard
* Minor changes
* revised style of procedure environment provided by algorithm2e package
* Bugfix
* fixed bug related to loaded but unused algorithm package (This fixes #2)
* fixed bug related to outdated algorithm2e package (This fixes #3)
* minor issues related to cleveref package (n-dash, oxford comma)

* 29/04/2020 LIPIcs-v2019 v2.2.1
* Minor changes
* export of several page numbers (end top matter, start/end bibliography, start appendix) into aux-file
* renamed heading of \supplement macro to "Supplementary Material"

* 19/07/2019 LIPIcs-v2019 v2.2
* New Feature
* explicitly defined/named colors used in style to ease reusing them (requires load of package xcolor instead of color)
* added document option "authorcolumns" to activate displaying author details in two columns (only allowed for more than 6 authors)
* revised style of algorithm environments provided by algorithm or algorithm2e packages
* revised style of algorithm environments provided by algorithm or algorithm2e packages
* added qed-like symbol to mark end of e.g. definitions (command \lipicsEnd)
* Bugfix
* fixed problem caused by "\\" in title macro
Expand All @@ -22,7 +71,7 @@ LIPICS Style - CHANGELOG

* 10/12/2018 LIPIcs-v2019 v2.0
* New Features
* support of metadata in PDF file (e.g. author, title, keywords)
* support of metadata in PDF file (e.g. author, title, keywords)
* revised displaying of author-related funding acknowledgements (now displayed as part of the funding block instead of footnotes)
* added support for cleveref package (new document option 'cleveref')
* added support for using autoref for theorem-like environments (new document option 'autoref')
Expand Down Expand Up @@ -58,7 +107,7 @@ LIPICS Style - CHANGELOG

* 06/02/2018 LIPIcs-v2018 v1.2
* Release of LIPIcs-v2018
* revised author macro \author{name}{affil}{email}{orcid}{funding}
* revised author macro \author{name}{affil}{email}{orcid}{funding}
* added support for ORCIDs
* switched to ACM 2012 classification system
* added new macros for extended metadata \category, \relatedversion, \supplement, \funding, \acknowledgements
Expand Down
72 changes: 63 additions & 9 deletions inst/rmarkdown/templates/lipics/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,48 @@
}
\makeatother
$endif$
% Existing rticles drafts carry lipics-v2019.cls in their article directory.
\newif\iflipicsvTwentyOne
\IfFileExists{lipics-v2021.cls}{%
\lipicsvTwentyOnetrue
\documentclass[$format$ ,$hyphenation$ $if(authorcolumns)$ ,authorcolumns $endif$ $if(cleveref)$,cleveref$endif$ $if(autoref)$,autoref$endif$ $if(thm-restate)$,thm-restate$endif$ $if(anonymous)$,anonymous$endif$ $if(numberwithinsect)$,numberwithinsect$endif$ $if(pdfa)$,pdfa$endif$ $if(oldauthorstyle)$,oldauthorstyle$endif$ ]{lipics-v2021}
}{%
\lipicsvTwentyOnefalse
\documentclass[$format$ ,$hyphenation$ $if(authorcolumns)$ ,authorcolumns $endif$ $if(cleveref)$,cleveref$endif$ $if(autoref)$,autoref$endif$ $if(thm-restate)$,thm-restate$endif$ $if(anonymous)$,anonymous$endif$ $if(numberwithinsect)$,numberwithinsect$endif$ ]{lipics-v2019}
}

% Older skeletons used an HTML thin-space entity in authorrunning.
\ifdefined\XeTeXrevision\else
\ifdefined\directlua\else
\DeclareUnicodeCharacter{2009}{\,}
\fi
\fi
%This is a template for producing LIPIcs articles.
%See lipics-manual.pdf for further information.
%See lipics-v2021-authors-guidelines.pdf for further information.
%for A4 paper format use option "a4paper", for US-letter use option "letterpaper"
%for british hyphenation rules use option "UKenglish", for american hyphenation rules use option "USenglish"
%for section-numbered lemmas etc., use "numberwithinsect"
%for enabling cleveref support, use "cleveref"
%for enabling autoref support, use "autoref"
%for anonymousing the authors (e.g. for double-blind review), add "anonymous"
%for anonymizing the authors (e.g. for double-blind review), add "anonymous"
%for enabling thm-restate support, use "thm-restate"
%for producing a PDF according to the PDF/A standard, add "pdfa"
%for using the pre-v2021 author presentation, add "oldauthorstyle"

$if(graphicspath)$
\graphicspath{{$graphicspath$}}
$endif$

\bibliographystyle{plainurl}% the mandatory bibstyle

\iflipicsvTwentyOne
\title{$title$}
$if(subtitle)$
\subtitle{$subtitle$}
$endif$
\else
\title{$title$$if(subtitle)$: $subtitle$$endif$}
\fi

\titlerunning{$titlerunning$}

Expand All @@ -52,14 +76,40 @@
$endif$

%optional
\iflipicsvTwentyOne
$if(relatedversion)$
\relatedversion{$relatedversion$}
$endif$
$for(relatedversiondetails)$
\relatedversiondetails[$if(relatedversiondetails.linktext)$linktext={$relatedversiondetails.linktext$}$endif$$if(relatedversiondetails.cite)$$if(relatedversiondetails.linktext)$, $endif$cite={$relatedversiondetails.cite$}$endif$]{$relatedversiondetails.classification$}{$relatedversiondetails.url$}
$endfor$
\else
$if(relatedversiondetails)$
\relatedversion{$if(relatedversion)$$relatedversion$; $endif$$for(relatedversiondetails)$\textit{$relatedversiondetails.classification$}: $if(relatedversiondetails.linktext)$\href{$relatedversiondetails.url$}{$relatedversiondetails.linktext$}$else$\url{$relatedversiondetails.url$}$endif$$if(relatedversiondetails.cite)$ \cite{$relatedversiondetails.cite$}$endif$$sep$; $endfor$}
$else$
$if(relatedversion)$
\relatedversion{$relatedversion$}
$endif$
$endif$
\fi

%optional
\iflipicsvTwentyOne
$if(supplement)$
\supplement{$supplement$}
$endif$
$for(supplementdetails)$
\supplementdetails[$if(supplementdetails.linktext)$linktext={$supplementdetails.linktext$}$endif$$if(supplementdetails.cite)$$if(supplementdetails.linktext)$, $endif$cite={$supplementdetails.cite$}$endif$$if(supplementdetails.subcategory)$$if(supplementdetails.linktext)$, $else$$if(supplementdetails.cite)$, $endif$$endif$subcategory={$supplementdetails.subcategory$}$endif$$if(supplementdetails.swhlinktext)$$if(supplementdetails.linktext)$, $else$$if(supplementdetails.cite)$, $else$$if(supplementdetails.subcategory)$, $endif$$endif$$endif$swhlinktext={$supplementdetails.swhlinktext$}$endif$$if(supplementdetails.swhid)$$if(supplementdetails.linktext)$, $else$$if(supplementdetails.cite)$, $else$$if(supplementdetails.subcategory)$, $else$$if(supplementdetails.swhlinktext)$, $endif$$endif$$endif$$endif$swhid={$supplementdetails.swhid$}$endif$$if(supplementdetails.swhdelimiter)$$if(supplementdetails.linktext)$, $else$$if(supplementdetails.cite)$, $else$$if(supplementdetails.subcategory)$, $else$$if(supplementdetails.swhlinktext)$, $else$$if(supplementdetails.swhid)$, $endif$$endif$$endif$$endif$$endif$swhdelimiter={$supplementdetails.swhdelimiter$}$endif$]{$supplementdetails.classification$}{$supplementdetails.url$}
$endfor$
\else
$if(supplementdetails)$
\supplement{$if(supplement)$$supplement$; $endif$$for(supplementdetails)$\textit{$supplementdetails.classification$$if(supplementdetails.subcategory)$ ($supplementdetails.subcategory$)$endif$}: $if(supplementdetails.linktext)$\href{$supplementdetails.url$}{$supplementdetails.linktext$}$else$\url{$supplementdetails.url$}$endif$$if(supplementdetails.cite)$ \cite{$supplementdetails.cite$}$endif$$if(supplementdetails.swhid)$ $if(supplementdetails.swhdelimiter)$$supplementdetails.swhdelimiter$$endif$archived at \href{https://archive.softwareheritage.org/$supplementdetails.swhid$}{\nolinkurl{$if(supplementdetails.swhlinktext)$$supplementdetails.swhlinktext$$else$$supplementdetails.swhid$$endif$}}$endif$$sep$; $endfor$}
$else$
$if(supplement)$
\supplement{$supplement$}
$endif$
$endif$
\fi

%optional
$if(funding)$
Expand Down Expand Up @@ -174,13 +224,15 @@
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacing}
\setlength{\cslentryspacing}{0em}
\usepackage{enumitem}
\newlist{CSLReferences}{itemize}{1}
\setlist[CSLReferences]{label={},
leftmargin=\cslhangindent,
itemindent=-1\cslhangindent,
parsep=\parskip,
itemsep=\cslentryspacing}
\newenvironment{CSLReferences}
{\begin{list}{}{%
\setlength{\labelwidth}{0pt}
\setlength{\labelsep}{0pt}
\setlength{\leftmargin}{\cslhangindent}
\setlength{\itemindent}{-1\cslhangindent}
\setlength{\parsep}{\parskip}
\setlength{\itemsep}{\cslentryspacing}}}
{\end{list}}
$else$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
Expand Down Expand Up @@ -247,7 +299,9 @@

%% Please use bibtex,

$if(natbib)$$if(bibliography)$
\bibliography{$bibliography$}
$endif$$endif$

$if(appendix)$
\appendix
Expand Down
Binary file modified inst/rmarkdown/templates/lipics/skeleton/cc-by.pdf
Binary file not shown.
Binary file modified inst/rmarkdown/templates/lipics/skeleton/lipics-logo-bw.pdf
Binary file not shown.
Loading