ReporteRs (version 0.7.2)

addTOC.bsdoc: Insert a table of contents into a bsdoc object

Description

Insert a table of contents into a bsdoc object.

Usage

## S3 method for class 'bsdoc':
addTOC(doc, ...)

Arguments

doc
Object of class bsdoc where table of content has to be added
...
further arguments, not used.

Value

  • an object of class bsdoc.

Details

The function do specify to add a table of contents on the right side of the content.

See Also

bsdoc, addTOC.bsdoc , docx, addTOC.docx

Examples

Run this code
doc = bsdoc( )

doc = addTitle( doc, 'Title 1', level = 1 )

doc = addTitle( doc, 'Title 2', level = 1 )

doc = addTitle( doc, 'Title 3', level = 1 )

doc = addTitle( doc, 'Title A', level = 2 )

doc = addTitle( doc, 'Title B', level = 2 )

doc = addTOC( doc )

writeDoc( doc, file = 'addTOC_example/example.html')

Run the code above in your browser using DataLab