Add a markdown text or file into an bsdoc object

Add markdown into a bsdoc object.

## S3 method for class 'bsdoc':
addMarkdown(doc, file, text, = textProperties(font.size =
  getOption("ReporteRs-fontsize")), = parProperties(text.align = "justify"), = parProperties( = 0, padding.bottom =
  0, shading.color = "#eeeeee"), = parProperties(shading.color = "#eeeeee"),
  hr.border = borderSolid(width = 2, color = "gray10"), ...)
Object of class bsdoc where markdown has to be added
markdown file. Not used if text is provided.
character vector. The markdown text to parse.
default textProperties object
default parProperties object
parProperties object used for blockquote blocks.
parProperties object used for code blocks.
borderProperties object used for horizontal rules.
further arguments, not used.

You can configure backtick rendering (single or double backtick) with options "ReporteRs-backtick-color" and "ReporteRs-backtick-shading-color".


  • an object of class bsdoc.

See Also

bsdoc, addMarkdown

  • addMarkdown.bsdoc
doc.filename = "addMarkdown_bsdoc/example.html"

# set default font size to 11
options( "ReporteRs-fontsize" = 11 )

doc = bsdoc( )
mkd = "# This is a title 1
This is a link to the [cran] ( 

This paragraph demonstrates note usage[^anote]. It also show an example of 
reference link like this one: [DaringFireball][1].

[^anote]: Here's a note with multiple blocks.

    This paragraph is indented and belongs to the previous footnote.
    This paragraph also belongs to the previous footnote. 
    In this way, multi-paragraph footnotes work like
    multi-paragraph list items.


    * This list item belongs to the previous footnote. 

## This is a title 1.1

Ex turba vero imae sortis et paupertinae in tabernis aliqui pernoctant 
vinariis, non nulli velariis umbraculorum theatralium latent, quae Campanam 
imitatus lasciviam Catulus in aedilitate sua suspendit omnium primus

Aut pugnaciter aleis certant turpi sono fragosis naribus introrsum reducto 
spiritu concrepantes; aut quod est studiorum omnium maximum ab ortu lucis 
ad vesperam sole fatiscunt vel pluviis, per minutias aurigarum equorumque 
praecipua vel delicta scrutantes.

Paragraphs must be separated by a blank line. Basic formatting of *italics* 
and **bold** is supported. This *can be **nested** like* so. Formatting 
of ``backtick`` is also 
# This is a title 2
## Ordered list

1. Item 1
2. A second item
3. Number 3

## Unordered list

* An item
* Another item
* Yet another item
# Code block
    x = rnorm( 1000 )
    plot( density( x ) )
You can also make `inline code` to add code into other things.
# Quote
> Here is a quote. Quotes are indented 
when used.
> > Subquotes are also supported.
# URLs
* A named link to [DaringFireball][1]. 
* Another named link to 
* Sometimes you just want a URL like 
# Miscellaneous
## Horizontal rule

A horizontal rule is a line that goes across the middle of the page.


It's sometimes useful for breaking things up.

## Images

This implementation does not support images yet. Use addImage or addPlot 


doc = addMarkdown( doc, text = mkd, = parProperties(text.align = "justify", 
		padding.left = 0) )

# Write the object
writeDoc( doc, file = doc.filename )
Documentation reproduced from package ReporteRs, version 0.7.7, License: GPL-3

Community examples

Looks like there are no examples yet.