search for: basicstyl

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

Did you mean: basicstyle
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
...ave been using. Does anyone have a better way? In particular I would like to see 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, f...
2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
...ius ### Version 1 ################################################################## \documentclass{scrartcl} \usepackage[T1]{fontenc} \usepackage[american]{babel} \usepackage{graphicx} \usepackage{fancyvrb} \usepackage{listings} \lstset{% setup listings language=R,% set programming language basicstyle=\small,% basic font style keywordstyle=\bfseries,% keyword style commentstyle=\ttfamily\itshape,% comment style numbers=left,% display line numbers on the left side numberstyle=\scriptsize,% use small line numbers numbersep=10pt,% space between line numbers and code tabsize=3,% sizes...
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
2004 Apr 26
1
need settings for the listings package
...experimented with various settings for the text, but all look a bit ugly. This might be because I have no typographic experience ;-) I would really appreciate if people sent me the settings they use for the listings package (eg in the \usepackage line, or \lstset, I am thinking about choices for basicstyle, ... etc). I could experiment with lost of different settings, but I guess that some people who use listings have already come up with a style they like. I am printing in black and white (though color is possible, I just don't think it would add much, but color settings are welcome too). Th...
2008 Oct 17
1
R-code in Latex --- $ sign causes error
hi, here's what i have: \lstset{ basicstyle=\ttfamily, keywordstyle=\bfseries, showstringspaces=false, columns = fullflexible, mathescape = true, language=R } \begin{lstlisting} lst$val<-val \end{lstlisting} ./software.tex:16:Extra }, or forgotten \endgroup. lst$ the culprit here is the $ sign. thanks. ps: i'm posting...
2011 Nov 23
1
R-latex syntax highlighting?
Hello, Can anyone provide or point me to a good setup for the listings latex package that would produce nice R-syntax highlighting? I am using an example I found in internet for setting up listings like this: \lstset{ language=R, basicstyle=\scriptsize\ttfamily, commentstyle=\ttfamily\color{gray}, numbers=left, numberstyle=\ttfamily\color{red}\footnotesize, stepnumber=1, numbersep=5pt, backgroundcolor=\color{white}, showspaces=false, showstringspaces=false, showtabs=false, frame=single, tabsize=2, captionpos=b, breaklines=true, break...
2004 Oct 04
4
Off-Topic: LaTeX package listings
Hola! I ask here since I learnt from this list that the LaTeX package listings should be good for typesetting R code. I encountered one problem: \begin{lstlisting} X %*% V \end{lstlisting} in the output the * in %*% disappears! same with %/%, etc, the / disappears. Any ideas? Kjetil -- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. --
2009 Sep 03
1
Sweavelistingutil: Encoding problems
..."), | keywordstyles = c("\\bf\\color{blue}","\\bf\\color{red}")) | @ | % ------------------------------------------------------------------------------- | \lstdefinestyle{TeXstyle}{fancyvrb=true,escapechar=`,language=[LaTeX]TeX,% | basicstyle={\color{black}\small},% | keywordstyle={\bf\color{black}},% | commentstyle={\color{Rcommentcolor}\ttfamily\itshape},% | literate={<-}{<-}2{<<-}{<<-}2} `---- I use TexLive 2008, R 2.9.1 and I have updated all packages. I use Arch Li...
2006 Sep 17
2
Insert R code in LaTeX document
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible Url : https://stat.ethz.ch/pipermail/r-help/attachments/20060917/27772bd9/attachment.pl
2009 Jan 28
2
OT: Adding verbatim R code text into LaTeX documents: texttt; verb or url?
Hi all I use Sweave extensively to mix R and LaTeX, and often have R code appearing in my LaTeX document. Just a quick question then: What is the best way to add example of R commands into LaTeX in-line? (That is, not using Sweave.) For example, suppose I wish to place in my document this instruction: ...is done in R using the command \verb|lm( y ~ var.one + var.two )| as follows: I
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