Learn R Programming

lazyWeave (version 2.1.3)

lazy.section: Open Sections in LaTeX Documents

Description

Provides the code to start a new section.

Usage

lazy.section(heading, type=c("section", "sub", "sub2", "chapter"), 
    ordered=FALSE, counter, counterSet=NULL, label=NULL)

Arguments

heading
The name of the section or subsection.
type
Type of section. "section" for section; "sub" for subsection; and "sub2" for subsubsection.
ordered
Logical. Determines if the section is numbered.
counter
Name of a the counter to be used for this section. When NULL, the value defaults to the counter corresponding to the type of section. See lazy.counter for more details about counter
counterSet
Value to which counter should be set. In other words, the number for this section (or similar division).
label
The label to be used with lazy.ref.

Examples

Run this code
lazy.write(
  lazy.file.start(),
  lazy.section("Section A", ordered=TRUE),
  lazy.text("Notice that Section A is numbered"),
  lazy.section("Subsection", type="sub", ordered=FALSE),
  lazy.text("But the subsection is not numbered"),
  lazy.file.end(),
  OutFile="Example-1.tex")
  
unlink("Example-1.tex")

Run the code above in your browser using DataLab