A collection of helper functions for easier sectioning of markdown documents. They take care that e.g. control commands for new lines ("\newline" or "<br>") are correctly positioned by adding "\n" before and after a structure.

.newPage(delim)

.header(level, text)

.section(level, text, delim)

Arguments

delim

character (required): Keyword specifying the delimiter insterted before the section. Usually "<br>" or "<hr>" for HTML and "\\newpage" for PDF reports.

level

integer (required): A non-negative integer specifying the section level.

text

character (optional): The comment text to be inserted in the section.

Value

Text output via cat.

Examples

.newPage("\\newpage")
#> \newpage #>
.header(1, "My Header")
#> # My Header #>
.section(2, "My Section", "<hr>")
#> #> #> <hr> #> #> ## My Section #>