Package 'INBOmd'

Title: Markdown Templates for INBO
Description: Several templates to generate reports, presentations and posters.
Authors: Thierry Onkelinx [aut, cre] (<https://orcid.org/0000-0001-8804-4216>, Research Institute for Nature and Forest (INBO)), Floris Vanderhaeghe [ctb] (<https://orcid.org/0000-0002-6378-6229>, Research Institute for Nature and Forest (INBO)), Els Lommelen [ctb] (<https://orcid.org/0000-0002-3481-5684>, Research Institute for Nature and Forest (INBO)), Research Institute for Nature and Forest (INBO) [cph, fnd]
Maintainer: Thierry Onkelinx <[email protected]>
License: GPL-3
Version: 0.6.3
Built: 2024-09-21 04:09:01 UTC
Source: https://github.com/inbo/inbomd

Help Index


Add an author to the a report

Description

This function will interactively add the information of an author from the local authors database.

Usage

add_author(path = ".")

Arguments

path

the path to the index.Rmd of the bookdown report.

See Also

Other utils: add_report_numbers(), check_dependencies(), column_start(), column_width(), cover_info(), create_report(), dyn_table(), references(), render_natbib(), validate_doi()


Add the report numbers to a bookdown report

Description

Add the report numbers to a bookdown report

Usage

add_report_numbers(
  path = ".",
  doi,
  year,
  reportnr,
  depotnr,
  photo,
  description,
  embargo = Sys.Date(),
  ordernr,
  copies,
  motivation,
  pages
)

Arguments

path

the path to the index.Rmd of the bookdown report.

doi

a string containing the DOI.

year

Publication year

reportnr

Report number assigned by the INBO library.

depotnr

Report number assigned by the INBO library.

photo

Link to an image to used on the cover.

description

Description of photo, including author information.

embargo

The earliest date at which the report can be made public on the INBO website. Defaults to today.

ordernr

Optional reference number specified by the client.

copies

Set the required number of copies in case you really need a printed version of the report. Omit in case you only require a digital version. Keep in mind that the INBO policy is to be "radically digital". Which implies to only print a report if it is mandatory.

motivation

Required motivation in case copies is set to a non-zero number.

pages

Number of pages of the report. Only required in case copies is set to a non-zero number.

See Also

Other utils: add_author(), check_dependencies(), column_start(), column_width(), cover_info(), create_report(), dyn_table(), references(), render_natbib(), validate_doi()


Check if the required dependencies of INBOmd are installed Missing dependencies will be installed automatically

Description

Check if the required dependencies of INBOmd are installed Missing dependencies will be installed automatically

Usage

check_dependencies()

See Also

Other utils: add_author(), add_report_numbers(), column_start(), column_width(), cover_info(), create_report(), dyn_table(), references(), render_natbib(), validate_doi()


Calculate the starting position of an A0 column

Description

Calculate the starting position of an A0 column

Usage

column_start(number = 3, start = 1, margin = 20, edge = 10)

Arguments

number

The desired number of columns with equal width.

start

the number of the column

margin

the horizontal distance between columns in mm.

edge

the width of the whitespace edge around the poster in mm.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_width(), cover_info(), create_report(), dyn_table(), references(), render_natbib(), validate_doi()


Calculate the width of an A0 column

Description

Calculate the width of an A0 column

Usage

column_width(number = 3, margin = 20, edge = 10)

Arguments

number

The desired number of columns with equal width.

margin

the horizontal distance between columns in mm.

edge

the width of the whitespace edge around the poster in mm.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), cover_info(), create_report(), dyn_table(), references(), render_natbib(), validate_doi()


Create a cover.txt from the YAML header

Description

You need to provide information to create the cover image and (optionally) print the report. Add the information to the YAML header of the report. Then run this function to covert the information into a cover.txt and send that file along the other files to the review process.

Usage

cover_info(path = "index.Rmd")

Arguments

path

The path to the main .Rmd file.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), column_width(), create_report(), dyn_table(), references(), render_natbib(), validate_doi()


Create a template for an INBOmd bookdown report

Description

Create a template for an INBOmd bookdown report

Usage

create_report(path = ".", shortname)

Arguments

path

The folder in which to create the folder containing the report. Defaults to the current working directory.

shortname

The name of the report project. The location of the folder shortname depends on the content of path. When path is a subfolder of a git repository, it is changed to the root of that git repository. When path is a checklist::checklist project, you will find the new report at path/source/shortname. When path is a checklist::checklist package, you will find the new report at path/inst/shortname. Otherwise you will find the new report at path/shortname.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), column_width(), cover_info(), dyn_table(), references(), render_natbib(), validate_doi()


Use a different table style depending on the output format

Description

Usage

dyn_table(x, caption = NULL, rownames = FALSE, escape = TRUE, align, ...)

