The INBOmd
package provides several styles for rmarkdown
files.
The styles are based on the corporate identity of the Research Institute
for Nature and Forest (Instituut voor Natuur en Bosonderzoek, INBO).
The styles itself are not intended for use by parties external to INBO.
We still provide them to other users as an inspiration and example on
how to create their own corporate identity styles for
rmarkdown
files.
All templates are based on bookdown
, which
is an extension of rmarkdown
. It is tailored towards
writing books and technical documentation.
bookdown
rmarkdown
a combination of R
code with text in
markdown
plain text formatting syntax.
R
is freeware open source statistical software.markdown
is a lightweight markup language. The
formatting doesn’t hinder when reading the plain text. It is short and
easy to remember, so you can edit it in any plain text editor.R
in a script and copy the output into
another document.
rmarkdown
will first execute the R
code in
the document and paste its output in a plain markdown
file.
This is then rendered into the requested output format.R
code within the report makes it easy to
rerun the report when the data is updated.bookdown
is a useful tool for conducting open research and
open
science.INBOmd
inbo_rapport
, a template
for creating technical reports. The available output formats are
pdf
, epub
and html
.vlaanderen_rapport
and flanders_report
are
similar templates as inbo_rapport
. They use the corporate
identity of Flanders.
flanders_report
is available in English and French.inbo_slides
is a template for presentations. It has
three different pdf output formats
flanders_slides
is a similar template as
inbo_slides
. It uses the corporate identity of Flanders. Only the presentation
and handout versions are available.inbo_poster
is a template for A0 posters in pdf
format.INBOmd
requires a working installation of
XeLaTeX
. We highly recommend to use the
TinyTeX
. Close all open R sessions and start a fresh R
session. Execute the commands below. This will install
TinyTeX
on your machine. No admin rights are required.
Although TinyTeX
is a lightweight installation, it still is
several 100 MB large. Please note that TinyTeX
is not
compatible with MikTex
. Remove MikTex
before
installing TinyTeX
.
update.packages(ask = FALSE, checkBuilt = TRUE)
if (!"tinytex" %in% rownames(installed.packages())) {
install.packages("tinytex")
}
if (!tinytex:::is_tinytex()) {
tinytex::install_tinytex()
}
Once TinyTeX
is installed, you need to restart RStudio.
Then you can proceed with the installation of INBOmd
.
if (!"remotes" %in% rownames(installed.packages())) {
install.packages("remotes")
}
remotes::install_github("inbo/INBOmd", dependencies = TRUE)
tinytex::tlmgr_install(c(
"inconsolata", "times", "tex", "helvetic", "dvips"
))
tinytex::tlmgr_conf(
c("auxtrees", "add", system.file("local_tex", package = "INBOmd"))
)
tinytex::tlmgr_install(c("hyphen-dutch", "hyphen-french"))
INBOmd
INBOmd
version 0.6.0 introduces the interactive function
create_report()
. This function uses the same template as
the legacy way to start a new report. create_report()
has
the advantage that it interactively guides the user through the set-up.
It asks the user for the important parts of the meta data and fills that
information into the yaml header.
Once the report is near completion, use
add_report_numbers()
to append the DOI, report number,
depot number and other information to the meta data.
INBOmd
contains several templates which are available in
RStudio. Go in the menu to
File > New File > R Markdown
. A new window will open
were you select From template
. This will show a list of all
available templates. Select the template INBOmd
you want,
set the name of the new document and the base location. This will create
a new directory with the specified name in the base location. Each
report will reside in its own directory.
This new directory contains _bookdown.yml
and an
.Rmd
file with the same base name as the directory. We
highly recommend to rename the .Rmd
file to
index.Rmd
, see usage section in the bookdown book
for more details. Next you need to open _bookdown.yml
in
RStudio. Here you can configure the render settings of the report.
book_filename
defines the filename of the output.
output_dir
is the relative path for the output.
Finally, you need to activate the Build
pane in RStudio.
By far the easiest way to do this, is the create a new project. Go in
the menu to File > New Project
and choose in the pop-up
window Existing directory
. Note that this only works if
there is an index.Rmd
file at the root of the project.
Go the Build
pane and click on the
Build book
button. This button doubles as a drop-down menu.
In this menu you can select which output format will be rendered. By
default all output formats will be rendered. The report templates define
three output formats: pdf, html and e-pub. Rendering all three output
formats can take some time. Therefore it is best to select one output
format while working on the content of the document.
INBOmd
We maintain a separate collection of examples based on
INBOmd
. The rendered versions are available through https://inbomd-examples.netlify.app/. Visit https://github.com/inbo/inbomd_examples if you are
looking for the source code of these examples. Please note that the main
intention of these examples is to show what is available with
INBOmd
and how to code it. We will add links to real
documents based on INBOmd
as well.