diff --git a/NEWS.md b/NEWS.md index 47e9884a..cffe93d6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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). diff --git a/R/article.R b/R/article.R index 644f7997..97dde718 100644 --- a/R/article.R +++ b/R/article.R @@ -300,16 +300,31 @@ 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 -#' 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 @@ -317,12 +332,38 @@ lipics_article <- function(..., latex_engine = "xelatex", # xelatex used for 'th )) { # 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 } diff --git a/R/utils.R b/R/utils.R index 5db5f63b..60c857fd 100644 --- a/R/utils.R +++ b/R/utils.R @@ -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) diff --git a/inst/rmarkdown/templates/lipics/CHANGELOG.md b/inst/rmarkdown/templates/lipics/CHANGELOG.md index 2b67c7f1..3a499154 100644 --- a/inst/rmarkdown/templates/lipics/CHANGELOG.md +++ b/inst/rmarkdown/templates/lipics/CHANGELOG.md @@ -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 @@ -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') @@ -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 diff --git a/inst/rmarkdown/templates/lipics/resources/template.tex b/inst/rmarkdown/templates/lipics/resources/template.tex index 6c3b3e5d..cee929de 100644 --- a/inst/rmarkdown/templates/lipics/resources/template.tex +++ b/inst/rmarkdown/templates/lipics/resources/template.tex @@ -11,16 +11,33 @@ } \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$}} @@ -28,7 +45,14 @@ \bibliographystyle{plainurl}% the mandatory bibstyle +\iflipicsvTwentyOne \title{$title$} +$if(subtitle)$ +\subtitle{$subtitle$} +$endif$ +\else +\title{$title$$if(subtitle)$: $subtitle$$endif$} +\fi \titlerunning{$titlerunning$} @@ -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)$ @@ -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} @@ -247,7 +299,9 @@ %% Please use bibtex, +$if(natbib)$$if(bibliography)$ \bibliography{$bibliography$} +$endif$$endif$ $if(appendix)$ \appendix diff --git a/inst/rmarkdown/templates/lipics/skeleton/cc-by.pdf b/inst/rmarkdown/templates/lipics/skeleton/cc-by.pdf index 1edf9f0b..3b7aba19 100644 Binary files a/inst/rmarkdown/templates/lipics/skeleton/cc-by.pdf and b/inst/rmarkdown/templates/lipics/skeleton/cc-by.pdf differ diff --git a/inst/rmarkdown/templates/lipics/skeleton/lipics-logo-bw.pdf b/inst/rmarkdown/templates/lipics/skeleton/lipics-logo-bw.pdf index 95d0644f..26b83d62 100644 Binary files a/inst/rmarkdown/templates/lipics/skeleton/lipics-logo-bw.pdf and b/inst/rmarkdown/templates/lipics/skeleton/lipics-logo-bw.pdf differ diff --git a/inst/rmarkdown/templates/lipics/skeleton/lipics-v2021.cls b/inst/rmarkdown/templates/lipics/skeleton/lipics-v2021.cls new file mode 100644 index 00000000..91070397 --- /dev/null +++ b/inst/rmarkdown/templates/lipics/skeleton/lipics-v2021.cls @@ -0,0 +1,1260 @@ +%% +%% This is file `lipics-v2021.cls'. +%% +%% ----------------------------------------------------------------- +%% Author: Dagstuhl Publishing & le-tex publishing services +%% +%% This file is part of the lipics package for preparing +%% LIPICS articles. +%% +%% Copyright (C) 2021 Schloss Dagstuhl +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is +%% Schloss Dagstuhl (publishing@dagstuhl.de). +%% ----------------------------------------------------------------- +%% +\ProvidesClass{lipics-v2021} + [2023/05/12 v3.1.3 LIPIcs articles] +\NeedsTeXFormat{LaTeX2e}[2015/01/01] +\emergencystretch1em +\advance\hoffset-1in +\advance\voffset-1in +\advance\hoffset2.95mm +\newif\if@nobotseplist \@nobotseplistfalse +\def\@endparenv{% + \addpenalty\@endparpenalty\if@nobotseplist\else\addvspace\@topsepadd\fi\@endpetrue} +\def\@doendpe{% + \@endpetrue + \def\par{\@restorepar + \everypar{}% + \par + \if@nobotseplist + \addvspace\topsep + \addvspace\partopsep + \global\@nobotseplistfalse + \fi + \@endpefalse}% + \everypar{{\setbox\z@\lastbox}% + \everypar{}% + \if@nobotseplist\global\@nobotseplistfalse\fi + \@endpefalse}} +\def\enumerate{% + \ifnum \@enumdepth >\thr@@\@toodeep\else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \expandafter + \list + \csname label\@enumctr\endcsname + {\advance\partopsep\topsep + \topsep\z@\@plus\p@ + \ifnum\@listdepth=\@ne + \labelsep0.72em + \else + \ifnum\@listdepth=\tw@ + \labelsep0.3em + \else + \labelsep0.5em + \fi + \fi + \usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}% + \fi} +\def\endenumerate{\ifnum\@listdepth=\@ne\global\@nobotseplisttrue\fi\endlist} +\def\itemize{% + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter + \list + \csname\@itemitem\endcsname + {\advance\partopsep\topsep + \topsep\z@\@plus\p@ + \ifnum\@listdepth=\@ne + \labelsep0.83em + \else + \ifnum\@listdepth=\tw@ + \labelsep0.75em + \else + \labelsep0.5em + \fi + \fi + \def\makelabel##1{\hss\llap{##1}}}% + \fi} +\def\enditemize{\ifnum\@listdepth=\@ne\global\@nobotseplisttrue\fi\endlist} +\def\@title{\textcolor{red}{Author: Please provide a title}} +\let\@subtitle\@empty +\def\subtitle#1{\gdef\@subtitle{#1}} +\def\subtitleseperator{: } +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax + \ifnum #2=1 + \colorbox{lipicsYellow}{\kern0.15em\@svsec\kern0.15em}\quad + \else + \@svsec\quad + \fi}% + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +\def\@seccntformat#1{\csname the#1\endcsname} +\def\@biblabel#1{\textcolor{lipicsGray}{\sffamily\bfseries#1}} +\def\EventLogoHeight{25} +\def\copyrightline{% + \ifx\@hideLIPIcs\@undefined + \ifx\@EventLogo\@empty + \else + \setbox\@tempboxa\hbox{\includegraphics[height=\EventLogoHeight\p@]{\@EventLogo}}% + \rlap{\hspace\textwidth\hspace{-\wd\@tempboxa}\hspace{\z@}% + \vtop to\z@{\vskip-0mm\unhbox\@tempboxa\vss}}% + \fi + \scriptsize + \vtop{\hsize\textwidth + \nobreakspace\par + \@Copyright + \ifx\@EventLongTitle\@empty\else\@EventLongTitle.\\\fi + \ifx\@EventEditors\@empty\else + \@Eds: \@EventEditors + ; Article~No.\,\@ArticleNo; pp.\,\@ArticleNo:\thepage--\@ArticleNo:\number\numexpr\getpagerefnumber{TotPages}% + \\ + \fi + \setbox\@tempboxa\hbox{\IfFileExists{lipics-logo-bw.pdf}{\includegraphics[height=14\p@,trim=0 15 0 0]{lipics-logo-bw}}{\includegraphics[height=14\p@, width=62pt]{example-image-plain}}}% + \hspace*{\wd\@tempboxa}\enskip + \href{https://www.dagstuhl.de/lipics/}% + {Leibniz International Proceedings in Informatics}\\ + \smash{\unhbox\@tempboxa}\enskip + \href{https://www.dagstuhl.de}% + {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik, Dagstuhl Publishing, Germany}}% + \fi} +\def\ps@plain{\let\@mkboth\@gobbletwo + \let\@oddhead\@empty + \let\@evenhead\@empty + \let\@evenfoot\copyrightline + \let\@oddfoot\copyrightline} +\def\lipics@opterrshort{Option "\CurrentOption" not supported} +\def\lipics@opterrlong{The option "\CurrentOption" from article.cls is not supported by lipics.cls.} +\DeclareOption{a5paper}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{b5paper}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{legalpaper}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{executivepaper}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{landscape}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{10pt}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{11pt}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{12pt}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{oneside}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{twoside}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{titlepage}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{notitlepage}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{onecolumn}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{twocolumn}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{fleqn}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{openbib}{\@latexerr{\lipics@opterrshort}{\lipics@opterrlong}} +\DeclareOption{a4paper}{\PassOptionsToClass{\CurrentOption}{article} + \advance\hoffset-2.95mm + \advance\voffset8.8mm} +\DeclareOption{numberwithinsect}{\let\numberwithinsect\relax} +\DeclareOption{cleveref}{\let\usecleveref\relax} +\DeclareOption{autoref}{\let\useautoref\relax} +\DeclareOption{anonymous}{\let\authoranonymous\relax} +\DeclareOption{thm-restate}{\let\usethmrestate\relax} +\DeclareOption{authorcolumns}{\let\authorcolumns\relax} +\let\compactauthor\relax +\DeclareOption{oldauthorstyle}{\let\compactauthor\@empty} +\DeclareOption{compactauthor}{\let\compactauthor\relax} +\DeclareOption{pdfa}{\let\pdfa\relax} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions +\LoadClass[twoside,notitlepage,fleqn]{article} +\renewcommand\normalsize{% + \@setfontsize\normalsize\@xpt{13}% + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\normalsize +\renewcommand\small{% + \@setfontsize\small\@ixpt{11.5}% + \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus2\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 4\p@ \@plus2\p@ \@minus2\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} +\renewcommand\footnotesize{% + \@setfontsize\footnotesize{8.5}{9.5}% + \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus\p@ + \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 3\p@ \@plus\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} +\renewcommand\large{\@setfontsize\large{10.5}{13}} +\renewcommand\Large{\@setfontsize\Large{12}{14}} +\setlength\parindent{1.5em} +\setlength\headheight{3mm} +\setlength\headsep {10mm} +\setlength\footskip{3mm} +\setlength\textwidth{140mm} +\setlength\textheight{222mm} +\setlength\oddsidemargin{32mm} +\setlength\evensidemargin{38mm} +\setlength\marginparwidth{25mm} +\setlength\topmargin{13mm} +\setlength{\skip\footins}{2\baselineskip \@plus 4\p@ \@minus 2\p@} +\def\@listi{\leftmargin\leftmargini + \parsep\z@ \@plus\p@ + \topsep 8\p@ \@plus2\p@ \@minus4\p@ + \itemsep \parsep} +\let\@listI\@listi +\@listi +\def\@listii {\leftmargin\leftmarginii + \labelwidth\leftmarginii + \advance\labelwidth-\labelsep + \topsep 4\p@ \@plus2\p@ \@minus\p@ + \parsep\z@ \@plus\p@ + \itemsep \parsep} +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii + \advance\labelwidth-\labelsep + \topsep 2\p@ \@plus\p@\@minus\p@ + \parsep \z@ + \partopsep \p@ \@plus\z@ \@minus\p@ + \itemsep \z@ \@plus\p@} +\def\ps@headings{% + \def\@evenhead{\large\sffamily\bfseries + \llap{\hbox to0.5\oddsidemargin{ \ifx\@hideLIPIcs\@undefined\ifx\@ArticleNo\@empty\textcolor{red}{XX}\else\@ArticleNo\fi:\fi\thepage\hss}}\leftmark\hfil}% + \def\@oddhead{\large\sffamily\bfseries\rightmark\hfil + \rlap{\hbox to0.5\oddsidemargin{\hss \ifx\@hideLIPIcs\@undefined\ifx\@ArticleNo\@empty\textcolor{red}{XX}\else\@ArticleNo\fi:\fi\thepage}}}% + \def\@oddfoot{\hfil + \rlap{% + \vtop{% + \vskip10mm + \colorbox{lipicsYellow} + {\@tempdima\evensidemargin + \advance\@tempdima1in + \advance\@tempdima\hoffset + \hb@xt@\@tempdima{% + \ifx\@hideLIPIcs\@undefined + \textcolor{lipicsGray}{\normalsize\sffamily + \bfseries\quad + \expandafter\textsolittle + \expandafter{\@EventShortTitle}}% + \fi + \strut\hss}}}}} + \let\@evenfoot\@empty + \let\@mkboth\markboth + \let\sectionmark\@gobble + \let\subsectionmark\@gobble} +\pagestyle{headings} +\renewcommand\maketitle{\par + \begingroup + \thispagestyle{plain} + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@subtitle\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\newwrite\tocfile +\def\@maketitle{% + \newpage + \null\vskip-\baselineskip + \vskip-\headsep + \@titlerunning + \@authorrunning + %%\let \footnote \thanks + \parindent\z@ \raggedright + \if!\@title!\def\@title{\textcolor{red}{Author: Please fill in a title}}\fi + {\LARGE\sffamily\bfseries\mathversion{bold}\@title \if!\@subtitle!\else{\\\Large\sffamily\bfseries\mathversion{bold}\@subtitle}\fi \par}% + \vskip 1em + \ifx\@author\orig@author + \textcolor{red}{Author: Please provide author information}% + \else + {\def\thefootnote{\@arabic\c@footnote}% + \setcounter{footnote}{0}% + \fontsize{9.5}{12}\selectfont\@author}% + \fi + \bgroup + \immediate\openout\tocfile=\jobname.vtc + \protected@write\tocfile{ + \let\footnote\@gobble + \let\thanks\@gobble + \def\footnotemark{} + \def\and{and }% + \def\,{ } + \def\\{ } + }{% + \string\contitem + \string\title{\@title \if!\@subtitle!\else\subtitleseperator \@subtitle\fi}% + \string\author{\@authorsfortoc}% + \string\page{\@ArticleNo:\thepage--\@ArticleNo:\number\numexpr\getpagerefnumber{TotPages}}}% + \closeout\tocfile + \egroup + \par} +\renewcommand\tableofcontents{% + \section*{\contentsname}% + \@starttoc{toc}} +\setcounter{secnumdepth}{4} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\sffamily\Large\bfseries\raggedright}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\sffamily\Large\bfseries\raggedright}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\sffamily\Large\bfseries\raggedright}} +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {-3.25ex \@plus-1ex \@minus-.2ex}% + {1.5ex \@plus .2ex}% + {\sffamily\large\bfseries\raggedright}} +\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\sffamily\normalsize\bfseries}} +\newcommand{\proofsubparagraph}{\@startsection{subparagraph}{5}{\z@}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\color{lipicsGray}\sffamily\normalsize\bfseries}} +\setlength\leftmargini \parindent +\setlength\leftmarginii {1.2em} +\setlength\leftmarginiii{1.2em} +\setlength\leftmarginiv {1.2em} +\setlength\leftmarginv {1.2em} +\setlength\leftmarginvi {1.2em} +\renewcommand\labelenumi{% + \textcolor{lipicsGray}{\sffamily\bfseries\upshape\mathversion{bold}\theenumi.}} +\renewcommand\labelenumii{% + \textcolor{lipicsGray}{\sffamily\bfseries\upshape\mathversion{bold}\theenumii.}} +\renewcommand\labelenumiii{% + \textcolor{lipicsGray}{\sffamily\bfseries\upshape\mathversion{bold}\theenumiii.}} +\renewcommand\labelenumiv{% + \textcolor{lipicsGray}{\sffamily\bfseries\upshape\mathversion{bold}\theenumiv.}} +\renewcommand\labelitemi{% + \textcolor{lipicsBulletGray}{\ifnum\@listdepth=\@ne + \rule{0.67em}{0.33em}% + \else + \rule{0.45em}{0.225em}% + \fi}} +\renewcommand\labelitemii{% + \textcolor{lipicsBulletGray}{\rule{0.45em}{0.225em}}} +\renewcommand\labelitemiii{% + \textcolor{lipicsBulletGray}{\sffamily\bfseries\textasteriskcentered}} +\renewcommand\labelitemiv{% + \textcolor{lipicsBulletGray}{\sffamily\bfseries\textperiodcentered}} +\renewenvironment{description} + {\list{}{\advance\partopsep\topsep\topsep\z@\@plus\p@ + \labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\descriptionlabel}} + {\ifnum\@listdepth=\@ne\global\@nobotseplisttrue\fi\endlist} +\renewcommand*\descriptionlabel[1]{% + \hspace\labelsep\textcolor{lipicsGray}{\sffamily\bfseries\mathversion{bold}#1}} +\def\topmattervskip{0.7} +\renewenvironment{abstract}{% + \vskip\topmattervskip\bigskipamount + \noindent + \rlap{\color{lipicsLineGray}\vrule\@width\textwidth\@height1\p@}% + \hspace*{7mm}\fboxsep1.5mm\colorbox[rgb]{1,1,1}{\raisebox{-0.4ex}{% + \large\selectfont\sffamily\bfseries\abstractname}}% + \vskip3\p@ + \fontsize{9}{12}\selectfont + \noindent\ignorespaces} + {\vskip\topmattervskip\baselineskip\noindent + \subjclassHeading + \ifx\@ccsdescString\@empty + \textcolor{red}{Author: Please fill in 1 or more \string\ccsdesc\space macro}% + \else + \@ccsdescString + \fi + \vskip\topmattervskip\baselineskip + \noindent\keywordsHeading + \ifx\@keywords\@empty + \textcolor{red}{Author: Please fill in \string\keywords\space macro}% + \else + \@keywords + \fi + \ifx\@hideLIPIcs\@undefined + \ifx\@DOIPrefix\@empty\else + \vskip\topmattervskip\baselineskip\noindent + \doiHeading\href{https://doi.org/\@lipicsdoi}{\@lipicsdoi}% + \fi + \fi + \ifx\@category\@empty\else + \vskip\topmattervskip\baselineskip\noindent + \categoryHeading\@category + \fi + \ifx\@relatedversion\@empty\else + \vskip\topmattervskip\baselineskip\noindent + \relatedversionHeading\ifx\authoranonymous\relax\textcolor{red}{Anonymous related version(s)}\else\@relatedversion\fi + \fi + \ifx\@supplement\@empty\else + \vskip\topmattervskip\baselineskip\noindent + \supplementHeading\ifx\authoranonymous\relax\textcolor{red}{Anonymous supplementary material}\else\@supplement\fi + \fi + \ifx\@funding\@empty\else + \vskip\topmattervskip\baselineskip\noindent + \fundingHeading\ifx\authoranonymous\relax\textcolor{red}{Anonymous funding}\else\@funding\fi + \fi + \ifx\@acknowledgements\@empty\else + \vskip\topmattervskip\baselineskip\noindent + \acknowledgementsHeading\ifx\authoranonymous\relax\textcolor{red}{Anonymous acknowledgements} \else\@acknowledgements\fi + \fi + \protected@write\@auxout{}{\string\gdef\string\@pageNumberEndAbstract{\thepage}}% + }% end abstract +\renewenvironment{thebibliography}[1] + {\if@noskipsec \leavevmode \fi + \par + \@tempskipa-3.5ex \@plus -1ex \@minus -.2ex\relax + \@afterindenttrue + \@tempskipa -\@tempskipa \@afterindentfalse + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \noindent + \rlap{\color{lipicsLineGray}\vrule\@width\textwidth\@height1\p@}% + \hspace*{7mm}\fboxsep1.5mm\colorbox[rgb]{1,1,1}{\raisebox{-0.4ex}{% + \normalsize\sffamily\bfseries\refname}}% + \@xsect{1ex \@plus.2ex}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\leftmargin8.5mm + \labelsep\leftmargin + \settowidth\labelwidth{\@biblabel{#1}}% + \advance\labelsep-\labelwidth + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \fontsize{9}{12}\selectfont + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m\protected@write\@auxout{}{\string\gdef\string\@pageNumberStartBibliography{\thepage}}} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \protected@write\@auxout{}{\string\gdef\string\@pageNumberEndBibliography{\thepage}}% + \endlist} +\g@addto@macro\appendix{\immediate\write\@auxout{\string\gdef\string\@pageNumberStartAppendix{\thepage}}}% +\renewcommand\footnoterule{% + \kern-8\p@ + {\color{lipicsBulletGray}\hrule\@width40mm\@height1\p@}% + \kern6.6\p@} +\renewcommand\@makefntext[1]{% + \parindent\z@\hangindent1em + \leavevmode + \hb@xt@1em{\@makefnmark\hss}#1} +\usepackage{microtype} +\usepackage[utf8]{inputenc} +\ifx\pdfa\relax% + \IfFileExists{glyphtounicode.tex}{ + \input glyphtounicode + \pdfgentounicode=1 + }{}% +\fi +\IfFileExists{lmodern.sty}{\RequirePackage{lmodern}}{} +\IfFileExists{fontawesome5.sty}{% +\RequirePackage{fontawesome5}% +\IfFileExists{orcid.pdf}{% +\def\orcidsymbol{\includegraphics[height=9\p@]{orcid}} +}{ +\def\orcidsymbol{\textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries \faOrcid}}% +} +\def\mailsymbol{\textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries \faIcon[regular]{envelope}}}% +\def\homesymbol{\textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries \faHome}}% +}{% +\ClassWarning{Package fontawesome5 not installed}{Please install package fontawesome5} +\def\orcidsymbol{\textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries ORCID}} +\def\mailsymbol{\textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries @}}% +\def\homesymbol{\textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries H}}% +}% +\RequirePackage[T1]{fontenc} +\RequirePackage{textcomp} +\RequirePackage[mathscr]{eucal} +\RequirePackage{amssymb} +\PassOptionsToPackage{retainmissing}{MnSymbol} +\AtBeginDocument{\@ifpackageloaded{MnSymbol}% + {\expandafter\let\csname ver@amssymb.sty\endcsname\relax + \let\complement\@undefined + \RequirePackage{amssymb}}{}} +\RequirePackage{soul} +\sodef\textsolittle{}{.12em}{.5em\@plus.08em\@minus.06em}% + {.4em\@plus.275em\@minus.183em} +\RequirePackage{color} %kept for backward compatibility +\AtBeginDocument{ + \@ifpackageloaded{xcolor}{ + }{ + \RequirePackage{xcolor} + } + \definecolor{darkgray}{rgb}{0.31,0.31,0.33} + \definecolor[named]{lipicsGray}{rgb}{0.31,0.31,0.33} + \definecolor[named]{lipicsBulletGray}{rgb}{0.60,0.60,0.61} + \definecolor[named]{lipicsLineGray}{rgb}{0.51,0.50,0.52} + \definecolor[named]{lipicsLightGray}{rgb}{0.85,0.85,0.86} + \definecolor[named]{lipicsYellow}{rgb}{0.99,0.78,0.07} +} +\RequirePackage{babel} +\RequirePackage[tbtags,fleqn]{amsmath} +\AtBeginDocument{ + \@ifpackageloaded{enumitem}{\ClassWarning{Package 'enumitem' incompatible}{Don't use package 'enumitem'; Package enumerate preloaded!}}{} + \@ifpackageloaded{paralist}{\ClassWarning{Package 'paralist' incompatible}{Don't use package 'paralist'; Package enumerate preloaded!}}{} +} +\RequirePackage{enumerate} +\def\@enum@{\list{\textcolor{lipicsGray}{\sffamily\bfseries\upshape\mathversion{bold}\csname label\@enumctr\endcsname}}% + {\advance\partopsep\topsep + \topsep\z@\@plus\p@ + \usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}}} +\def\romanenumerate{\enumerate[(i)]} +\let\endromanenumerate\endenumerate +\def\alphaenumerate{\enumerate[(a)]} +\let\endalphaenumerate\endenumerate +\def\bracketenumerate{\enumerate[(1)]} +\let\endbracketenumerate\endenumerate +\RequirePackage{graphicx} +\RequirePackage{array} +\let\@classzold\@classz +\def\@classz{% + \expandafter\ifx\d@llarbegin\begingroup + \toks \count@ = + \expandafter{\expandafter\small\the\toks\count@}% + \fi + \@classzold} +\RequirePackage{multirow} +\RequirePackage{tabularx} +\RequirePackage[online]{threeparttable} +\def\TPTtagStyle#1{#1)} +\def\tablenotes{\small\TPT@defaults + \@ifnextchar[\TPT@setuptnotes\TPTdoTablenotes} % ] +\RequirePackage{listings} +\lstset{basicstyle=\small\ttfamily,% + backgroundcolor=\color{lipicsLightGray},% + frame=single,framerule=0pt,xleftmargin=\fboxsep,xrightmargin=\fboxsep} +\RequirePackage[left,mathlines]{lineno} +\linenumbers +\renewcommand\linenumberfont{\normalfont\tiny\sffamily} +%%%% patch to cope with amsmath +%%%% http://phaseportrait.blogspot.de/2007/08/lineno-and-amsmath-compatibility.html +\newcommand*\patchAmsMathEnvironmentForLineno[1]{% + \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname + \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname + \renewenvironment{#1}% + {\linenomath\csname old#1\endcsname}% + {\csname oldend#1\endcsname\endlinenomath}}% +\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{% + \patchAmsMathEnvironmentForLineno{#1}% + \patchAmsMathEnvironmentForLineno{#1*}}% +\AtBeginDocument{% + \patchBothAmsMathEnvironmentsForLineno{equation}% + \patchBothAmsMathEnvironmentsForLineno{align}% + \patchBothAmsMathEnvironmentsForLineno{flalign}% + \patchBothAmsMathEnvironmentsForLineno{alignat}% + \patchBothAmsMathEnvironmentsForLineno{gather}% + \patchBothAmsMathEnvironmentsForLineno{multline}} +\ifx\pdfa\relax% + \RequirePackage[pdfa,unicode]{hyperref}% +\else% + \RequirePackage[unicode]{hyperref}% +\fi% +\let\usehyperxmp\@empty% +\ifx\pdfa\relax% + \IfFileExists{hyperxmp.sty}{% + \RequirePackage{hyperxmp}% + \@ifpackagelater{hyperxmp}{2019/04/05}{% + \let\usehyperxmp\relax% + }{% + \ClassWarning{Package hyperxmp outdated}{You are using an outdated version of the package hyperxmp. Please update!}% + }}{}% +\fi% +\IfFileExists{totpages.sty}{ + \RequirePackage{totpages} +}{ + \ClassWarning{Package totpages not installed}{Please install package totpages} + \newcounter{TotPages} + \setcounter{TotPages}{99} +} +\let\C\relax% +\let\G\relax% +\let\F\relax% +\let\U\relax% +\pdfstringdefDisableCommands{% + \let\thanks\@gobble% + \let\footnote\@gobble% + \def\footnotemark{}% + \def\cs#1{\textbackslash #1}% + \let\normalfont\@empty% + \let\scshape\@empty% + \def\and{and }% + \def\,{ }% + \def\textrightarrow{ -> }% + \let\mathsf\@empty% +}% +\hypersetup{ + breaklinks=true, + pdfencoding=unicode, + bookmarksnumbered, + pdfborder={0 0 0}, + pdfauthor={ } +}% +\AtBeginDocument{ +\ifx\usehyperxmp\relax +\hypersetup{ +pdftitle={\@title \if!\@subtitle!\else\subtitleseperator \@subtitle\fi}, +pdfauthor={\ifx\authoranonymous\relax Anonymous author(s) \else \@authorsforpdf \fi}, +pdfkeywords={\@keywords}, +pdfproducer={LaTeX with lipics-v2021.cls}, +pdfsubject={LIPIcs, Vol.\@SeriesVolume, \@EventShortTitle}, +pdfcopyright = { Copyright (C) \ifx\authoranonymous\relax Anonymous author(s) \else \@copyrightholder; \fi licensed under Creative Commons License CC-BY 4.0}, +pdflang={en}, +pdfmetalang={en}, +pdfpublisher={Schloss Dagstuhl -- Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany}, +pdflicenseurl={https://creativecommons.org/licenses/by/4.0/}, +pdfpubtype={LIPIcs}, +pdfvolumenum={\@SeriesVolume}, +pdfpagerange={\@ArticleNo:\thepage-\@ArticleNo:\theTotPages}, +pdfdoi={\@lipicsdoi}, +pdfapart=3, +pdfaconformance=B +} +\else% +\hypersetup{ +pdftitle={\@title \if!\@subtitle!\else\subtitleseperator \@subtitle\fi}, +pdfauthor={\ifx\authoranonymous\relax Anonymous author(s) \else \@authorsforpdf \fi}, +pdfkeywords={\@keywords}, +pdfcreator={LaTeX with lipics-v2021.cls}, +pdfsubject={LIPIcs, Vol.\@SeriesVolume, \@EventShortTitle; Copyright (C) \ifx\authoranonymous\relax Anonymous author(s) \else \@copyrightholder; \fi licensed under Creative Commons License CC-BY 4.0} +}% +\fi % +} +\ifx\usehyperxmp\relax +\pdfobjcompresslevel=0 +\pdfinclusioncopyfonts=1 +\IfFileExists{colorprofiles.tex}{ +\RequirePackage{colorprofiles}% +\IfFileExists{sRGB.icc}{ +\immediate\pdfobj stream attr{/N 3} file{sRGB.icc} +\pdfcatalog{% +/OutputIntents [ +<< +/Type /OutputIntent +/S /GTS_PDFA1 +/DestOutputProfile \the\pdflastobj\space 0 R +/OutputConditionIdentifier (sRGB) +/Info (sRGB) +>> +] +}}{} +}{\ClassWarning{Package colorprofiles not installed}{Please install package colorprofiles}} +\fi +\RequirePackage[labelsep=space,singlelinecheck=false,% + font={up,small},labelfont={sf,bf},% + listof=false]{caption}%"listof" instead of "list" for backward compatibility +\@ifpackagelater{hyperref}{2009/12/09} + {\captionsetup{compatibility=false}}%cf. http://groups.google.de/group/comp.text.tex/browse_thread/thread/db9310eb540fbbd8/42e30f3b7b3aa17a?lnk=raot + {} +\DeclareCaptionLabelFormat{boxed}{% + \kern0.05em{\color[rgb]{0.99,0.78,0.07}\rule{0.73em}{0.73em}}% + \hspace*{0.67em}\bothIfFirst{#1}{~}#2} +\captionsetup{labelformat=boxed} +\captionsetup[table]{position=top} +\RequirePackage[figuresright]{rotating} +\caption@AtBeginDocument{\@ifpackageloaded{subfig}{\ClassError{lipics}{% + Do not load the subfig package}{The more recent subcaption package is already loaded}}{}} +\RequirePackage{subcaption} +\def\titlerunning#1{\gdef\@titlerunning{{\let\footnote\@gobble\markboth{#1}{#1}}}} +\def\authorrunning#1{% + \gdef\@authorrunning{\markright{\ifx\authoranonymous\relax\textcolor{red}{Anonymous author(s)} \else\if!#1!\textcolor{red}{Author: Please fill in the \string\authorrunning\space macro}\else#1\fi\fi}}} +\titlerunning{\@title \if!\@subtitle!\else\subtitleseperator \@subtitle\fi} +\authorrunning{\textcolor{red}{Author: Please use the \string\authorrunning\space macro}} +\def\EventLongTitle#1{\gdef\@EventLongTitle{#1}} +\EventLongTitle{} +\def\EventShortTitle#1{\gdef\@EventShortTitle{#1}} +\EventShortTitle{} +\def\EventEditors#1{\gdef\@EventEditors{#1}} +\EventEditors{} +\def\EventNoEds#1{\gdef\@EventNoEds{#1}\xdef\@Eds{Editor\ifnum#1>1s\fi}} +\EventNoEds{1} +\def\EventLogo#1{\gdef\@EventLogo{#1}} +\EventLogo{} +\def\EventAcronym#1{\gdef\@EventAcronym{#1}} +\EventAcronym{} +\def\EventYear#1{\gdef\@EventYear{#1}} +\EventYear{} +\def\EventDate#1{\gdef\@EventDate{#1}} +\EventDate{} +\def\EventLocation#1{\gdef\@EventLocation{#1}} +\EventLocation{} +\def\SeriesVolume#1{\gdef\@SeriesVolume{#1}} +\SeriesVolume{} +\def\ArticleNo#1{\gdef\@ArticleNo{#1}} +\ArticleNo{} +\def\DOIPrefix#1{\gdef\@DOIPrefix{#1}} +\DOIPrefix{10.4230/LIPIcs} +\def\@lipicsdoi{\@DOIPrefix.\@EventAcronym.\@EventYear.\@ArticleNo} +\def\and{\newline} +\let\orig@author\@author +\let\@authorsfortoc\@empty +\let\@authorsforpdf\@empty +\newcount\c@author +\newcounter{currentauthor} +\def\authorcolumnsMin{6} +\def\@authornum{0} +\def\author#1#2#3#4#5{% + \ifx\@author\orig@author\let\@author\@empty\fi + \g@addto@macro\@author{% + \noexpandarg\StrBehind{#2}{\and \url}[\homepageTemp]\IfSubStr{#2}{\and \url}{\StrBefore{#2}{\and \url}[\affiliation]}{\def\affiliation{#2}}% + \expandarg\exploregroups\StrRemoveBraces{\homepageTemp}[\homepage]% + \ifx\authorcolumns\relax + \ifnum\c@author>\authorcolumnsMin + \stepcounter{currentauthor} + \ifodd\value{currentauthor} + \begin{minipage}[t]{\textwidth} + \begin{minipage}[t]{0.49\textwidth} + \else + \hfill \begin{minipage}[t]{0.49\textwidth} + \fi + \else + \ClassWarning{Option 'authorcolumns' only applicable for > 6 authors}{Option 'authorcolumns' only applicable for >6 authors!} + \addvspace{0.5\baselineskip} + \fi + \else + \addvspace{0.5\baselineskip} + \fi + {\Large\bfseries + \if!#1! + \textcolor{red}{Author: Please enter author name}% + \else + \ifx\authoranonymous\relax + \textcolor{red}{Anonymous author} + \else + #1\,% + \ifx\compactauthor\relax\if!#3!\else{\,\href{mailto:#3}{\mailsymbol}}\fi% + \ifx\homepage\@empty\else{\,\href{\homepage}{\homesymbol}}\fi\fi% + \if!#4!\else{\,\href{#4}{\orcidsymbol}}\fi% + \if!#5!\else + \ifx\@funding\@empty + \expandafter\g@addto@macro\expandafter\@funding{\textit{\expandafter{\let\footnote\@gobble #1}}:\space{#5}} + \else + \expandafter\g@addto@macro\expandafter\@funding{\\\textit{\expandafter{\let\footnote\@gobble #1}}:\space{#5}} + \fi + \fi + \fi + \fi + } + {\small + \if!#2!\textcolor{red}{Author: Please enter affiliation as second parameter of the author macro}\else{\\* \ifx\authoranonymous\relax\textcolor{red}{Anonymous affiliation}\else\ifx\compactauthor\relax \affiliation \else#2\fi\fi}\fi + \ifx\compactauthor\relax\else\if!#3!\else{\ifx\authoranonymous\relax\else\\*\href{mailto:#3}{#3}\fi}\fi\fi + }\par + \ifx\authorcolumns\relax + \ifnum\c@author>\authorcolumnsMin + \end{minipage} + \ifnum\c@author=\value{currentauthor} + \end{minipage} + \else + \ifodd\value{currentauthor} + \else + \end{minipage}% + \medskip + \fi + \fi + \fi + \fi}% + \global\advance\c@author\@ne + \protected@write\@auxout{}{\string\gdef\string\@authornum{\the\c@author}} + \ifnum\c@author=\@ne + \gdef\@authorsfortoc{#1}% + \gdef\@authorsforpdf{#1} + \else + \expandafter\g@addto@macro\expandafter\@authorsforpdf\expandafter{, #1} + \expandafter\g@addto@macro\expandafter\@authorsfortoc\expandafter{\expandafter\csname\the\c@author authand\endcsname#1}% + \@namedef{\the\c@author authand}{,\space}% + \AtBeginDocument{% + \expandafter\ifnum\@authornum=2 + \@namedef{2authand}{\space and\space}% + \else + \@namedef{\@authornum authand}{,\space and\space}% + \fi} + \fi} +\newcommand*\affil[2][]{% + \ClassError{lipics} + {\string\affil\space deprecated: Please enter affiliation as second parameter of the author macro} + {Since 2017, \string\affil\space is obsolete in lipics.}} +\newcommand*\Copyright[1]{% + \def\@copyrightholder{#1} + \def\@Copyright{% + \setbox\@tempboxa\hbox{\IfFileExists{cc-by.pdf}{\includegraphics[height=14\p@,clip]{cc-by}}{\includegraphics[height=14\p@, width=40pt]{example-image-plain}}}% + \@rightskip\@flushglue \rightskip\@rightskip + \hangindent\dimexpr\wd\@tempboxa+0.5em\relax + \href{https://creativecommons.org/licenses/by/4.0/}% + {\smash{\lower\baselineskip\hbox{\unhcopy\@tempboxa}}}\enskip + \textcopyright\ % + \ifx!#1!\textcolor{red}{Author: Please fill in the \string\Copyright\space macro}\else\ifx\authoranonymous\relax\textcolor{red}{Anonymous author(s)}\else#1\fi\fi + ;\\% + licensed under Creative Commons License CC-BY 4.0\ifx!#1!\\\null\fi\par}} +\Copyright{\textcolor{red}{Author: Please provide a copyright holder}} +\let\@copyrightholder\@empty +\def\hideLIPIcs{\let\@hideLIPIcs\relax} +\usepackage{xstring} +\def\keywords#1{\def\@keywords{#1}} +\let\@keywords\@empty +\def\keywordsHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Keywords and phrases\enskip}} +\RequirePackage{comment} +\excludecomment{CCSXML} +% inspired by https://tex.stackexchange.com/questions/12810/how-do-i-split-a-string +\global\newcommand\ccsdesc[2][100]{\@ccsdesc#1~#2~~\relax} +\let\orig@ccsdesc\@ccsdesc +\let\@ccsdesc\@empty +\let\@ccsdescString\@empty +\gdef\@ccsdesc#1~#2~#3~{ + \ifx\@ccsdesc\orig@ccsdesc\let\@ccsdesc\@empty\fi + \ifx!#3! + \ifx\@ccsdescString\@empty + \g@addto@macro\@ccsdescString{{#2}} + \else + \g@addto@macro\@ccsdescString{; {#2}} + \fi + \else + \ifx\@ccsdescString\@empty + \g@addto@macro\@ccsdescString{{#2} $\rightarrow$ {#3}} + \else + \g@addto@macro\@ccsdescString{; {#2} $\rightarrow$ {#3}} + \fi + \fi +\ccsdescEnd +} +\def\ccsdescEnd#1\relax{} +\def\subjclass#1{ + \ClassError{lipics} + {\string\subjclass\space deprecated: Please enter subject classification in 1 or more ccsdesc macros} + {Since 2019, \string\subjclass\space is obsolete in lipics.}} +\let\@subjclass\@empty +\def\subjclassHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + 2012 ACM Subject Classification\enskip}} +\def\doiHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Digital Object Identifier\enskip}} +\def\category#1{\def\@category{#1}} +\let\@category\@empty +\def\categoryHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Category\enskip}} +\def\relatedversion#1{\def\@relatedversion{#1}} +\let\@relatedversion\@empty +\define@key{relatedversiondetails}{linktext}{\def\relatedversiondetails@linktext{#1}} +\define@key{relatedversiondetails}{cite}{\def\relatedversiondetails@cite{#1}} +\newcommand*\addtorelatedversionmacro[2]{% + \ifx\@relatedversion\@empty% + \g@addto@macro\@relatedversion{#1}% + \else% + \g@addto@macro\@relatedversion{\\#1}% + \fi% +}% +\newcommand{\relatedversiondetails}[3][]{% + \begingroup% + \let\relatedversiondetails@linktext\@empty + \let\relatedversiondetails@cite\@empty + \setkeys{relatedversiondetails}{#1}% + \ifx\relatedversiondetails@linktext\@empty% + \protected@edef\tmp{\textit{#2}:\space{\url{#3}}}% + \else% + \protected@edef\tmp{\textit{#2}:\space{\href{#3}{\texttt{\relatedversiondetails@linktext}}}}% + \fi% + \ifx\relatedversiondetails@cite\@empty% + \else% + \protected@edef\tmp{\tmp\nobreakspace\cite{\relatedversiondetails@cite}}% + \fi% + \expandafter\addtorelatedversionmacro\expandafter{\tmp}{#1}% + \endgroup% +}% +\def\relatedversionHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Related Version\enskip}} +\def\supplement#1{\def\@supplement{#1}} +\let\@supplement\@empty +\define@key{supplementdetails}{linktext}{\def\supplementdetails@linktext{#1}} +\define@key{supplementdetails}{cite}{\def\supplementdetails@cite{#1}} +\define@key{supplementdetails}{subcategory}{\def\supplementdetails@subcategory{#1}} +\define@key{supplementdetails}{swhlinktext}{\def\supplementdetails@swhlinktext{#1}} +\let\supplementdetails@swhlinktext\@empty +\define@key{supplementdetails}{swhid}{ + \ifx\supplementdetails@swhlinktext\@empty% + \StrBefore{#1}{;}[\supplementdetails@swhlinktext]% + \fi% + \def\supplementdetails@swhid{#1}% +} + +\define@key{supplementdetails}{swhdelimiter}{\def\supplementdetails@swhdelimiter{#1}} +\def\supplementdetails@swhdelimiter{\\ \hspace*{1.2em}} +\newcommand*\addtosupplementmacro[2]{% + \ifx\@supplement\@empty% + \g@addto@macro\@supplement{#1}% + \else% + \g@addto@macro\@supplement{\\#1}% + \fi% +}% +\newcommand{\supplementdetails}[3][]{% + \begingroup% + \let\supplementdetails@linktext\@empty + \let\supplementdetails@cite\@empty + \let\supplementdetails@subcategory\@empty + \let\supplementdetails@swhid\@empty + \setkeys{supplementdetails}{#1}% + \ifx\supplementdetails@subcategory\@empty% + \protected@edef\tmp{\textit{#2}} + \else + \protected@edef\tmp{\textit{#2\,\,(\supplementdetails@subcategory)}}% + \fi + \ifx\supplementdetails@linktext\@empty% + \protected@edef\tmp{\tmp:\space{\url{#3}}}% + \else% + \protected@edef\tmp{\tmp:\space{\href{#3}{\texttt{\supplementdetails@linktext}}}}% + \fi% + \ifx\supplementdetails@cite\@empty% + \else% + \protected@edef\tmp{\tmp\nobreakspace\cite{\supplementdetails@cite}}% + \fi + \ifx\supplementdetails@swhid\@empty% + \else% + \ifx\supplementdetails@swhlinktext\@empty% + \protected@edef\tmp{\tmp \supplementdetails@swhdelimiter{} archived at % + \href{https://archive.softwareheritage.org/\supplementdetails@swhid}{\nolinkurl{\supplementdetails@swhid}}}% + \else% + \protected@edef\tmp{\tmp \supplementdetails@swhdelimiter{} archived at % + \href{https://archive.softwareheritage.org/\supplementdetails@swhid}{\nolinkurl{\supplementdetails@swhlinktext}}}% + \fi% + \fi% + \expandafter\addtosupplementmacro\expandafter{\tmp}{#1}% + \endgroup% +}% +\def\supplementHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Supplementary Material\enskip}} +\newcommand\flag[2][0.9cm]{% + \leavevmode\marginpar{% + \raisebox{\dimexpr-\totalheight+\ht\strutbox\relax}% + [\dimexpr\ht\strutbox+3mm][\dp\strutbox]{\expandafter\includegraphics[width=#1]{#2}}% +}} +\def\funding#1{\def\@funding{#1}} +\let\@funding\@empty +\def\fundingHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Funding\enskip}} +\def\acknowledgements#1{\def\@acknowledgements{#1}} +\let\@acknowledgements\@empty +\def\acknowledgementsHeading{% + \textcolor{lipicsGray}{\fontsize{9}{12}\sffamily\bfseries + Acknowledgements\enskip}} +\RequirePackage{amsthm} +\ifx\usethmrestate\relax + \RequirePackage{thm-restate} +\fi +\thm@headfont{% + \textcolor{lipicsGray}{$\blacktriangleright$}\nobreakspace\sffamily\bfseries} +\def\th@remark{% + \thm@headfont{% + \textcolor{lipicsGray}{$\blacktriangleright$}\nobreakspace\sffamily}% + \normalfont % body font + \thm@preskip\topsep \divide\thm@preskip\tw@ + \thm@postskip\thm@preskip +} +\def\@endtheorem{\endtrivlist}%\@endpefalse +\renewcommand\qedsymbol{\textcolor{lipicsGray}{\ensuremath{\blacktriangleleft}}} +\renewenvironment{proof}[1][\proofname]{\par + \pushQED{\qed}% + \normalfont \topsep6\p@\@plus6\p@\relax + \trivlist + \item[\hskip\labelsep + \color{lipicsGray}\sffamily\bfseries + #1\@addpunct{.}]\ignorespaces +}{% + \popQED\endtrivlist%\@endpefalse +} +\newcommand{\claimqedhere}{\renewcommand\qedsymbol{\textcolor{lipicsGray}{\ensuremath{\vartriangleleft}}}% +\qedhere% +\renewcommand\qedsymbol{\textcolor{lipicsGray}{\ensuremath{\blacktriangleleft}}}} +\newenvironment{claimproof}[1][\proofname]{ + \pushQED{\qed}% + \normalfont \topsep6\p@\@plus6\p@\relax + \trivlist + \item[\hskip\labelsep + \color{lipicsGray}\sffamily + #1\@addpunct{.}]\ignorespaces +}{% + \renewcommand\qedsymbol{\textcolor{lipicsGray}{\ensuremath{\vartriangleleft}}} + \popQED\endtrivlist%\@endpefalse + \renewcommand\qedsymbol{\textcolor{lipicsGray}{\ensuremath{\blacktriangleleft}}} +} +% inspired by qed of amsthm class +\DeclareRobustCommand{\lipicsEnd}{% + \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill + \quad\hbox{$\lrcorner$}% +} +\AtBeginDocument{ + \@ifpackageloaded{algorithm2e}{ + \@ifpackagelater{algorithm2e}{2009/11/17}{ + \renewcommand{\algorithmcfname}{\sffamily\bfseries{}Algorithm}% + \renewcommand{\@algocf@procname}{\sffamily\bfseries{}Procedure}% + \SetAlgoCaptionSeparator{~} + \SetAlCapHSkip{0pt} + \renewcommand{\algocf@captiontext}[2]{% + \kern0.05em{\color{lipicsYellow}\rule{0.73em}{0.73em}}% + \hspace*{0.67em}\small #1\algocf@capseparator\nobreakspace#2} + \renewcommand{\algocf@makecaption}[2]{% + \parbox[t]{\textwidth}{\algocf@captiontext{#1}{#2}}% + }% + \renewcommand{\algocf@captionproctext}[2]{% + {% + \kern0.05em{\color{lipicsYellow}\rule{0.73em}{0.73em}}% + \hspace*{0.67em}\small% +\ProcSty{\ProcFnt\algocf@procname\ifthenelse{\boolean{algocf@procnumbered}}{\nobreakspace\thealgocf\algocf@typo\algocf@capseparator}{\relax}}% + \nobreakspace\ProcNameSty{\ProcNameFnt\algocf@captname #2@}% Name of the procedure in ProcName Style. + \ifthenelse{\equal{\algocf@captparam #2@}{\arg@e}}{}{% if no argument, write nothing + \ProcNameSty{\ProcNameFnt(}\ProcArgSty{\ProcArgFnt\algocf@captparam #2@}\ProcNameSty{\ProcNameFnt)}%else put arguments in ProcArgSty: + }% endif + \algocf@captother #2@% + }% +}% + \renewcommand{\@algocf@capt@boxed}{above} + \renewcommand{\@algocf@capt@ruled}{above} + \setlength\algotitleheightrule{0pt} + }{\ClassWarning{% + Package algorithm2e outdated}{You are using an outdated version of the package algorithm2e. Please update!}} + }{} + \@ifpackageloaded{algorithm}{ + \captionsetup[algorithm]{name=Algorithm, labelformat=boxed, position=top} + \newcommand\fs@ruled@notop{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@ruled + \def\@fs@pre{}% + \def\@fs@post{\kern2pt\hrule\relax}% + \def\@fs@mid{\kern2pt\hrule\kern2pt}% + \let\@fs@iftopcapt\iftrue} + \@ifundefined{fst@algorithm}{}{ + \renewcommand\fst@algorithm{\fs@ruled@notop} + } + }{} + \ifx\usecleveref\relax\else + \@ifpackageloaded{cleveref}{\ClassWarning{Use document option 'cleveref' instead}{Use document option 'cleveref' instead directly loading package 'cleveref'}}{} + \fi + \ifx\usethmrestate\relax\else + \@ifpackageloaded{thm-restate}{\ClassWarning{Use document option 'thm-restate' instead}{Use document option 'thm-restate' instead directly loading package 'thm-restate'}}{} + \fi + \ifx\useautoref\relax + \@ifundefined{algorithmautorefname}{\newcommand{\algorithmautorefname}{Algorithm}}{\renewcommand{\algorithmautorefname}{Algorithm}}% + \fi +} + +\ifx\usecleveref\relax + \RequirePackage[capitalise, noabbrev]{cleveref} + \crefname{algocf}{Algorithm}{Algorithms} + \Crefname{algocf}{Algorithm}{Algorithms} + \newcommand{\crefrangeconjunction}{--} + \newcommand{\creflastconjunction}{, and\nobreakspace} +\fi +\ifx\useautoref\relax + \RequirePackage{aliascnt} +\fi +\newtheoremstyle{claimstyle}{\topsep}{\topsep}{}{0pt}{\sffamily}{. }{5pt plus 1pt minus 1pt}% + {$\vartriangleright$ \thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} +\theoremstyle{plain} +\newtheorem{theorem}{Theorem} +\ifx\numberwithinsect\relax + \numberwithin{theorem}{section} +\fi +\ifx\useautoref\relax + \addto\extrasenglish{% + \def\chapterautorefname{Chapter}% + \def\sectionautorefname{Section}% + \def\subsectionautorefname{Subsection}% + \def\subsubsectionautorefname{Subsubsection}% + \def\paragraphautorefname{Paragraph}% + \def\subparagraphautorefname{Subparagraph}% + } + \addto\extrasUKenglish{% + \def\chapterautorefname{Chapter}% + \def\sectionautorefname{Section}% + \def\subsectionautorefname{Subsection}% + \def\subsubsectionautorefname{Subsubsection}% + \def\paragraphautorefname{Paragraph}% + \def\subparagraphautorefname{Subparagraph}% + } + \addto\extrasUSenglish{% + \def\chapterautorefname{Chapter}% + \def\sectionautorefname{Section}% + \def\subsectionautorefname{Subsection}% + \def\subsubsectionautorefname{Subsubsection}% + \def\paragraphautorefname{Paragraph}% + \def\subparagraphautorefname{Subparagraph}% + } + \ifx\usethmrestate\relax + \newtheorem{lemma}[theorem]{Lemma} + \newtheorem{corollary}[theorem]{Corollary} + \newtheorem{proposition}[theorem]{Proposition} + \newtheorem{exercise}[theorem]{Exercise} + \newtheorem{definition}[theorem]{Definition} + \newtheorem{conjecture}[theorem]{Conjecture} + \newtheorem{observation}[theorem]{Observation} + \theoremstyle{definition} + \newtheorem{example}[theorem]{Example} + \theoremstyle{remark} + \newtheorem{note}[theorem]{Note} + \newtheorem*{note*}{Note} + \newtheorem{remark}[theorem]{Remark} + \newtheorem*{remark*}{Remark} + \theoremstyle{claimstyle} + \newtheorem{claim}[theorem]{Claim} + \newtheorem*{claim*}{Claim} + \else + \newaliascnt{lemma}{theorem} + \newtheorem{lemma}[lemma]{Lemma} + \aliascntresetthe{lemma} + \newcommand{\lemmaautorefname}{Lemma} + \newaliascnt{corollary}{theorem} + \newtheorem{corollary}[corollary]{Corollary} + \aliascntresetthe{corollary} + \newcommand{\corollaryautorefname}{Corollary} + \newaliascnt{proposition}{theorem} + \newtheorem{proposition}[proposition]{Proposition} + \aliascntresetthe{proposition} + \newcommand{\propositionautorefname}{Proposition} + \newaliascnt{exercise}{theorem} + \newtheorem{exercise}[exercise]{Exercise} + \aliascntresetthe{exercise} + \newcommand{\exerciseautorefname}{Exercise} + \newaliascnt{definition}{theorem} + \newtheorem{definition}[definition]{Definition} + \aliascntresetthe{definition} + \newcommand{\definitionautorefname}{Definition} + \newaliascnt{conjecture}{theorem} + \newtheorem{conjecture}[conjecture]{Conjecture} + \aliascntresetthe{conjecture} + \newcommand{\conjectureautorefname}{Conjecture} + \newaliascnt{observation}{theorem} + \newtheorem{observation}[observation]{Observation} + \aliascntresetthe{observation} + \newcommand{\observationautorefname}{Observation} + \theoremstyle{definition} + \newaliascnt{example}{theorem} + \newtheorem{example}[example]{Example} + \aliascntresetthe{example} + \newcommand{\exampleautorefname}{Example} + \theoremstyle{remark} + \newaliascnt{note}{theorem} + \newtheorem{note}[note]{Note} + \aliascntresetthe{note} + \newcommand{\noteautorefname}{Note} + \newtheorem*{note*}{Note} + \newaliascnt{remark}{theorem} + \newtheorem{remark}[remark]{Remark} + \aliascntresetthe{remark} + \newcommand{\remarkautorefname}{Remark} + \newtheorem*{remark*}{Remark} + \theoremstyle{claimstyle} + \newaliascnt{claim}{theorem} + \newtheorem{claim}[claim]{Claim} + \aliascntresetthe{claim} + \newcommand{\claimautorefname}{Claim} + \newtheorem*{claim*}{Claim} + \ifx\numberwithinsect\relax + \numberwithin{theorem}{section} + \numberwithin{lemma}{section} + \numberwithin{corollary}{section} + \numberwithin{proposition}{section} + \numberwithin{exercise}{section} + \numberwithin{definition}{section} + \numberwithin{conjecture}{section} + \numberwithin{observation}{section} + \numberwithin{example}{section} + \numberwithin{note}{section} + \numberwithin{remark}{section} + \numberwithin{claim}{section} + \fi + \fi +\else + \newtheorem{lemma}[theorem]{Lemma} + \newtheorem{corollary}[theorem]{Corollary} + \newtheorem{proposition}[theorem]{Proposition} + \newtheorem{exercise}[theorem]{Exercise} + \newtheorem{definition}[theorem]{Definition} + \newtheorem{conjecture}[theorem]{Conjecture} + \newtheorem{observation}[theorem]{Observation} + \theoremstyle{definition} + \newtheorem{example}[theorem]{Example} + \theoremstyle{remark} + \newtheorem{note}[theorem]{Note} + \newtheorem*{note*}{Note} + \newtheorem{remark}[theorem]{Remark} + \newtheorem*{remark*}{Remark} + \theoremstyle{claimstyle} + \newtheorem{claim}[theorem]{Claim} + \newtheorem*{claim*}{Claim} +\fi +\theoremstyle{plain} +\endinput +%% +%% End of file `lipics-v2021.cls'. diff --git a/inst/rmarkdown/templates/lipics/skeleton/orcid.pdf b/inst/rmarkdown/templates/lipics/skeleton/orcid.pdf index 20200bad..c31b0393 100644 Binary files a/inst/rmarkdown/templates/lipics/skeleton/orcid.pdf and b/inst/rmarkdown/templates/lipics/skeleton/orcid.pdf differ diff --git a/inst/rmarkdown/templates/lipics/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/lipics/skeleton/skeleton.Rmd index ae0b3643..f8e0326a 100644 --- a/inst/rmarkdown/templates/lipics/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/lipics/skeleton/skeleton.Rmd @@ -1,14 +1,17 @@ --- -title: "Template for Preparing Your Manuscript Submission to LIPIcs Using RMarkdown" +title: "Template for Preparing Your Manuscript Submission to LIPIcs Using R Markdown" +subtitle: "An Optional Subtitle" titlerunning: "LIPIcs rticles" # optional, please use if title is longer than one line format: "a4paper" # for A4 paper format use option "a4paper", for US-letter use option "letterpaper" -hyphenation: "UKenglish" # for british hyphenation rules use option "UKenglish", for american hyphenation rules use option "USenglish" -authorcolumns: false # activate a two columnstyle for the authors; only available in case of more than 6 authors +hyphenation: "UKenglish" # for British hyphenation rules use option "UKenglish", for American hyphenation rules use option "USenglish" +authorcolumns: false # activate a two-column style for the authors; only available with more than 6 authors +oldauthorstyle: false # use the less compact pre-v2021 author presentation +pdfa: false # produce PDF/A with pdfLaTeX; the tagged class's PDF/A path is not XeLaTeX-compatible numberwithinsect: false # for section-numbered lemmas etc. cleveref: true # for enabling cleveref support autoref: true # for enabling autoref support -anonymous: false # for anonymousing the authors (e.g. for double-blind review) -thm-restate: false # opt in only when needed; incompatible with LaTeX 2026 +anonymous: false # for anonymizing the authors (e.g. for double-blind review) +thm-restate: false # opt in only when needed; rticles applies the current LaTeX 2026 compatibility workaround author: # mandatory, please use full name; only 1 author per \author macro; first two parameters are mandatory, other parameters can be empty. Please provide at least the name of the affiliation and the country. The full address is optional - name: John Q. Public @@ -28,9 +31,9 @@ abstract: | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse potenti. bibliography: bibliography -authorrunning: "J. Q. Public and J. R. Public" # mandatory. First: Use abbreviated first/middle names. Second (only in severe cases): Use first author plus 'et al.' -# A "thin space" character, ' ' or  , is used between the two first names. -copyright: "John Q. Public and Joan R. Public" # mandatory, please use full first names. LIPIcs license is "CC-BY"; http://creativecommons.org/licenses/by/3.0/ +authorrunning: 'J.\,Q. Public and J.\,R. Public' # mandatory. First: Use abbreviated first/middle names. Second (only in severe cases): Use first author plus 'et al.' +# The LaTeX thin-space command `\,` is used between abbreviated names. +copyright: "John Q. Public and Joan R. Public" # mandatory, please use full first names. Published LIPIcs articles use CC BY 4.0: https://creativecommons.org/licenses/by/4.0/ ccdesc: # Please choose ACM 2012 classifications from https://dl.acm.org/ccs/ccs_flat.cfm concept_significance: "100" @@ -39,12 +42,26 @@ keywords: "keyword one, keyword 2, three" # OPTIONAL: acknowledgements: "I want to thank \\dots" category: "Invited paper" -relatedversion: "A full version of the paper is available at https://..." # optional, e.g. full version hosted on arXiv, HAL, or other respository/website -supplement: "See code at https://github.com/.. and data at https://doi.org/..." # optional, e.g. related research data, source code, ... hosted on a repository like zenodo, figshare, GitHub, ... -funding: "(Optional) general funding statement \\dots" # optional, to capture a funding statement, which applies to all authors. Please enter author specific funding statements as fifth argument of the \author macro. +relatedversion: "A full version of the paper is available at https://..." # optional compatibility field; use a persistent URL +relatedversiondetails: # optional, repeat entries as needed + - classification: "Full Version" + url: "https://example.org/full-version" + linktext: "Full version" + cite: "DBLP:books/mk/GrayR93" # optional; requires the BibTeX workflow (citation_package: natbib) +supplement: "See code at https://github.com/.. and data at https://doi.org/..." # optional compatibility field +supplementdetails: # optional, repeat entries as needed + - classification: "Software" + url: "https://example.org/software" + linktext: "Source code" # optional + subcategory: "Source Code" # optional + # cite: "DBLP:books/mk/GrayR93" + # swhid: "swh:1:dir:..." # Software Heritage identifier + # swhlinktext: "swh:1:dir:..." + # swhdelimiter: "\\\\" +funding: "(Optional) general funding statement \\dots" # optional, to capture a funding statement that applies to all authors. Enter author-specific funding statements as the fifth argument of the \author macro. nolinenumbers: false # disable line numbering hideLIPIcs: false # remove references to LIPIcs series (logo, DOI, ...), e.g. when preparing a pre-final version to be uploaded to arXiv or another public repository -# You will be asked to fill these in on submission with the correct information; following fields are hidded if hideLIPIcs: true: +# You will be asked to fill these in on submission with the correct information; the following fields are hidden if hideLIPIcs: true: volumemacros: | \EventEditors{John Q. Open and Joan R. Access} \EventNoEds{2} @@ -172,7 +189,8 @@ appendix: | \end{claimproof} List of different predefined enumeration styles: output: - rticles::lipics_article: default + rticles::lipics_article: + citation_package: natbib # To use with bookdown feature bookdown::pdf_book: base_format: rticles::lipics_article @@ -202,6 +220,12 @@ Please comply with the following instructions when preparing your article for a - Please try to keep the warnings log as small as possible. Avoid overfull `\hboxes` and any kind of warnings/errors with the referenced BibTeX entries. - Use a spellchecker to correct typos. +### Citation processing {.unnumbered} + +Dagstuhl's official workflow uses BibTeX, the fixed `plainurl` style, an extensionless `bibliography: bibliography` value, and LaTeX citations such as `\cite{DBLP:journals/cacm/Knuth74}`. The `citation_package` output option remains user-selectable and controls Pandoc's handling of Markdown citations; it does not change the fixed `plainurl` line in the generated LaTeX. + +With `citation_package: natbib`, Markdown citations such as `[@key]` become natbib commands, but this custom template does not load the unsupported `natbib` package. Raw LaTeX `\cite{key}` citations pass through unchanged and follow the official BibTeX workflow. With `citation_package: default`, Pandoc citeproc formats Markdown citations and creates an inline reference list; use the full `bibliography.bib` filename for that route. Structured `relatedversiondetails` and `supplementdetails` `cite` fields emit raw LaTeX citations and therefore require the BibTeX route; omit those fields when using citeproc. Other rmarkdown citation settings similarly request their own Pandoc/LaTeX citation commands and may require user-supplied package configuration. + ## Mandatory metadata macros {.unnumbered} **NOTE**: _The following macros are set via the YAML header in the R Markdown template._ @@ -220,11 +244,11 @@ The `\author` macros and the `\Copyright` macro should contain full author names #### Please do not \ldots {.unnumbered} -Generally speaking, please do not override the `lipics-v2019`-style defaults. To be more specific, a short checklist also used by Dagstuhl Publishing during the final typesetting is given below. -In case of `non-compliance` with these rules Dagstuhl Publishing will remove the corresponding parts of \LaTeX{} code and *replace it with the `lipics-v2019` defaults*. In serious cases, we may reject the LaTeX-source and expect the corresponding author to revise the relevant parts. +Generally speaking, please do not override the `lipics-v2021`-style defaults. To be more specific, a short checklist also used by Dagstuhl Publishing during the final typesetting is given below. +In case of `non-compliance` with these rules Dagstuhl Publishing will remove the corresponding parts of \LaTeX{} code and *replace it with the `lipics-v2021` defaults*. In serious cases, we may reject the LaTeX-source and expect the corresponding author to revise the relevant parts. - Do not use a different main font. (For example, the `times` package is forbidden.) -- Do not alter the spacing of the `lipics-v2019.cls` style file. +- Do not alter the spacing of the `lipics-v2021.cls` style file. - Do not use `enumitem` and `paralist`. (The `enumerate` package is preloaded, so you can use `\begin{enumerate}[(a)]` or the like.) - Do not use "self-made" sectioning commands (e.\,g., `\bf My Paragraph}`). @@ -236,8 +260,7 @@ In case of `non-compliance` with these rules Dagstuhl Publishing will remove the \enlargethispage{\baselineskip} -This is only a summary containing the most relevant details. Please read the complete document "LIPIcs: Instructions for Authors and the `lipics-v2019` Class" for all details and don't hesitate to contact Dagstuhl Publishing ([mailto:publishing@dagstuhl.de](publishing@dagstuhl.de)) in case of questions or comments: -[http://drops.dagstuhl.de/styles/lipics-v2019/lipics-v2019-authors/lipics-v2019-authors-guidelines.pdf](`http://drops.dagstuhl.de/styles/lipics-v2019/lipics-v2019-authors/lipics-v2019-authors-guidelines.pdf). +This is only a summary containing the most relevant details. Please read the current [instructions for authors](https://submission.dagstuhl.de/documentation/authors) and the [LIPIcs author information](https://drops.dagstuhl.de/entities/series/LIPIcs#author). This template bundles the author kit tagged [v2021.1.3](https://github.com/dagstuhl-publishing/styles/tree/v2021.1.3/LIPIcs/authors). Contact Dagstuhl Publishing at [publishing@dagstuhl.de](mailto:publishing@dagstuhl.de) with questions. # Lorem ipsum dolor sit amet @@ -252,11 +275,17 @@ Vestibulum sodales dolor et dui cursus iaculis. Nullam ullamcorper purus vel tur \begin{proof} Cras purus lorem, pulvinar et fermentum sagittis, suscipit quis magna. +\proofsubparagraph*{A subparagraph within the proof.} +The v2021 class provides `\proofsubparagraph` for structuring longer proofs. + \begin{claim} content... \end{claim} \begin{claimproof} -content... +The final item can place the claim-ending symbol explicitly. +\begin{enumerate} +\item content... \claimqedhere{} +\end{enumerate} \end{claimproof} \end{proof} @@ -267,9 +296,17 @@ Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming \end{corollary} \begin{proposition}\label{prop1} -This is a proposition +This is a proposition. \end{proposition} +\begin{conjecture}\label{conj1} +This is a conjecture. +\end{conjecture} + +\begin{observation}\label{obs1} +This is an observation. +\end{observation} + \autoref{prop1} and \cref{prop1} \ldots ## Curabitur dictum felis id sapien diff --git a/man/article.Rd b/man/article.Rd index 93852134..3fdcb524 100644 --- a/man/article.Rd +++ b/man/article.Rd @@ -107,7 +107,7 @@ jasa_article( lipics_article( ..., - latex_engine = "xelatex", + latex_engine = "pdflatex", keep_tex = TRUE, citation_package = "natbib", md_extensions = c("-autolink_bare_uris", "-auto_identifiers") @@ -299,12 +299,27 @@ Journal of the Acoustical Society of America. Adapted from \section{\code{lipics_article}}{ Format for creating submissions to -LIPIcs - Leibniz International Proceedings Informatics - articles. -Adapted from the official Instructions for Authors at -\url{https://submission.dagstuhl.de/documentation/authors} and the -template from the archive \code{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 \href{https://submission.dagstuhl.de/documentation/authors}{Instructions for Authors} and the +tagged LIPIcs author kit v2021.1.3, which contains \code{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 \verb{\\cite\{key\}}, and the fixed \code{plainurl} bibliography +style. The \code{citation_package} argument remains user-selectable: \code{"natbib"} +makes Pandoc translate Markdown citations to natbib commands, but this +custom template does not load the unsupported natbib package; \code{"default"} +uses Pandoc citeproc and is not the official BibTeX workflow. Structured +related-version and supplement \code{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 \code{plainurl} fixed regardless of this argument. + +pdfLaTeX is the default and XeLaTeX remains selectable. With the tagged +class, the \code{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. } \section{\code{lncs_article}}{ diff --git a/inst/rmarkdown/templates/lipics/skeleton/lipics-v2019.cls b/tests/testit/fixtures/lipics-v2019.cls similarity index 100% rename from inst/rmarkdown/templates/lipics/skeleton/lipics-v2019.cls rename to tests/testit/fixtures/lipics-v2019.cls diff --git a/tests/testit/helper-lipics.R b/tests/testit/helper-lipics.R new file mode 100644 index 00000000..aba469a9 --- /dev/null +++ b/tests/testit/helper-lipics.R @@ -0,0 +1,173 @@ +prepare_lipics_features <- function(path) { + rmd <- xfun::read_utf8(path) + pdfa <- grepl("^pdfa: false", rmd) + oldauthorstyle <- grepl("^oldauthorstyle: false", rmd) + stopifnot(sum(pdfa) == 1, sum(oldauthorstyle) == 1) + rmd[pdfa] <- "pdfa: true # v2021 feature smoke test" + rmd[oldauthorstyle] <- "oldauthorstyle: true # v2021 feature smoke test" + xfun::write_utf8(rmd, path) +} + +prepare_lipics_citeproc <- function(path) { + rmd <- xfun::read_utf8(path) + bibliography <- grepl("^bibliography: bibliography$", rmd) + raw_citations <- grepl("\\\\cite\\{DBLP:", rmd) + structured_citation <- grepl( + ' cite: "DBLP:books/mk/GrayR93"', + rmd, + fixed = TRUE + ) + stopifnot( + sum(bibliography) == 1, + any(raw_citations), + sum(structured_citation) == 1 + ) + rmd[bibliography] <- "bibliography: bibliography.bib" + rmd[raw_citations] <- gsub( + "\\\\cite\\{([^}]+)\\}", + "[@\\1]", + rmd[raw_citations] + ) + rmd[structured_citation] <- sub( + " cite:", + " # cite:", + rmd[structured_citation], + fixed = TRUE + ) + xfun::write_utf8(rmd, path) +} + +lipics_fixture <- function(...) { + test_root <- getOption("testit.test_dir") + stopifnot(length(test_root) == 1) + + paths <- file.path( + test_root, + c("testit/fixtures", "tests/testit/fixtures"), + ... + ) + path <- paths[file.exists(paths)] + stopifnot(length(path) == 1) + path +} + +prepare_lipics_legacy <- function(path) { + xfun::write_utf8( + c( + "---", + 'title: "Legacy LIPIcs draft"', + 'subtitle: "Legacy subtitle"', + 'titlerunning: "Legacy LIPIcs draft"', + 'format: "a4paper"', + 'hyphenation: "UKenglish"', + "author:", + " - name: John Q. Public", + ' affiliation: "Dummy University, Country"', + " email: johnqpublic@example.org", + ' orcid: ""', + 'authorrunning: "J. Q. Public"', + 'copyright: "John Q. Public"', + "ccdesc:", + ' concept_significance: "100"', + ' concept_desc: "General and reference"', + 'keywords: "legacy, compatibility"', + 'abstract: "A legacy draft using the v2019 class."', + 'relatedversion: "Legacy related version"', + "relatedversiondetails:", + ' - classification: "Full Version"', + ' url: "https://example.org/full-version"', + ' linktext: "Full version"', + "supplementdetails:", + ' - classification: "Software"', + ' url: "https://example.org/software"', + ' linktext: "Source code"', + ' swhid: "swh:1:dir:legacy"', + ' swhlinktext: "Archived source"', + " swhdelimiter: '\\quad '", + "output:", + " rticles::lipics_article: default", + "---", + "", + "# Legacy draft", + "", + "This draft retains its project-local `lipics-v2019.cls`." + ), + path + ) + + stopifnot(file.remove("lipics-v2021.cls")) + stopifnot(file.copy( + lipics_fixture("lipics-v2019.cls"), + "lipics-v2019.cls" + )) +} + +validate_lipics_legacy <- function(output_file, path) { + tex <- xfun::read_utf8(sub("[.]pdf$", ".tex", output_file)) + assert("legacy fallback flattens the subtitle", { + any(grepl( + "\\title{Legacy LIPIcs draft: Legacy subtitle}", + tex, + fixed = TRUE + )) + }) + assert("legacy fallback flattens related-version metadata", { + any(grepl( + paste0( + "\\relatedversion{Legacy related version; ", + "\\textit{Full Version}: ", + "\\href{https://example.org/full-version}{Full version}}" + ), + tex, + fixed = TRUE + )) + }) + assert("legacy fallback preserves supplement metadata", { + all(c( + any(grepl( + "\\textit{Software}: ", + tex, + fixed = TRUE + )), + any(grepl( + "\\href{https://example.org/software}{Source code}", + tex, + fixed = TRUE + )), + any(grepl("\\quad archived at", tex, fixed = TRUE)), + any(grepl( + "https://archive.softwareheritage.org/swh:1:dir:legacy", + tex, + fixed = TRUE + )), + any(grepl("\\nolinkurl{Archived source}", tex, fixed = TRUE)) + )) + }) +} + +validate_lipics_citeproc <- function(output_file, path) { + tex <- xfun::read_utf8(sub("[.]pdf$", ".tex", output_file)) + assert("citeproc emits exactly one reference list", { + sum(grepl("\\begin{CSLReferences}", tex, fixed = TRUE)) == 1 && + !any(grepl("\\bibliography{", tex, fixed = TRUE)) + }) +} + +prepare_lipics_restatement <- function(path) { + rmd <- xfun::read_utf8(path) + option <- grepl("^thm-restate: false", rmd) + stopifnot(sum(option) == 1) + rmd[option] <- "thm-restate: true # legacy metadata" + xfun::write_utf8( + c( + rmd, + "", + "\\begin{restatable}{theorem}{legacytheorem}", + "This theorem can be restated.", + "\\end{restatable}", + "", + "\\legacytheorem*" + ), + path + ) +} diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index 5b29df9d..6687f259 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -2,7 +2,8 @@ test_format <- function( name, output_options = NULL, skip = NULL, - transform = NULL + transform = NULL, + validate = NULL ) { withr::local_options(lifecycle_verbosity = "quiet") @@ -46,25 +47,9 @@ test_format <- function( assert(paste(name, "format works"), { file.exists(output_file) }) -} - -prepare_lipics_restatement <- function(path) { - rmd <- xfun::read_utf8(path) - option <- grepl("^thm-restate: false", rmd) - stopifnot(sum(option) == 1) - rmd[option] <- "thm-restate: true # legacy metadata" - xfun::write_utf8( - c( - rmd, - "", - "\\begin{restatable}{theorem}{legacytheorem}", - "This theorem can be restated.", - "\\end{restatable}", - "", - "\\legacytheorem*" - ), - path - ) + if (is.function(validate)) { + validate(output_file, testdoc) + } } #--- NOTE to contributors ------------------------------------------------------ @@ -106,6 +91,22 @@ test_format("jss", skip = !rmarkdown::pandoc_available("2.8")) test_format("lncs") test_format("lncs", output_options = list(citation_package = "natbib")) test_format("lipics") +test_format( + "lipics", + output_options = list(latex_engine = "xelatex") +) +test_format("lipics", transform = prepare_lipics_features) +test_format( + "lipics", + transform = prepare_lipics_legacy, + validate = validate_lipics_legacy +) +test_format( + "lipics", + output_options = list(citation_package = "default"), + transform = prepare_lipics_citeproc, + validate = validate_lipics_citeproc +) test_format("lipics", transform = prepare_lipics_restatement) test_format("mdpi") test_format("mnras") diff --git a/tests/testthat/test-lipics_article.R b/tests/testthat/test-lipics_article.R new file mode 100644 index 00000000..188922d6 --- /dev/null +++ b/tests/testthat/test-lipics_article.R @@ -0,0 +1,95 @@ +test_that("lipics_article() warns once for a legacy local class", { + skip_if_not_pandoc("2.8") + withr::local_options(rticles.warn_lipics_v2019 = NULL) + article_dir <- withr::local_tempdir() + xfun::write_utf8("", file.path(article_dir, "lipics-v2019.cls")) + format <- lipics_article() + + expect_warning( + format$pre_knit( + input = file.path(article_dir, "article.Rmd"), + metadata = list() + ), + regexp = "lipics-v2019[.]cls.*backward compatibility" + ) + expect_no_warning( + format$pre_knit( + input = file.path(article_dir, "article.Rmd"), + metadata = list() + ) + ) +}) + +test_that("lipics_article() proposes removing the unused legacy class once", { + skip_if_not_pandoc("2.8") + withr::local_options(rticles.warn_lipics_both_classes = NULL) + article_dir <- withr::local_tempdir() + xfun::write_utf8("", file.path(article_dir, "lipics-v2019.cls")) + xfun::write_utf8("", file.path(article_dir, "lipics-v2021.cls")) + format <- lipics_article() + + expect_warning( + format$pre_knit( + input = file.path(article_dir, "article.Rmd"), + metadata = list() + ), + regexp = "both.*will use 'lipics-v2021[.]cls'.*remove" + ) + expect_no_warning( + format$pre_knit( + input = file.path(article_dir, "article.Rmd"), + metadata = list() + ) + ) +}) + +test_that("lipics_article() does not warn for only the current class", { + skip_if_not_pandoc("2.8") + article_dir <- withr::local_tempdir() + xfun::write_utf8("", file.path(article_dir, "lipics-v2021.cls")) + format <- lipics_article() + + expect_no_warning( + format$pre_knit( + input = file.path(article_dir, "article.Rmd"), + metadata = list() + ) + ) +}) + +test_that("lipics_article() does not warn when no local class is present", { + skip_if_not_pandoc("2.8") + article_dir <- withr::local_tempdir() + format <- lipics_article() + + expect_no_warning( + format$pre_knit( + input = file.path(article_dir, "article.Rmd"), + metadata = list() + ) + ) +}) + +test_that("rmarkdown::render() emits the legacy LIPIcs class warning", { + skip_if_not_pandoc("2.8") + withr::local_options(rticles.warn_lipics_v2019 = NULL) + article_dir <- withr::local_tempdir() + rmd <- file.path(article_dir, "article.Rmd") + xfun::write_utf8( + c( + "---", + "title: Legacy LIPIcs draft", + "output: rticles::lipics_article", + "---", + "", + "Body." + ), + rmd + ) + xfun::write_utf8("", file.path(article_dir, "lipics-v2019.cls")) + + expect_warning( + rmarkdown::render(rmd, quiet = TRUE, run_pandoc = FALSE), + regexp = "lipics-v2019[.]cls.*backward compatibility" + ) +})