Arguments

x

the dataframe

caption

the table caption; a character vector or a tag object generated from htmltools::tags$caption()

rownames

TRUE (show row names) or FALSE (hide row names) or a character vector of row names; by default, the row names are displayed in the first column of the table if exist (not NULL)

escape

whether to escape HTML entities in the table: TRUE means to escape the whole table, and FALSE means not to escape it; alternatively, you can specify numeric column indices or column names to indicate which columns to escape, e.g. 1:5 (the first 5 columns), c(1, 3, 4), or c(-1, -3) (all columns except the first and third), or c('Species', 'Sepal.Length'); since the row names take the first column to display, you should add the numeric column indices by one when using rownames

align

Column alignment: a character vector consisting of 'l' (left), 'c' (center) and/or 'r' (right). By default or if align = NULL, numeric columns are right-aligned, and other columns are left-aligned. If length(align) == 1L, the string will be expanded to a vector of individual letters, e.g. 'clc' becomes c('c', 'l', 'c'), unless the output format is LaTeX.

...

Other arguments (see Examples and References).

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), column_width(), cover_info(), create_report(), references(), render_natbib(), validate_doi()


Style for e-book

Description

A version of bookdown::epub_book() with a different styling.

Usage

epub_book()

Available YAML headers options shared among output formats

  • title: the main title

  • subtitle: the optional subtitle

  • author: the authors formatted as indicated in the section below.

  • flandersfont: if set to TRUE, use the Flanders Art Sans font. When not set, or set to FALSE or empty, use the Calibri font.

  • style: Defaults to "INBO" when missing.

    • "INBO" for the INBO style.

    • "Vlaanderen" for the generic style of the Flemish Government in Dutch.

    • "Flanders" for the generic style of the Flemish Government in a language other than Dutch.

  • lang: the main language of the document as RFC 5646 tags. style "INBO" and "Vlaanderen" require "nl" as lang. style "Flanders" uses "en" as default and can use other languages (but not "nl").

    • "nl" for Dutch

    • "en" for English

    • "fr" for French

  • codesize: Relative size of R code compared to normal text. Defaults to "footnotesize". All options going from large to small are: "normalsize", "small", "footnotesize", "scriptsize", "tiny". "normalsize" implies the same size as normal text.

Formatting author information

Quotes are required when a part contains spaces. If the author doesn't have an ORCID, you can omit that line. However, note that the INBO policy is that all scientific personnel is required to obtain an ORCID from https://orcid.org. Add corresponding: true to the corresponding author.

  - name:
     given: "Authors first name"
     family: "Authors last name"
    email: "[email protected]"
    orcid: 0000-0002-1825-0097
    corresponding: true

Available YAML headers options specific for reports

Bold items are required when creating a public report. Omitting them results in an ugly warning in the rendered document. This is deliberate done so you can prepare the document without adding the information. But the ugly warnings nudges you to add the required information before publication.

  • public_report: A logical value indicating whether the report will be published or not. Setting public_report: FALSE will alter the colophon. Omitting public_report is equivalent to public_report: TRUE. An internal report can't have a DOI. Setting a DOI is equivalent to public_report: TRUE.

  • reviewer: names of the reviewers. Use the same syntax as for the authors.

  • year: year of publication. Used in the same places as shortauthor.

  • cover_photo: the relative path to the image you want on the cover.

  • cover_description: Description of the cover photo, including information on the author of the picture and license information.

  • cover the relative path to a pdf with the cover provided by the graphical designer. The first page of this pdf will be prepended to the pdf version of the report. It becomes the title page in the web and e-book version of the report. And also shows as a thumbnail in the floating table of content in the web version.

  • doi: the Digital Object Identifier of the report. Used in conjunction with shortauthor and year.

  • reportnr: Report number assigned by the INBO library.

  • ordernr: Optional reference number specified by the client.

  • depotnr: Report number assigned by the INBO library.

  • client: Optionally the name, address and website of the client.

  • client_logo: Optionally the logo of the client. Only used when client is set.

  • cooperation: Optionally the name, address and website of the organisation you collaborated with.

  • cooperation_logo: Optionally the logo of the collaborator. Only used when cooperation is set.

  • geraardsbergen: Set this to TRUE to add the address of INBO Geraardsbergen to the colophon. If not set or set to FALSE add the address of INBO Brussels.

  • watermark: an optional text to display as a watermark on the pdf or html. Note that omitting any of the required element will automatically generate a watermark with the text "DRAFT". Fill all required fields to get ride of this automatic watermark.

See Also

Other output: gitbook(), handouts(), minutes(), mission(), pdf_report(), poster(), slides()


Output format for a web version of the report

Description

A version of bookdown::gitbook() with a different styling.

Usage

