diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index cb2481b2..7fe04c0d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -19,7 +19,7 @@ jobs: uses: inbo/actions/render_inbomd@devel env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EXAMPLE_BRANCH: citeme + EXAMPLE_BRANCH: main - name: push gh-pages if: ${{ github.event_name == 'push' }} diff --git a/.zenodo.json b/.zenodo.json index f46bfc92..b596105f 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "INBOmd: Markdown Templates for INBO", - "version": "0.6.5", + "version": "0.6.6", "license": "GPL-3.0", "upload_type": "software", "description": "
Several templates to generate reports, presentations and posters.<\/p>",
diff --git a/CITATION.cff b/CITATION.cff
index 3702e7cf..bc7ff7e4 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -27,4 +27,4 @@ identifiers:
value: 10.5281/zenodo.842223
- type: url
value: https://inbo.github.io/INBOmd/
-version: 0.6.5
+version: 0.6.6
diff --git a/DESCRIPTION b/DESCRIPTION
index 09ddda9c..3bb97e2c 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: INBOmd
Title: Markdown Templates for INBO
-Version: 0.6.5
+Version: 0.6.6
Authors@R: c(
person("Thierry", "Onkelinx", , "thierry.onkelinx@inbo.be", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-8804-4216", affiliation = "Research Institute for Nature and Forest (INBO)")),
diff --git a/Dockerfile b/Dockerfile
index 6f289077..d2ad6d4b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,9 +26,20 @@ RUN useradd docker \
&& chown docker:docker /home/docker
## Configure default locale, see https://github.com/rocker-org/rocker/issues/19
-RUN apt-get update \
+RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
+ dirmngr \
+ git \
+ ghostscript \
+ gnupg \
+ imagemagick \
+ libcurl4-openssl-dev \
+ libpoppler-cpp-dev \
+ libpq-dev \
locales \
+ software-properties-common \
+ wget \
+ && apt-get clean \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen nl_BE.utf8 \
&& /usr/sbin/update-locale LANG=nl_BE.UTF-8
@@ -36,78 +47,26 @@ RUN apt-get update \
ENV LC_ALL=nl_BE.UTF-8
ENV LANG=nl_BE.UTF-8
-## Install wget
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- wget
-
-## Install nano
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- nano
-
-## Install ImageMagick
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- imagemagick
-
-## Install git
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- git
-
-## Install gpg
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- gnupg
-
## R repo
-RUN apt-get update -qq \
- && apt-get install -y --no-install-recommends \
- software-properties-common \
- dirmngr \
- && wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \
- && add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
-
-## R
-RUN apt-get update \
+RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \
+ && add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" \
+ && apt-get update \
&& apt-get install -y --no-install-recommends \
- r-base-dev
-
-## Install pandoc
-RUN wget https://github.com/jgm/pandoc/releases/download/3.1.8/pandoc-3.1.8-1-amd64.deb \
+ r-base-dev \
+ && apt-get clean \
+ && wget https://github.com/jgm/pandoc/releases/download/3.1.8/pandoc-3.1.8-1-amd64.deb \
&& dpkg -i pandoc-3.1.8-1-amd64.deb \
&& rm pandoc-3.1.8-1-amd64.deb
COPY docker/.Rprofile /usr/lib/R/etc/Rprofile.site
## install pak
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- libcurl4-openssl-dev \
- && Rscript --no-save --no-restore -e 'install.packages("pak")'
-
-## install R packages using pak
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- libpoppler-cpp-dev \
- libpq-dev \
- && Rscript --no-save --no-restore -e 'pak::pkg_install(c("bookdown", "checklist", "dplyr", "DT", "here", "INBOtheme", "kableExtra", "lipsum", "pander", "pdftools", "qrcode", "webshot"), dependencies = TRUE)'
-
-## Install webshot dependency
-RUN Rscript -e 'webshot::install_phantomjs()'
-
-## Install tinytex
-RUN Rscript -e 'tinytex::install_tinytex()'
-
-## Install LaTeX packages
-RUN apt-get update \
- && apt-get install -y --no-install-recommends \
- ghostscript \
- && Rscript -e 'tinytex::tlmgr_install(c("babel-dutch", "babel-english", "babel-french", "beamer", "beamerswitch", "booktabs", "carlisle", "colortbl", "datetime", "draftwatermark", "dvips", "emptypage", "environ", "epstopdf", "eso-pic", "eurosym", "extsizes", "fancyhdr", "fancyvrb", "fmtcount", "float", "fontspec", "footmisc", "framed", "helvetic", "hyphen-dutch", "hyphen-french", "inconsolata", "lastpage", "lipsum", "makecell", "marginnote", "mdframed", "ms", "multirow", "parskip", "pdflscape", "pdfpages", "pdftexcmds", "placeins", "needspace", "tabu", "tex", "textpos", "threeparttable", "threeparttablex", "titlesec", "times", "tocloft", "translator", "trimspaces", "ulem", "upquote", "wrapfig", "xcolor", "xstring", "zref"))'
-
-## Install fonts
-RUN mkdir ${HOME}/.fonts \
+RUN Rscript --no-save --no-restore -e 'install.packages("pak")' \
+ && Rscript --no-save --no-restore -e 'pak::pkg_install(c("bookdown", "checklist", "dplyr", "DT", "here", "INBOtheme", "kableExtra", "lipsum", "pander", "pdftools", "qrcode", "webshot"), dependencies = TRUE)' \
+ && Rscript -e 'webshot::install_phantomjs()' \
+ && Rscript -e 'tinytex::install_tinytex()' \
+ && Rscript -e 'tinytex::tlmgr_install(c("babel-dutch", "babel-english", "babel-french", "beamer", "beamerswitch", "booktabs", "carlisle", "colortbl", "datetime", "draftwatermark", "dvips", "emptypage", "environ", "epstopdf", "eso-pic", "eurosym", "extsizes", "fancyhdr", "fancyvrb", "fmtcount", "float", "fontspec", "footmisc", "framed", "helvetic", "hyphen-dutch", "hyphen-french", "inconsolata", "lastpage", "lipsum", "makecell", "marginnote", "mdframed", "multirow", "parskip", "pdflscape", "pdfpages", "pdftexcmds", "placeins", "needspace", "tabu", "tex", "textpos", "threeparttable", "threeparttablex", "titlesec", "times", "tocloft", "translator", "trimspaces", "ulem", "upquote", "wrapfig", "xcolor", "xstring", "zref"))' \
+ && mkdir ${HOME}/.fonts \
&& wget https://www.wfonts.com/download/data/2014/12/12/calibri/calibri.zip \
&& unzip calibri.zip -d ${HOME}/.fonts \
&& rm calibri.zip \
diff --git a/NEWS.md b/NEWS.md
index eac95ee9..e20b5c7a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,8 @@
+# INBOmd 0.6.6
+
+* Fix `NA` watermark issue when required colophon fields are missing.
+ Thanks to @RCinbo to reporting this.
+
# INBOmd 0.6.5
* Use latest version of `citeme` and `checklist`.
diff --git a/R/gitbook.R b/R/gitbook.R
index f62b7a94..c7706a22 100644
--- a/R/gitbook.R
+++ b/R/gitbook.R
@@ -79,7 +79,14 @@ gitbook <- function(code_folding = c("none", "show", "hide")) {
c(pandoc_args) -> pandoc_args
}
if (draft) {
- c(en = "DRAFT", fr = "CONCEPTION", nl = "ONTWERP")[lang] |>
+ c(
+ en = "DRAFT",
+ `en-GB` = "DRAFT",
+ fr = "CONCEPTION",
+ `fr-FR` = "CONCEPTION",
+ nl = "ONTWERP",
+ `nl-BE` = "ONTWERP"
+ )[lang] |>
c(fm$watermark) |>
paste(collapse = "
") |>
pandoc_variable_arg(name = "watermark") |>
diff --git a/R/pdf_report.R b/R/pdf_report.R
index 26a4ee18..be8e9daf 100644
--- a/R/pdf_report.R
+++ b/R/pdf_report.R
@@ -148,7 +148,14 @@ pdf_report <- function(
fm$pagefootmessage <- fm$doi
}
if (draft) {
- c(en = "DRAFT", fr = "CONCEPTION", nl = "ONTWERP")[fm$lang] |>
+ c(
+ en = "DRAFT",
+ `en-GB` = "DRAFT",
+ fr = "CONCEPTION",
+ `fr-FR` = "CONCEPTION",
+ nl = "ONTWERP",
+ `nl-BE` = "ONTWERP"
+ )[fm$lang] |>
c(fm$watermark) |>
paste(collapse = "\\\\") -> fm$watermark
}
diff --git a/inst/CITATION b/inst/CITATION
index 2301c355..cd50ba00 100644
--- a/inst/CITATION
+++ b/inst/CITATION
@@ -2,12 +2,12 @@ citHeader("To cite `INBOmd` in publications please use:")
# begin checklist entry
bibentry(
bibtype = "Manual",
- title = "INBOmd: Markdown Templates for INBO. Version 0.6.5",
+ title = "INBOmd: Markdown Templates for INBO. Version 0.6.6",
author = c(person(given = "Thierry", family = "Onkelinx")),
year = 2026,
url = "https://inbo.github.io/INBOmd/",
abstract = "Several templates to generate reports, presentations and posters.",
- textVersion = "Onkelinx, Thierry (2026) INBOmd: Markdown Templates for INBO. Version 0.6.5. https://inbo.github.io/INBOmd/",
+ textVersion = "Onkelinx, Thierry (2026) INBOmd: Markdown Templates for INBO. Version 0.6.6. https://inbo.github.io/INBOmd/",
keywords = "markdown; bookdown; corporate identity; template; inbo_version",
doi = "10.5281/zenodo.842223",
)