Debian Codegraph @

inst/misc/knitr-template.Rnw

raw
1 \documentclass{article}
2 \usepackage[sc]{mathpazo}
3 \renewcommand{\sfdefault}{lmss}
4 \renewcommand{\ttdefault}{lmtt}
5 \usepackage[T1]{fontenc}
6 \usepackage{geometry}
7 \geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
8 \setcounter{secnumdepth}{2}
9 \setcounter{tocdepth}{2}
10 \usepackage[unicode=true,pdfusetitle,
11 bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
12 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
13 {hyperref}
14 \hypersetup{
15 pdfstartview={XYZ null null 1}}
16
17 \makeatletter
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
19 \renewcommand{\textfraction}{0.05}
20 \renewcommand{\topfraction}{0.8}
21 \renewcommand{\bottomfraction}{0.8}
22 \renewcommand{\floatpagefraction}{0.75}
23
24 \makeatother
25
26 \begin{document}
27
28 <<setup,include=FALSE,cache=FALSE>>=
29 options(width=90)
30 knitr::opts_chunk$set(out.width = '.6\\linewidth')
31 .knitr.title = if (exists('.knitr.title')) paste('\\title{', .knitr.title, '}', sep = '') else ''
32 .knitr.author = if (nzchar(.knitr.title) && exists('.knitr.author')) {
33 paste('\\author{', .knitr.author, '%\n',
34 '\\thanks{This report is automatically generated with the R package \\textbf{knitr}
35 (version ', packageVersion('knitr'), ').}}', sep = '')
36 } else ''
37 @
38
39 \Sexpr{.knitr.title}
40
41 \Sexpr{.knitr.author}
42
43 \Sexpr{if (nzchar(.knitr.title)) '\\maketitle'}
44 The results below are generated from an R script.
45
46 <<%sCHUNK_LABEL_HERE>>=
47 @
48
49 The R session information (including the OS info, R version and all
50 packages used):
51
52 <<session-info, cache=FALSE>>=
53 sessionInfo()
54 Sys.time()
55 @
56 <<clean-up, include=FALSE>>=
57 rm(.knitr.author); rm(.knitr.author)
58 @
59
60 \end{document}