gitbook(code_folding = c("none", "show", "hide"))

Arguments

code_folding

Enable document readers to toggle the display of R code chunks. Specify "none" to display all code chunks. Specify "hide" or "show" to hide or show all R code chunks by default, and let readers toggle the states on browsers. See the Code folding

Available YAML headers options shared among output formats

  • title: the main title

  • subtitle: the optional subtitle

  • author: the authors formatted as indicated in the section below.

  • flandersfont: if set to TRUE, use the Flanders Art Sans font. When not set, or set to FALSE or empty, use the Calibri font.

  • style: Defaults to "INBO" when missing.

    • "INBO" for the INBO style.

    • "Vlaanderen" for the generic style of the Flemish Government in Dutch.

    • "Flanders" for the generic style of the Flemish Government in a language other than Dutch.

  • lang: the main language of the document as RFC 5646 tags. style "INBO" and "Vlaanderen" require "nl" as lang. style "Flanders" uses "en" as default and can use other languages (but not "nl").

    • "nl" for Dutch

    • "en" for English

    • "fr" for French

  • codesize: Relative size of R code compared to normal text. Defaults to "footnotesize". All options going from large to small are: "normalsize", "small", "footnotesize", "scriptsize", "tiny". "normalsize" implies the same size as normal text.

Formatting author information

Quotes are required when a part contains spaces. If the author doesn't have an ORCID, you can omit that line. However, note that the INBO policy is that all scientific personnel is required to obtain an ORCID from https://orcid.org. Add corresponding: true to the corresponding author.

  - name:
     given: "Authors first name"
     family: "Authors last name"
    email: "[email protected]"
    orcid: 0000-0002-1825-0097
    corresponding: true

Available YAML headers options specific for reports

Bold items are required when creating a public report. Omitting them results in an ugly warning in the rendered document. This is deliberate done so you can prepare the document without adding the information. But the ugly warnings nudges you to add the required information before publication.

  • public_report: A logical value indicating whether the report will be published or not. Setting public_report: FALSE will alter the colophon. Omitting public_report is equivalent to public_report: TRUE. An internal report can't have a DOI. Setting a DOI is equivalent to public_report: TRUE.

  • reviewer: names of the reviewers. Use the same syntax as for the authors.

  • year: year of publication. Used in the same places as shortauthor.

  • cover_photo: the relative path to the image you want on the cover.

  • cover_description: Description of the cover photo, including information on the author of the picture and license information.

  • cover the relative path to a pdf with the cover provided by the graphical designer. The first page of this pdf will be prepended to the pdf version of the report. It becomes the title page in the web and e-book version of the report. And also shows as a thumbnail in the floating table of content in the web version.

  • doi: the Digital Object Identifier of the report. Used in conjunction with shortauthor and year.

  • reportnr: Report number assigned by the INBO library.

  • ordernr: Optional reference number specified by the client.

  • depotnr: Report number assigned by the INBO library.

  • client: Optionally the name, address and website of the client.

  • client_logo: Optionally the logo of the client. Only used when client is set.

  • cooperation: Optionally the name, address and website of the organisation you collaborated with.

  • cooperation_logo: Optionally the logo of the collaborator. Only used when cooperation is set.

  • geraardsbergen: Set this to TRUE to add the address of INBO Geraardsbergen to the colophon. If not set or set to FALSE add the address of INBO Brussels.

  • watermark: an optional text to display as a watermark on the pdf or html. Note that omitting any of the required element will automatically generate a watermark with the text "DRAFT". Fill all required fields to get ride of this automatic watermark.

Available YAML headers options specific for gitbook

  • github-repo: You can optionally set the github repo in organisation/repository format (e.g. inbo/INBOmd). This will add an 'edit' button to the source file on GitHub. Note that only people with write access can edit the files directly in the repository. Others can only edit the source code in a fork of the repository and suggest the changes through a pull request.

  • split_by: How to name the HTML output files from the book:

    • chapter+number means split the file by the first-level headers;

    • section+number means the second-level headers. For chapter+number and section+number, the HTML file names will be determined by the header ID's, e.g. the file name for the first chapter with a chapter title # Introduction will be ‘1-introduction.html’. Note that you need to place at least one level 1 heading in index.Rmd. Otherwise you don't get an index.html file.

See Also

Other output: epub_book(), handouts(), minutes(), mission(), pdf_report(), poster(), slides()


Use the handout version of slides with the INBO theme

Description

Similar to slides() except that you can't have progressive slides. And you can place multiple slides on a single page.

Usage

handouts(
  toc = TRUE,
  nup = c("8", "1", "1plus", "2", "3", "3plus", "4", "4plus", "6"),
  ...
)

Arguments

toc

display a table of content after the title slide

nup

