ReporteRs (version 0.7.1)

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 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
# NOT RUN {
#START_TAG_TEST
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')
#STOP_TAG_TEST
# }

Run the code above in your browser using DataCamp Workspace