lazy.toc: Table of Contents and Other Lists

Description Usage Arguments Details Value Author(s) Examples

Description

Designates the printing of a table of contents, list of figures, or list of tables. Also provides functionality to manually edit the contents of these lists

Usage

1
2
3
lazy.toc(type = c("contents", "figures", "tables"), add = FALSE,
  desc = "", withPage = TRUE, sec_unit = c("chapter", "section",
  "subsection", "subsubsection", "part"))

Arguments

type

Type of list to be printed or edited

add

Determines if the list is printed or if an entry is added to the list

desc

Only used when add=TRUE. Gives the descriptive text of the item being added to the list

withPage

Determines if the page number of the entry is printed in the table of contents. Only used when add=TRUE.

sec_unit

Specifies the format for the new entry. For instance, will the new entry in the table of contents appear as a chapter, section, or subsection. Used only when withPage=TRUE.

Details

The level of detail a table of contents maintains is determined by the counter tocdepth. In most cases, it is set to 3, giving chapter, section, and subsection. To include subsubsections, it would be necessary to include lazy.counter("tocdepth", value=4, fn="set"). Use value=5 to include paragraphs, and so forth.

Value

Returns a string that designating that the table of contents is to be written, or an item to be added to a list. This has no effect for HTML documents

Author(s)

Benjamin Nutter

Examples

1
2
3
4
lazy.toc()
lazy.toc("figures")
lazy.toc("tables", TRUE, "A brief description of the table")
lazy.toc("contents", TRUE, "Subsection 3", sec_unit="subsection")

lazyWeave documentation built on May 2, 2019, 12:35 p.m.