Number of slides on a page. Defaults to 8. The 'plus' layouts leave blank space for recipients to make handwritten notes next to each slide. Note that the 2, ⁠3plus⁠, 4 and 6 layouts are intended for slides in the 4:3 aspect ratio, while the 3, ⁠4plus⁠ and 8 layouts are intended for widescreen slides like the 16:10 aspect ratio.

...

currently ignored

Available YAML headers options shared among output formats

  • title: the main title

  • subtitle: the optional subtitle

  • author: the authors formatted as indicated in the section below.

  • flandersfont: if set to TRUE, use the Flanders Art Sans font. When not set, or set to FALSE or empty, use the Calibri font.

  • style: Defaults to "INBO" when missing.

    • "INBO" for the INBO style.

    • "Vlaanderen" for the generic style of the Flemish Government in Dutch.

    • "Flanders" for the generic style of the Flemish Government in a language other than Dutch.

  • lang: the main language of the document as RFC 5646 tags. style "INBO" and "Vlaanderen" require "nl" as lang. style "Flanders" uses "en" as default and can use other languages (but not "nl").

    • "nl" for Dutch

    • "en" for English

    • "fr" for French

  • codesize: Relative size of R code compared to normal text. Defaults to "footnotesize". All options going from large to small are: "normalsize", "small", "footnotesize", "scriptsize", "tiny". "normalsize" implies the same size as normal text.

Formatting author information

Quotes are required when a part contains spaces. If the author doesn't have an ORCID, you can omit that line. However, note that the INBO policy is that all scientific personnel is required to obtain an ORCID from https://orcid.org. Add corresponding: true to the corresponding author.

  - name:
     given: "Authors first name"
     family: "Authors last name"
    email: "[email protected]"
    orcid: 0000-0002-1825-0097
    corresponding: true

Available YAML headers options specific for slides

  • location: optional text placed on the title slide below the (sub)title.

  • institute: optional text placed on the title slide below the author.

  • toc: add a slide with the table of content. Defaults to TRUE.

  • toc_name: slide title for the table of content. Defaults to Overzicht when missing.

  • cover_photo: the relative path to the image you want on the cover. When missing, you get a default picture.

  • cover_horizontal: When omitted, scale the cover_photo so that it covers the full page vertically. When set to any value but FALSE or empty, scale the cover_photo so that it covers the full page horizontally.

  • cover_offset: A measurement like ⁠8mm⁠ or ⁠-1.5cm⁠. Positive values move the cover_photo upwards on the title slide. Negative values move the cover_photo downwards.

  • cover_hoffset: Similar as cover_offset but moves cover_photo horizontally. Positive values move it to the right, negative values to the left.

  • aspect: the required aspect ratio for the slides. Defaults to "16:9". See the section below for a list of the available aspect ratios.

  • fontsize: Size of the normal text on the slides. Other elements are scaled accordingly. Defaults to "11pt". See the section Aspect_ratio for more details.

  • website: URL in the sidebar. Defaults to vlaanderen.be/inbo.

Aspect ratio

The table below lists the available aspect ratios and their "paper size". The main advantage of using a small “paper size” is that you can use all your normal fonts at their natural sizes. E.g. an 11pt font on a slide is as readable as an 11pt font on a A4 paper.

aspect ratio width height
16:9 1.78 160.0 mm 90 mm
16:10 1.60 160.0 mm 100 mm
14:9 1.56 140.0 mm 90 mm
3:2 1.50 135.0 mm 90 mm
1.4:1 1.41 148.5 mm 105 mm
4:3 1.33 128.0 mm 96 mm
5:4 1.25 125.0 mm 100 mm

See Also

Other output: epub_book(), gitbook(), minutes(), mission(), pdf_report(), poster(), slides()


Insert a markdown block These functions will add template chunks into your .Rmd file. A markdown block will be display as a frame with a title in a different background. There are 3 types of blocks: "block", "exampleblock" and "alertblock".

Description

Insert a markdown block These functions will add template chunks into your .Rmd file. A markdown block will be display as a frame with a title in a different background. There are 3 types of blocks: "block", "exampleblock" and "alertblock".

Usage

insert_block()

insert_exampleblock()

insert_alertblock()

Deprecated functions

Description

old function new function
ìnbo_ebook() epub_book()
ìnbo_handouts() handouts()
ìnbo_poster() poster()
ìnbo_rapport() pdf_report()
inbo_rapport_css() report_template()
ìnbo_slides() slides()
ìnbo_verslag() minutes()
report() pdf_report()

Usage

kolom_breedte(aantal = 3, marge = 20, witruimte = 10)

kolom_start(aantal = 3, start = 1, marge = 20, witruimte = 10)

ebook()

inbo_ebook()

inbo_handouts(
  toc = TRUE,
  nup = c("8", "1", "1plus", "2", "3", "3plus", "4", "4plus", "6"),
  ...
)

