Learn R Programming

latexpdf (version 0.1.8)

makePreamble: Make a Preamble for a LaTeX Document

Description

Makes a preamble for a LaTeX Document.

Usage

makePreamble(
  landscape = FALSE,
  wide = if (landscape) 279.4 else 215.9,
  long = if (landscape) 215.9 else 279.4,
  geoLeft = "1mm",
  geoRight = "1mm",
  geoTop = "1mm",
  geoBottom = "1mm",
  documentclass = command("documentclass", args = "article"),
  xcolorPackage = command("usepackage", options = list("dvipsnames", "svgnames",
    "table"), args = "xcolor"),
  geometryPackage = command("usepackage", options = list(left = geoLeft, top = geoTop,
    bottom = geoBottom, right = geoRight), args = "geometry"),
  geometry = command("geometry", args = list(paste0("papersize=", paste0("{", wide, "mm",
    ",", long, "mm}")))),
  multirow = command("usepackage", args = "multirow"),
  float = command("usepackage", args = "float"),
  longtable = command("usepackage", args = "longtable"),
  inputenc = command("usepackage", options = "utf8", args = "inputenc"),
  fontenc = command("usepackage", options = "T1", args = "fontenc"),
  morePreamble = NULL,
  ...
)

Value

character

Arguments

landscape

if TRUE, default orientation is `landscape' not `portrait'

wide

page width in mm

long

page lenth in mm

geoLeft

geometry package: left margin

geoRight

geometry package: right margin

geoTop

geometry package: top margin

geoBottom

geometry package: bottom margin

documentclass

document class command

xcolorPackage

xcolor package command

geometryPackage

geometry package command

geometry

geometry specification

multirow

multirow specification

float

float specification

longtable

longtable specification

inputenc

input encoding

fontenc

output encoding

morePreamble

additional preamble before beginning the document

...

ignored

Examples

Run this code
makePreamble()

Run the code above in your browser using DataLab