search for: documentclass

Displaying 20 results from an estimated 242 matches for "documentclass".

2008 Sep 06
2
Sweave and/or beamer issue
Dear Friends, I not sure whether this is an Sweave or a beamer problem. The Rnw file: \documentclass[compress,smaller]{beamer} %\documentclass{article} %\usepackage{beamerarticle} \usepackage{Sweave} \title{Psychophysics II} \date{September 9, 2008} \begin{document} \frame{ \begin{Schunk} \begin{Sinput} > ro <- 0.2 > c <- seq(from = -3, to = 4, by = 0.1) > fn <- 1 - pnorm(...
2008 Mar 19
4
Sweave does not parse \Sexpr{}
...blem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex perfectly fine but somehow only the \Sexpr{} tags are not parsed. This is an example .Rnw: \documentclass{article} \usepackage{Sweave} \begin{document} What is \Sexpr{3*3}? \end{document} And this is the resulting .tex: \documentclass{article} \usepackage{Sweave} \begin{document} What is \Sexpr{3*3}? \end{document} Can anybody give me a hint what's wrong? Many thanks, Werner Lesen Sie...
2012 Aug 21
2
Sweave: R chunk inside caption?
...caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks! Sweave document: \documentclass{article} \title {test} \author {me} \usepackage{Sweave} \begin {document} \maketitle \DeclareGraphicsExtensions{.pdf,.png} \begin {figure} <<label=fig1, echo=FALSE, fig=TRUE, pdf=false, png=true>>= plot(runif(100), runif(100)) @ \caption...
2010 Nov 07
1
Sweave: option keep.source=TRUE and package cacheSweave
Dear all, When I use the cacheSweave package together with the Sweave option keep.source = TRUE, all the LaTeX code before the Sweave code chunk is included in the TeX file to be compiled. For example, with the following Sweave file \documentclass[12pt]{article} \usepackage[nogin]{Sweave} % Sweave options \SweaveOpts{keep.source=TRUE, strip.white=TRUE, eps=FALSE, pdf=TRUE} \begin{document} Blabla. <<optionsR, results=hide>>= setCacheDir("./cache") library(MASS) ## just an example @ \end{document} I get th...
2006 Sep 20
2
Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)
Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2': \Sexpr{1 + 1} %% This line should NOT print '2': \Sexpr{1 + 1} \end{document} The \Sexpr in the second line is processed even though the line is commented. This results in the following .tex file content (in the case...
2006 Sep 20
2
Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)
Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2': \Sexpr{1 + 1} %% This line should NOT print '2': \Sexpr{1 + 1} \end{document} The \Sexpr in the second line is processed even though the line is commented. This results in the following .tex file content (in the case...
2005 Dec 27
2
off topic A4 paper
Dear R People: Please excuse the off topic question. What are the dimensions of A-4 Paper, please? Actually, the question should read, "how do I set up a LaTex file to fix A-4 paper, please?" Thanks much! Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodgess at gator.uhd.edu
2012 Aug 08
2
sweave problem with special danish characters
...put contains only NA's whenever my text contains special Danish characters like ø, ø and å. I have upgraded R from 2.13 to 2.15 and the scripts worked fine under R 2.13. Sweave("Test.Rnw", encoding = "utf8") texi2dvi("Test.tex", pdf = TRUE) %"Test.Rnw" \documentclass{article} \usepackage [danish]{babel} \usepackage[utf8]{inputenc} \begin{document} This is a test that works \end{document} %"Test.Rnw" \documentclass{article} \usepackage [danish]{babel} \usepackage[utf8]{inputenc} \begin{document} This doesn't æ ø å and pdf document only contains NA...
2004 Dec 20
3
Sweave and LaTeX beamer class
Hi, has anyonne experienced problems between the LaTeX beamer class and Sweave? The following code does not work properly: ################################# \documentclass{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{ngerman} \begin{document} \frame{ \frametitle{test} test <<>>= 1+1 @ } \end{document} ################################# Below is the error code: ################################# loading : Context Support...
2008 Feb 25
3
How to include the documentation of a function in a Sweave document?
...tation of an R function in an *.rnw document processed by Sweave. Because I'm sharing my *.rnw files with colleagues under Linux and Windows (I'm on Mac OS X), I would like a pure R solution. The naive approach doesn't work, because Sweaving this *.rnw file: -------- tmp.rnw -------- \documentclass{article} \begin{document} <<>>= ?plot @ \end{document} -------- tmp.rnw -------- yields the following LaTeX file on my platform (session info at the end): -------- tmp.tex -------- \documentclass{article} \usepackage{/Library/Frameworks/R.framework/Resources/share/texmf/Sweave} \begin...
2007 Oct 07
5
how to use \Sexpr{} with sweave
I'm trying to learn Sweave. So far things are going well with the chunks of code identified by << >>= But I'm having trouble with the in-line text use of \Sexpr. Here is a short example .Rnw file: \documentclass[12pt]{article} \usepackage[margin=1.25in]{geometry} \usepackage{graphicx} \usepackage{Sweave} \begin{document} <<test>>= pnorm(1) @ \Sexpr{2+6} \end{document} The .tex file that it yields contains \Sexpr{2+6} as its next-to-last line. \usepackage{Sweave} is in its preamble. Wh...
2010 Apr 12
1
Sweave and multiple figures from an R source file
Hi, I am trying to get figures from multiple source files in Sweave. My test file is as follows \documentclass{article} \usepackage{Sweave} \begin{document} \begin{section}{notitle} This is a simple Sweave test <<gethypergraphs_rhea,fig=TRUE,echo=F>>= source("./testfig.r") @ \\ End of the simple sweave test \end{section} \end{document} where testfig.r is as simple as plot(1:20) plo...
2010 Feb 24
4
R Graphics into Latex‏
Hi, I'm new in Latex and I'm trying to include an R chart into a Latex document. This is what I'm doing: 1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps 2) In Latex (using TexWorks on windows xp) : In the preambule: \documentclass[11pt]{article} \usepackage{graphicx} \begin{document} blah..blah…blah \begin{figure} \centering \includegraphics{C:/xxx/Density.eps} \label{fig:Density} \end{figure} --This is the Error Message I'm getting: LaTeX Warning: File `R:/MarsTH/Studies/Misc/LIA QA/R/Density.eps' not found on...
2010 Aug 19
1
texi2dvi: option "clean" also deletes the generated pdf file
...The problem becomes clear from the second example: on cleaning, texi2dvi also deletes the generated .pdf file. Is there a solution? Cheers, Marius ## Example 1: texi2dvi cleans fine, without deleting the generated .pdf require(tools) sink(file="myLaTeXFile1.tex") cat("\\documentclass{article}\n") cat("\\usepackage[T1]{fontenc}\n") cat("\\usepackage[english]{babel}\n") cat("\\usepackage{blindtext}\n") cat("\\begin{document}\n") cat("\\blindtext[10]\n") cat("\\e...
2014 Apr 05
1
Package vignettes share the same environment?
In a package 'vig' R CMD build vig (or tools::buildVignettes(dir="vig") with $ cat vig/vignettes/vig1.Rnw \documentclass{article} \begin{document} <<>>= x <- 1 @ \end{document} $ cat vig/vignettes/vig2.Rnw \documentclass{article} \begin{document} <<>>= x @ \end{document} produces vig2.pdf where x is defined with value 1 -- the vignettes share a build environment. This seems undesirable i...
2008 Feb 27
2
Sweave produces gibberish instead of apostrophe in pdf
...points on it). If I manually replace the apostrophes using the keyboard, I get a different looking apostrophe and the output is correct. I'm using Debian Linux (Lenny) with TexLive, Kile and R 2.6.1. This is a sample, the problem is in the lm output in the "Signif. codes" line: \documentclass[a4paper,10pt]{article} \title{Spam} \author{F. Bar} \begin{document} <<reg>>= n <- 50 x <- seq(1, n) a.true <- 3 b.true <- 1.5 y.true <- a.true + b.true * x s.true <- 17.3 y <- y.true + s.true * rnorm(n) out1 <- lm(y ~ x) summary(out1) @ \end{document} And the...
2023 Nov 17
1
Can someone please have a look at this query on stackoverflow?
...ackage rather than specifying options to the class: e.g. replace your current header: --- title: "Testing landscape and aspect ratio" output: pdf_document: number_sections: true classoption: - landscape - "aspectratio=169" header-includes: - \usepackage{dcolumn} documentclass: article geometry: margin=1.5cm --- with this one: --- title: "Testing landscape and aspect ratio" output: pdf_document: number_sections: true header-includes: - \usepackage{dcolumn} documentclass: article geometry: margin=1.5cm, paperwidth=24cm, paperheight=13.5cm --- Of c...
2002 Jan 27
5
EPS->LaTeX problem
Greetings- I have a strange problem displaying a graph from R (1.3.1, linux) in a LaTeX document of documentclass seminar. I'm using graphicx to include the file: \usepackage{graphicx} ... \resizebox{\textwidth}{\textheight}{\includegraphics{crime.eps}} When I do this, the entire slide (including the page number) is rotated 180 degrees. Any ideas why this happens? The graph was created using the synt...
2010 Aug 20
3
Has anyone used Sweave with the Beamer poster macro for Latex ?
...ake a poster in Latex using the beamer poster macro (http://www-i6.informatik.rwth-aachen.de/~dreuw/latexbeamerposter.php), and use Sweave to add in R output. This works fine for adding graphics and tables, but if I want to put code in, the file fails to build in Latex. My Rnw file looks like \documentclass[final,hyperref={pdfpagelabels=false}]{beamer} \mode<presentation> { \usetheme{Berlin} } \usepackage{sweave} \begin{document} \begin{frame} \begin{columns} \begin{column} \begin{block}{A Block} Some text <<label=sweave, include=TRUE, echo=TRUE>>= x...
2011 Nov 18
2
xtable and sweave: caption placement problem
Dear All I am running Sweave with xtable and want to put the caption placement on top. But this does not work. Any idea what is going wrong? Here is an example that runs properly with the exception of the caption placement in the pdf-file. \documentclass[11pt,a4paper]{article} \usepackage{Sweave} \begin{document} <<>>= x = runif(100, 1, 10) y = 2 + 3 * x + rnorm(100) @ <<echo=FALSE,results=tex>>= library(xtable) print(xtable(summary(lm(y~x)), align="rcccc", caption="Summary statistics for the r...