inbo_rapport_css(format = "html")

inbo_verslag(
  present = "",
  absent = "",
  chair = "",
  floatbarrier = c(NA, "section", "subsection", "subsubsection"),
  includes = NULL,
  codesize = c("footnotesize", "scriptsize", "tiny", "small", "normalsize"),
  lang = "dutch",
  keep_tex = FALSE,
  fig_crop = TRUE,
  pandoc_args = NULL,
  ...
)

inbo_zending(
  conference,
  conferencedate,
  conferenceplace,
  website = "",
  reportdate,
  colleagues = "",
  floatbarrier = c(NA, "section", "subsection", "subsubsection"),
  includes = NULL,
  codesize = c("footnotesize", "scriptsize", "tiny", "small", "normalsize"),
  lang = "dutch",
  keep_tex = FALSE,
  fig_crop = TRUE,
  pandoc_args = NULL,
  ...
)

inbo_rapport(fig_crop = "auto", includes = NULL, pandoc_args = NULL, ...)

report(fig_crop = "auto", includes = NULL, pandoc_args = NULL, ...)

inbo_poster(
  subtitle,
  codesize = c("footnotesize", "scriptsize", "tiny", "small", "normalsize"),
  lang = "english",
  email = "[email protected]",
  keep_tex = FALSE,
  fig_crop = TRUE,
  includes = NULL,
  pandoc_args = NULL,
  ...
)

inbo_slides(toc = TRUE, ...)

Arguments

aantal

The desired number of columns with equal width.

marge

the horizontal distance between columns in mm.

witruimte

the width of the whitespace edge around the poster in mm.

start

the number of the column

toc

display a table of content after the title slide

nup

Number of slides on a page. Defaults to 8. The 'plus' layouts leave blank space for recipients to make handwritten notes next to each slide. Note that the 2, ⁠3plus⁠, 4 and 6 layouts are intended for slides in the 4:3 aspect ratio, while the 3, ⁠4plus⁠ and 8 layouts are intended for widescreen slides like the 16:10 aspect ratio.

...

currently ignored

format

defunct

present

names of all persons who attended the meeting

absent

names of all persons who couldn't make it

chair

chair of the meeting

floatbarrier

where to place automatic float barriers.

includes

Named list of additional content to include within the document (typically created using the includes function).

codesize

relative font size for code

lang

main language

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

fig_crop

Whether to crop PDF figures with the command pdfcrop. This requires the tools pdfcrop and ghostscript to be installed. By default, fig_crop = TRUE if these two tools are available.

pandoc_args

Additional command line options to pass to pandoc

conference

the name of the conference or workshop

conferencedate

the date of the conference

conferenceplace

the location of the conference

website

the website of the conference

reportdate

the date of this report

colleagues

name of other colleagues attending the same conference

subtitle

An optional subtitle

email

The email address to display at the bottom. Defaults to "[email protected]"


Create a minutes of a meeting with the INBO corporate identity

Description

Create a minutes of a meeting with the INBO corporate identity

Usage

minutes(
  present = "",
  absent = "",
  chair = "",
  floatbarrier = c(NA, "section", "subsection", "subsubsection"),
  includes = NULL,
  codesize = c("footnotesize", "scriptsize", "tiny", "small", "normalsize"),
  lang = "dutch",
  keep_tex = FALSE,
  fig_crop = TRUE,
  pandoc_args = NULL,
  ...
)

Arguments

present

names of all persons who attended the meeting

absent

names of all persons who couldn't make it

chair

chair of the meeting

floatbarrier

where to place automatic float barriers.

includes

Named list of additional content to include within the document (typically created using the includes function).

codesize

relative font size for code

lang

main language

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

fig_crop

Whether to crop PDF figures with the command pdfcrop. This requires the tools pdfcrop and ghostscript to be installed. By default, fig_crop = TRUE if these two tools are available.

pandoc_args

Additional command line options to pass to pandoc

...

extra parameters: see details

Details

Available extra parameters:

  • hyphenation: the correct hyphenation for certain words

See Also

Other output: epub_book(), gitbook(), handouts(), mission(), pdf_report(), poster(), slides()


Create a mission report with the INBO corporate identity

Description

Create a mission report with the INBO corporate identity

Usage

mission(
  conference,
  conferencedate,
  conferenceplace,
  website = "",
  reportdate,
  colleagues = "",
  floatbarrier = c(NA, "section", "subsection", "subsubsection"),
  includes = NULL,
  codesize = c("footnotesize", "scriptsize", "tiny", "small", "normalsize"),
  lang = "dutch",
  keep_tex = FALSE,
  fig_crop = TRUE,
  pandoc_args = NULL,
  ...
)

Arguments

conference

the name of the conference or workshop

