Learn R Programming

lazyWeave (version 3.0.0)

lazy.text: Paragraphs in LaTeX

Description

Paragraphs in LaTeX

Usage

lazy.text(..., title = NULL, align = "left", italic = FALSE,
  bold = FALSE, underline = FALSE, sep = "", translate = TRUE, font,
  family, size)

Arguments

...
Text and other objects to be included in the paragraph
title
A title for the paragraph
align
alignment of the paragraph. Options are "left", "center", "right".
italic
Logical. Indicates if the text should be italicized
bold
Logical. Indicates if the text shoudl be bolded
underline
Logical. Indicates if the text should be underlined
sep
Character. Denotes the separation string for the items in ... when they are pasted together
translate
Toggles if inputs in x should be passed through latexTranslate. This should be set to FALSE if writing custom code.
font
HTML font for the paragraph. Defaults to the HTML option (see setHtmlOptions).
family
HTML font family for the paragraph. Defaults to the HTML option (see setHtmlOptions).
size
Text size of the paragraph. Defaults to the HTML option (see setHtmlOptions). May be an integer or a LaTeX size descriptor. See "Details" for options

Details

Write paragraphs in LaTeX code

Examples

Run this code
lazy.write(
  lazy.file.start(),
  lazy.text("Typically we want our paragraphs to be left
    justified.  This is often what we expect to see when reading."),
  lazy.text("However, we may also have occasions where we would
    like to center our text.  It's one of many ways we can make the
    words stand out on the page", align="center"),
  lazy.text("A more traditional way to make the text stand out might be
    to use bold text or italics, such as these", bold=TRUE, italic=TRUE),
  lazy.file.end(),
  OutFile="Example 1.tex")

unlink("Example 1.tex")

Run the code above in your browser using DataLab