search for: fontshape

Displaying 11 results from an estimated 11 matches for "fontshape".

2008 Jul 27
2
Colors in Sweave
...ering 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 pdf document, but extra spaces in...
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
...\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% \ifcase\pdfoutput\special{...
2009 Mar 17
1
Combining Sweave and fancyvrb
...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{Rcode:sum}. \begin{Rcode} > y <- c(53, 57, 66, 67, 72) # count data > n <- length(y) > s <- sum(y) \label...
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
...lse}} \ProcessOptions \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{Sinput}{Verbatim}{formatcom=\lstset{fancyvrb=true},commandchars=\\\{\}} \DefineVerbatimEnvironment{Soutput}{Verbatim}{} \DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl} \newenvironment{Schunk}{}{} \newcommand{\Sconcordance}[1]{% \ifx\pdfoutput\undefined%...
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]]
2012 May 25
1
knitr customization
...s 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 in the .Rnw file the lines \ifdefined\knitrout \renewenvironment{knitrout...
2004 Feb 19
1
latex problem with Sweave output file under Debian
...sion: 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. ... l.6 \DefineVerbatimEnvironment{S...
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
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
2010 May 13
1
Using Sweave in hostile environments
I'm trying to put together a poster using the LaTeX a0poster package and including some things from pstricks to get gradient shading, etc. The problem is that the default environments used by Sweave don't work where I need them. A simple code chunk like <<eval=FALSE>>= x <- 1 @ buried in a minipage within a psshadowbox gives the error Runaway argument? > x <- 1
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",