conferencedate

the date of the conference

conferenceplace

the location of the conference

website

the website of the conference

reportdate

the date of this report

colleagues

name of other colleagues attending the same conference

floatbarrier

where to place automatic float barriers.

includes

Named list of additional content to include within the document (typically created using the includes function).

codesize

relative font size for code

lang

main language

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

fig_crop

Whether to crop PDF figures with the command pdfcrop. This requires the tools pdfcrop and ghostscript to be installed. By default, fig_crop = TRUE if these two tools are available.

pandoc_args

Additional command line options to pass to pandoc

...

extra parameters: see details

Details

Available extra parameters:

  • hyphenation: the correct hyphenation for certain words

See Also

Other output: epub_book(), gitbook(), handouts(), minutes(), pdf_report(), poster(), slides()


Create a report with the Flemish corporate identity

Description

Create a report with the Flemish corporate identity

Usage

pdf_report(fig_crop = "auto", includes = NULL, pandoc_args = NULL, ...)

Arguments

fig_crop

Whether to crop PDF figures with the command pdfcrop. This requires the tools pdfcrop and ghostscript to be installed. By default, fig_crop = TRUE if these two tools are available.

includes

Named list of additional content to include within the document (typically created using the includes function).

pandoc_args

Additional command line options to pass to pandoc

...

currently ignored

Available YAML headers options shared among output formats

  • title: the main title

  • subtitle: the optional subtitle

  • author: the authors formatted as indicated in the section below.

  • flandersfont: if set to TRUE, use the Flanders Art Sans font. When not set, or set to FALSE or empty, use the Calibri font.

  • style: Defaults to "INBO" when missing.

    • "INBO" for the INBO style.

    • "Vlaanderen" for the generic style of the Flemish Government in Dutch.

    • "Flanders" for the generic style of the Flemish Government in a language other than Dutch.

  • lang: the main language of the document as RFC 5646 tags. style "INBO" and "Vlaanderen" require "nl" as lang. style "Flanders" uses "en" as default and can use other languages (but not "nl").

    • "nl" for Dutch

    • "en" for English

    • "fr" for French

  • codesize: Relative size of R code compared to normal text. Defaults to "footnotesize". All options going from large to small are: "normalsize", "small", "footnotesize", "scriptsize", "tiny". "normalsize" implies the same size as normal text.

Formatting author information

Quotes are required when a part contains spaces. If the author doesn't have an ORCID, you can omit that line. However, note that the INBO policy is that all scientific personnel is required to obtain an ORCID from https://orcid.org. Add corresponding: true to the corresponding author.

  - name:
     given: "Authors first name"
     family: "Authors last name"
    email: "[email protected]"
    orcid: 0000-0002-1825-0097
    corresponding: true

Available YAML headers options specific for reports

Bold items are required when creating a public report. Omitting them results in an ugly warning in the rendered document. This is deliberate done so you can prepare the document without adding the information. But the ugly warnings nudges you to add the required information before publication.

  • public_report: A logical value indicating whether the report will be published or not. Setting public_report: FALSE will alter the colophon. Omitting public_report is equivalent to public_report: TRUE. An internal report can't have a DOI. Setting a DOI is equivalent to public_report: TRUE.

  • reviewer: names of the reviewers. Use the same syntax as for the authors.

  • year: year of publication. Used in the same places as shortauthor.

  • cover_photo: the relative path to the image you want on the cover.

  • cover_description: Description of the cover photo, including information on the author of the picture and license information.

  • cover the relative path to a pdf with the cover provided by the graphical designer. The first page of this pdf will be prepended to the pdf version of the report. It becomes the title page in the web and e-book version of the report. And also shows as a thumbnail in the floating table of content in the web version.

  • doi: the Digital Object Identifier of the report. Used in conjunction with shortauthor and year.

  • reportnr: Report number assigned by the INBO library.

  • ordernr: Optional reference number specified by the client.

  • depotnr: Report number assigned by the INBO library.

  • client: Optionally the name, address and website of the client.

  • client_logo: Optionally the logo of the client. Only used when client is set.

  • cooperation: Optionally the name, address and website of the organisation you collaborated with.

  • cooperation_logo: Optionally the logo of the collaborator. Only used when cooperation is set.

  • geraardsbergen: Set this to TRUE to add the address of INBO Geraardsbergen to the colophon. If not set or set to FALSE add the address of INBO Brussels.

  • watermark: an optional text to display as a watermark on the pdf or html. Note that omitting any of the required element will automatically generate a watermark with the text "DRAFT". Fill all required fields to get ride of this automatic watermark.

Available YAML headers options specific for reports in pdf format

