lazy.file.start {lazyWeave}R Documentation

Initiate New LaTeX, HTML, or Markdown Files

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

packages

A character vector of additional LaTeX packages to use

counters

A character vector of additional counters to initialize

layout

LaTeX code for page layout. Remember to escape backslashes!

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 and markdow 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:

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, ...)

Author(s)

Benjamin Nutter

References

Ligatures: https://en.wikibooks.org/wiki/LaTeX/Text_Formatting#Ligatures

Examples


#* lazy.file.start does not currently work with markdown documents
#* First, we set the lazyReportFormat option to "latex"
orig_option <- getOption("lazyReportFormat")
options(lazyReportFormat="latex")
lazy.file.start(docClass="report", 
  packages=c("pslatex", "palatino", "avant"),
  title="Report Name", author="Your Name")
 
#* Return the original option setting
options(lazyReportFormat=orig_option)
  

[Package lazyWeave version 3.0.2 Index]