search for: xleftmargin

Displaying 5 results from an estimated 5 matches for "xleftmargin".

Did you mean: leftmargin
2012 May 25
1
knitr customization
...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 in the .Rnw file the lines \ifdef...
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
...ee letters in comment strings not stretched so much. Thanks -Frank \documentclass{article} \usepackage{listings,relsize} \lstloadlanguages{R} \newcommand{\lil}[1]{\lstinline|#1|} \begin{document} \lstset{language=R,basicstyle=\smaller,commentstyle=\rmfamily\smaller, showstringspaces=false,% xleftmargin=4ex,literate={<-}{{$\leftarrow$}}1 {~}{{$\sim$}}1} \lstset{escapeinside={(*}{*)}} % for (*\ref{ }*) inside lstlistings (S code) \begin{lstlisting} a <- b # this is a test line if(i==3) { # another line, for y^2 y <- 3^3 z <- 'this string' qqcat <- y ~ pol(x,2) } e...
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
2007 Jan 15
4
How to format R code in LaTex documents
Hi, I am planning on putting some R script in an appendix of a LaTex document. Can anyone recommend me a way of how to format it? Is there a way to keep all line breaks without having to insert \\ in every single line? Thank you! Benjamin
2010 Jan 09
4
parsing pdf files
I have a pdf file that I would like to parse into R: http://www.williams.edu/Registrar/geninfo/faculty.pdf For now, I open the file in Acrobat by hand, then save it "as text" and then use readLines(). That works fine but a) I am concerned that some information may be lost and b) I may be doing this a lot, so I would rather have R grab the information from the pdf file directly. So: is