search for: defineverbatimenviron

Displaying 14 results from an estimated 14 matches for "defineverbatimenviron".

2008 Jul 27
2
Colors in Sweave
Hi list, I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including: === \usepackage[usenames]{colors} \definecolor{darkred}{rgb}{0.545,0,0} \definecolor{midnightblue}{rgb}{0.098,0.098,0.439} \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}} \DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom={\color{darkred}}} \DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl,formatcom={\color{blue}}} === which works in the sense that colors do show up in the processed pd...
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
...s \RequirePackage{graphicx,fancyvrb} \IfFileExists{upquote.sty}{\RequirePackage{upquote}}{} \ifthenelse{\boolean{Sweave at gin}}{\setkeys{Gin}{width=0.8\textwidth}}{}% \ifthenelse{\boolean{Sweave at ae}}{% \RequirePackage[T1]{fontenc} \RequirePackage{ae} }{}% \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl} \DefineVerbatimEnvironment{Soutput}{Verbatim}{} \DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl} \newenvironment{Schunk}{}{} \newcommand{\Sconcordance}[1]{% \ifx\pdfoutput\undefined% \csname newcount\endcsname\pdfoutput\fi%...
2011 Mar 07
2
Sweave with scan()-ed data
...ome switch or option for Sweave that will make this work? Below is the slide in question in an executable example: \documentclass[dvipsnames,pdflatex,compress,beamer]{beamer} \usepackage{Sweave} \definecolor{Sinput}{rgb}{1,0,0} \definecolor{Scode}{rgb}{0,0,0.56} \definecolor{Soutput}{rgb}{0,0,1} \DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom={\color{Sinput}},fontsize=\footnotesize,baselinestretch=0.9} \DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom={\color{Soutput}},fontsize=\footnotesize,baselinestretch=0.85} \DefineVerbatimEnvironment{Scode}{Verbatim}{formatcom={\color{Scode}},fontsize=\small}...
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
...use of the commandchars argument. But when compiling with LaTeX (using attached test file) I get a LaTeX error (/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd) ! Missing \endcsname inserted. <to be read again> \global l.25 } else y <- 4 The line in question is \DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom=\lstset{fancyvrb=true},commandchars=\\\{\}} Can anyone give me a pointer to how to properly change Sweave.sty to allow it to use fancyvrb in this way? I am following the model in SweaveListingUtils for having Sweave use the listings package to do pretty-printing...
2012 May 25
1
knitr customization
...at I did not get yet. Maybe somebody on the list can help me. In my Sweave presentations I used a slanted font for the R input and a normal font for the output, both in a small font. I also indented everything by an extra 2em. All this was achieved by the following instructions in the .Rnw file: \DefineVerbatimEnvironment{Sinput}{Verbatim}{xleftmargin=2em, fontsize=\footnotesize, fontshape=sl} \DefineVerbatimEnvironment{Soutput}{Verbatim}{xleftmargin=2em, fontsize=\footnotesize} In order to get a similar result (with a tiny size instead of a footnote size, but that is not the point) with knitr I included...
2009 Mar 17
1
Combining Sweave and fancyvrb
...e to figure out how to do it. Maybe somebody can help me. The following is a sample Rnw file: the first part shows what I would like to get, the second what I tried but didn't work. \documentclass[12pt]{article} \usepackage{/usr/local/R-2.7.0-inst/share/texmf/Sweave} \usepackage{fancyvrb} \DefineVerbatimEnvironment{Rcode}{Verbatim}{% commentchar=@, frame=lines, label=\textrm{\bf R code}, numbers=left, framesep=10pt, fontshape=sl, commandchars=\\\{\}} \SweaveOpts{keep.source = TRUE} \begin{document} I would like to produce something like the following, but using Sweave. Note the label on line \ref{...
2011 Apr 15
1
Sweave and Slides (Beamer)
I'm posting this for two reasons: one is to see if anyone has a better way of solving the problem or suggestions for improving my existing approach; and the other is to show what I'm currently doing in case anyone else might find it useful. The background is that I've been using Sweave for several years now to produce class notes, and I sometimes include quite a lot of raw R input and
2010 Sep 24
1
tamaño de letra en Sweave
Hola a todos. Estoy utilizando Sweave para integrar mis análisis en documentos de latex. Alguien sabe como cambiar el tamaño de letra por defecto para el código y las salidas de R. Supongo que será especificando algo en el preámbulo, pero no sé como. Gracias. [[alternative HTML version deleted]]
2009 Apr 19
2
Sweave: Changing the background color, adding a border
Hi all, I am using Sweave to produce a document. Unfortunately, I have to print several copies and I can't print them in color. So I would like to change the way of printing the code. I would like to print the code in a box with a black borderline and a grey background (quite classic). Is it possible to do it by changing some Schunk options? Christophe
2004 Feb 19
1
latex problem with Sweave output file under Debian
...e X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! LaTeX Error: File `fancyvrb.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Undefined control sequence. l.6 \DefineVerbatimEnvironment {Sinput}{Verbatim}{fontshape=sl} ? ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ......
2009 Mar 13
1
How to combine xtable and minipage with Sweave ?
...------------------------------------- \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage{geometry} \usepackage{color, pdfcolmk} \usepackage[mediumqspace]{SIunits} \geometry{a4paper,left=1cm,right=1cm,top=1cm,bottom=1.5cm} \date{} \begin{document} \DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom = {\color[rgb]{0, 0, 0.56}}} \DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom = {\color[rgb]{0.56, 0, 0}}} \setkeys{Gin}{width=\textwidth} <<echo=FALSE, results=TEX>>= rg<-read.table(file="d:/RWork/rg.txt", sep=";", dec=&qu...
2005 Mar 18
4
Sweave/margin
Hi! I am currently using Sweave for writing my bachelor thesis - and I have a problem: I am using a LaTeX style (report) with quite big margin spaces. The Sweave generated LaTeX code "floats" into the margin - and it looks ugly. The text is blocked and fine... then there comes some flattering code running over the margin... and blocked text again. Considering the LaTeX output, I guess
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",
2009 Mar 14
1
multiple hypothesis testing
...]{article} > \usepackage[T1]{fontenc} > \usepackage[frenchb]{babel} > \usepackage{geometry} > \usepackage{color, pdfcolmk} > \usepackage[mediumqspace]{SIunits} > > > \geometry{a4paper,left=1cm,right=1cm,top=1cm,bottom=1.5cm} > \date{} > > \begin{document} > > \DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom = {\color[rgb]{0, 0, > 0.56}}} > \DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom = > {\color[rgb]{0.56, > 0, 0}}} > \setkeys{Gin}{width=\textwidth} > > <<echo=FALSE, results=tex>>= > rg<-read.table(file="d:/RWork/rg...