Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -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": "<p>Several templates to generate reports, presentations and posters.<\/p>",
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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)")),
Expand Down
89 changes: 24 additions & 65 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,88 +26,47 @@ 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

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 \
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
9 changes: 8 additions & 1 deletion R/gitbook.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<br>") |>
pandoc_variable_arg(name = "watermark") |>
Expand Down
9 changes: 8 additions & 1 deletion R/pdf_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down
Loading