markdownHeader: Markdown headers

View source: R/markdownHeader.R

markdownHeaderR Documentation

Markdown headers

Description

Creates YAML headers for Markdown slides via pandoc

Usage

markdownHeader(
	title=NULL, 
	author=NULL,
	date=Pmisc::today(),
	biblatex=1,
	bibliotitle = 'References',
	bibliostyle = 'authoryear,backend=biber',
	biblatexoptions = c(
		maxbibnames=20,
		maxcitenames=2,doi='false',
		isbn='false',	
		giveninits='true',
		uniquelist='false'),
  numbersections=TRUE,
	beamer=FALSE,
	mathCommands=FALSE,
	subcaptionCommands = !beamer,
	crossrefYaml = system.file('src','crossref.yaml',
    package='Pmisc'),
  csl = system.file(
    'src','apa-no-doi-no-issue.csl', package='Pmisc'),
  css = system.file(
    'src','article.css', package='Pmisc'),
	...
)
today(...)
mathCommands
subcaptionCommands

Arguments

title

value for title

author

value for author field

date

value for date field

biblatex

uses the biblatex package in LaTeX

bibliotitle

title for references section

bibliostyle

style of bibliography

biblatexoptions

options for citations, passed to the biblatex package

numbersections

Put numbers in section headings.

beamer

Add commands intended for producing slides with LaTeX beamer.

mathCommands

Defines latex commands for var, E, tp, dens, and a few others.

subcaptionCommands

Enables use of the subcaption package with knitr.

crossrefYaml

metadatafile for pandoc-crossref

csl

file with format for citations

css

file with formats for html documents

...

Additional items for the header, such as header-includes, or for format when passed to today.

Details

Put this function in a code chunk at the start of

Value

A string containing the header. today() returns today's date

Examples

today()
cat(Pmisc::markdownHeader(
	title='my title',
	author = 'me',
	geometry='margin=1in',
	fontsize='12pt',
	headerincludes=c('\newcommand{\tp}{^{\textrm{T}}}')
))

Pmisc documentation built on Feb. 14, 2024, 3 a.m.