makePreamble: Make a Preamble for a LaTeX Document

Description Usage Arguments Value Examples

View source: R/document.R

Description

Makes a preamble for a LaTeX Document.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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("usenames", "dvispnames",
    "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,
  ...
)

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

Value

character

Examples

1

bergsmat/latexpdf documentation built on Jan. 16, 2022, 2:14 p.m.