Learn R Programming

lazyWeave (version 2.2.0)

lazy.file.start: Start LaTeX Documents

Description

Write code to open a new LaTeX document with packages, classes, a title, and page settings.

Usage

lazy.file.start(docClass="article", packages=NULL, 
                counters=NULL, layout="", page="arabic", ligatures=TRUE,
                title=NULL, author=NULL, date="", initialize=TRUE)

Arguments

docClass
a character string giving a valid LaTeX document class. For example, article, slide, report, book.
layout
LaTeX code for page layout. Remember to escape backslashes!
packages
A character vector of additional LaTeX packages to use.
counters
A character vector of additional counters to initialize.
page
A character string denoting the page numbering style. Options are "arabic", "roman", "Roman", "alph", "Alph".
ligatures
Determines if ligatures are enabled. See the references for a link about ligatures.
title
A title for the document.
author
Author of the document.
date
Date to be printed on the title page
initialize
For HTML files and when TRUE, the function lazy.options is called and all of the counters are reset to 1. Font, family, and size defaults are also reset.

Details

Titles are only made when either title or author are not NULL. Packages automatically included are "xcolor", "graphicx", "colortbl", "float", "soul", "hyperref", "placeins", and "Sweave". Any user defined templates made in conjuction with lazyWeave must include these packages in order to use figures and underlined text. With page, the options produce the following: ll{ arabic Arabic numbers roman Lower case roman numerals (i, ii, iii, ...) Roman Upper case roman numerals (I, II, III, ...) alph Lower case alphabetic ordering (a, b, c, ...) Alph Upper case alphabetic ordering (A, B, C, ...) }

References

Ligatures: http://en.wikibooks.org/wiki/LaTeX/Formatting#Ligatures

Examples

Run this code
lazy.file.start(docClass="report", 
    packages=c("pslatex", "palatino", "avant"),
    title="Report Name", author="Your Name")

Run the code above in your browser using DataLab