
Convert to report-like PDF/LaTeX document in English (default) or German
Source:R/pdf_report.R
pdf_report.RdThis function serves as wrapper to pdf_document, with a
custom Pandoc LaTeX template and different default values for other arguments
(e.g., keep_tex = TRUE). This function as well as its helper function are
based on the rticles package that
provides templates for various journal articles. The Pandoc LaTeX template
and report layout are inspired by INWTlab's
ireports package.
Usage
pdf_report(
toc = TRUE,
toc_depth = 5,
number_sections = TRUE,
highlight = "kate",
font = "Helvetica",
citation_package = "natbib",
latex_engine = "xelatex",
...
)Arguments
- toc
logical;
TRUEto include a table of contents in the output.- toc_depth
integer; Depth of headers to include in table of contents. Default set to 5.
- number_sections
logical;
TRUEto number section headings.- highlight
character; syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate" (default here), "monochrome", "espresso", "zenburn", and "haddock". Pass
NULLto prevent syntax highlighting.- font
character; default font is "Helvetica"; for members of the UHH there is also the font "TheSansUHH" available. If you want to use another font, simply use the setting "other" and replace the .ttf files for regular, italic, bold, and bold-italic font with your own files (should be named EXACTLY as the template font files).
- citation_package
character; the LaTeX package to process "citations", "natbib" (default) or "biblatex". Use "none" if neither package is to be used.
- latex_engine
character; LaTeX engine for producing PDF output. Options are "pdflatex", "lualatex", and "xelatex" (default).
- ...
Further arguments passed to
pdf_document.
Value
R Markdown output format to pass to render
Details
Possible arguments for the YAML header are:
titleTitle of the manuscript.authorCharacter of single or multiple author(s).dateThe date (automatically set).fontsizeThe font size for the body text (default is 11pt).germanIf option is set to 'true', the table and figure caption as well as the abstract and reference header will be in German; default is 'false' (i.e., English).linkcolor,filecolor,citecolor,urlcolorColors for internal links (incl. ToC), external links, citation links, and linked URLs.classoptionOptions of thearticleclass.bibliographyPath to the bibliography file to use for references (BibTeX .bib file). This template uses the bibliography-related package natbib. The current file includes 3 dummy references; either insert your references into this file or replace the file with your own.bibliographystyleThe style is provided in the bibstyle.bst file, which adopts the SAGE Harvard reference style. Just leave the file as it is.header-includesCustom additions to the header, before the\begin{document}statement.include-afterFor including additional LaTeX code before the\end{document}statement.