Bold items are required. Omitting them results in an ugly warning in the rendered document. This is deliberate done so you can prepare the document without adding the information. But the ugly warnings nudges you to add the required information before publication.

  • embargo: The date at which the report is made public on the INBO website.

  • print: section only required in case you need a number of printed copies. When set it requires the following sub items:

    • copies: the number of copies

    • motivation: motivate why you need printed copies as the INBO policy is to use only digital publications.

    • pages: the number of pages in the full document.

  • tocdepth: which level headers to display.

    • 0: up to chapters (⁠#⁠)

    • 1: up to section (⁠##⁠) default

    • 2: up to subsection (⁠###⁠)

  • lof: Adds a list of figures to the pdf after the table of content when set to TRUE. Omits the list of figures when missing or set to FALSE.

  • lot: Adds a list of tables to the pdf after the table of content and the list of figures when set to TRUE. Omits the list of tables when missing or set to FALSE.

  • hyphenation: An optional list of words with a specified hyphenation pattern. E.g. hyphenation: "fortran, ergo-no-mic" forces the word "fortran" to remain as a single word. "ergonomic" can be either the entire word, split into "ergo" and "nomic" or split into "ergono" and "mic".

  • floatbarrier: A float barrier forces to place all floating figures and tables before placing the remainder of the document. You can place them manually by setting ⁠\floatbarrier⁠. This option allows you to set the automatically before a heading. Defaults to NA (only float barriers before starting a new chapter ⁠#⁠). Options are "section" (before ⁠#⁠ and ⁠##⁠), "subsection" (before ⁠#⁠, ⁠##⁠ and ⁠###⁠) and "subsubsection" (before ⁠#⁠, ⁠##⁠, ⁠###⁠ and ⁠####⁠).

  • other_lang: the other languages you want to use in the pdf version. Available options are "nl", "en" and "fr" Defaults to all available languages except the main language.

Multiple languages in pdf

You can define some parts of the text to be in a different language than the main language (e.g. an abstract in a different language). This is currently limited to Dutch, English and French. Use ⁠\bdutch⁠ before and ⁠\edutch⁠ after the text in Dutch. Use ⁠\benglish⁠ before and ⁠\eenglish⁠ after the text in English. Use ⁠\bfrench⁠ before and ⁠\efrench⁠ after the text in French. The styles "INBO" and "Vlaanderen" have French and English as optional languages. The Flanders style has by default Dutch and French as optional languages.

Setting the language affects the hyphenation pattern and the names of items like figures, tables, table of contents, list of figures, list of tables, references, page numbers, ...

See Also

Other output: epub_book(), gitbook(), handouts(), minutes(), mission(), poster(), slides()


Create a poster with the INBO theme version 2015

Description

Create a poster with the INBO theme version 2015

Usage

poster(
  subtitle,
  codesize = c("footnotesize", "scriptsize", "tiny", "small", "normalsize"),
  lang = "english",
  email = "[email protected]",
  keep_tex = FALSE,
  fig_crop = TRUE,
  includes = NULL,
  pandoc_args = NULL,
  ...
)

Arguments

subtitle

An optional subtitle

codesize

relative font size for code

lang

The language of the document. Defaults to "english".

email

The email address to display at the bottom. Defaults to "[email protected]"

keep_tex

Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).

fig_crop

TRUE to automatically apply the pdfcrop utility (if available) to pdf figures

includes

Named list of additional content to include within the document (typically created using the includes function).

pandoc_args

Additional command line options to pass to pandoc.

...

extra parameters: see details

Details

Available extra parameters:

  • hyphenation: the correct hyphenation for certain words

  • flandersfont: Use the Flanders Art Sans font. Defaults to FALSE. Note that this requires the font to be present on the system.

  • ORCID: a list of authors. For each author there must a name and an ID. The ID is the author's ORCID ID , see https://orcid.org. This information will be displayed with QR code at the bottom of the poster.

  • DOI: a list of documents. For each document there must a name and an ID. The ID is the document's DOI, see https://doi.org. This information will be displayed with QR code at the bottom of the poster.

See Also

Other output: epub_book(), gitbook(), handouts(), minutes(), mission(), pdf_report(), slides()


Insert references at this position

Description

Insert references at this position

Usage

references(appendix = FALSE, part = FALSE)

Arguments

appendix

Chapters after the references become the appendix.

part

Include the appendix as a part (level 0) heading. Only relevant for pdf output.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), column_width(), cover_info(), create_report(), dyn_table(), render_natbib(), validate_doi()


Render a Markdown file with natbib bibliography

Description

Render a Markdown file with natbib bibliography

Usage

render_natbib(
  file,
  path = ".",
  encoding = "UTF-8",
  engine = c("xelatex", "pdflatex"),
  display = TRUE,
  keep = c("none", "all", "tex"),
  clean = TRUE
)

Arguments

file

the name of the Rmd file.

path

the path of the Rmd file.

encoding

the encoding of the Rmd file. Default to 'UTF-8'.

engine

the LaTeX engine the compile the document. Defaults to "xelatex".

display

open the pdf in a reader. Defaults to TRUE.

keep

keep intermediate files after successful compilation. Defaults to "none".

clean

TRUE to clean intermediate files created during rendering of the R markdown into tex.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), column_width(), cover_info(), create_report(), dyn_table(), references(), validate_doi()


pdf slides with an INBO or Flanders theme

Description

Returns an output format for bookdown::render_book().

Usage

slides(toc = TRUE, ...)

Arguments

toc

display a table of content after the title slide

...

currently ignored

Available YAML headers options shared among output formats

  • title: the main title

  • subtitle: the optional subtitle

  • author: the authors formatted as indicated in the section below.

  • flandersfont: if set to TRUE, use the Flanders Art Sans font. When not set, or set to FALSE or empty, use the Calibri font.

  • style: Defaults to "INBO" when missing.

    • "INBO" for the INBO style.

    • "Vlaanderen" for the generic style of the Flemish Government in Dutch.

    • "Flanders" for the generic style of the Flemish Government in a language other than Dutch.

  • lang: the main language of the document as RFC 5646 tags. style "INBO" and "Vlaanderen" require "nl" as lang. style "Flanders" uses "en" as default and can use other languages (but not "nl").

    • "nl" for Dutch

    • "en" for English

    • "fr" for French

  • codesize: Relative size of R code compared to normal text. Defaults to "footnotesize". All options going from large to small are: "normalsize", "small", "footnotesize", "scriptsize", "tiny". "normalsize" implies the same size as normal text.

Formatting author information

Quotes are required when a part contains spaces. If the author doesn't have an ORCID, you can omit that line. However, note that the INBO policy is that all scientific personnel is required to obtain an ORCID from https://orcid.org. Add corresponding: true to the corresponding author.

  - name:
     given: "Authors first name"
     family: "Authors last name"
    email: "[email protected]"
    orcid: 0000-0002-1825-0097
    corresponding: true

Available YAML headers options specific for slides

  • location: optional text placed on the title slide below the (sub)title.

  • institute: optional text placed on the title slide below the author.

  • toc: add a slide with the table of content. Defaults to TRUE.

  • toc_name: slide title for the table of content. Defaults to Overzicht when missing.

  • cover_photo: the relative path to the image you want on the cover. When missing, you get a default picture.

  • cover_horizontal: When omitted, scale the cover_photo so that it covers the full page vertically. When set to any value but FALSE or empty, scale the cover_photo so that it covers the full page horizontally.

  • cover_offset: A measurement like ⁠8mm⁠ or ⁠-1.5cm⁠. Positive values move the cover_photo upwards on the title slide. Negative values move the cover_photo downwards.

  • cover_hoffset: Similar as cover_offset but moves cover_photo horizontally. Positive values move it to the right, negative values to the left.

  • aspect: the required aspect ratio for the slides. Defaults to "16:9". See the section below for a list of the available aspect ratios.

  • fontsize: Size of the normal text on the slides. Other elements are scaled accordingly. Defaults to "11pt". See the section Aspect_ratio for more details.

  • website: URL in the sidebar. Defaults to vlaanderen.be/inbo.

Aspect ratio

The table below lists the available aspect ratios and their "paper size". The main advantage of using a small “paper size” is that you can use all your normal fonts at their natural sizes. E.g. an 11pt font on a slide is as readable as an 11pt font on a A4 paper.

aspect ratio width height
16:9 1.78 160.0 mm 90 mm
16:10 1.60 160.0 mm 100 mm
14:9 1.56 140.0 mm 90 mm
3:2 1.50 135.0 mm 90 mm
1.4:1 1.41 148.5 mm 105 mm
4:3 1.33 128.0 mm 96 mm
5:4 1.25 125.0 mm 100 mm

See Also

Other output: epub_book(), gitbook(), handouts(), minutes(), mission(), pdf_report(), poster()


validate a DOI

Description

Checks the format of a DOI. The format must obey https://www.doi.org/doi_handbook/2_Numbering.html#2.2 The DOI should the minimal version. Hence no ⁠doi:⁠, ⁠https://doi.org⁠ or other prefixes. An example of a minimal version is 10.21436/inbor.70809860. The part before the forward slash consists of two or three sets of digits separated by a dot. E.g. 10.21436 or ⁠10.21436.1⁠. The part after the forward slash consists either of only digits or of two sets of any character separated by a dot.

Usage

validate_doi(doi)

Arguments

doi

a string containing the DOI.

See Also

Other utils: add_author(), add_report_numbers(), check_dependencies(), column_start(), column_width(), cover_info(), create_report(), dyn_table(), references(), render_natbib()