search for: commentstyle

Displaying 7 results from an estimated 7 matches for "commentstyle".

Did you mean: comment_style
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
...s 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, for y^2 y <- 3^3...
2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
...\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 of tabs showstringspaces=false,% do not replace spaces in strings by a certain characte...
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, breakatwhitespace=false, title=\lstname,...
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
2009 Sep 03
1
Sweavelistingutil: Encoding problems
...ed}")) | @ | % ------------------------------------------------------------------------------- | \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 Linux, 32 bit. Thanks, Rasmus
2009 Jul 02
0
SweaveListingUtils --- a package for joining markup provided by TeX package 'listings' with Sweave
...nz and Moses (2007)) for use with Sweave (confer Leisch(2002a,b,2003). R-functions for setting R-markup in Sweave by means of 'listings' command \lstset are defined. (lstsetR, lstsetRd) R-Comments will automatically be set in a different style using \lstset- resp. lstsetR()- argument 'commentstyle'. Different coloring for input, output and comments is set by default. .Rd markup is defined as a new "sublanguage" of TeX for listings package. Perhaps most useful is a feature for automatic keyword registration to listings for markup: We dynamically create a list of such keywords...
2009 Jul 02
0
SweaveListingUtils --- a package for joining markup provided by TeX package 'listings' with Sweave
...nz and Moses (2007)) for use with Sweave (confer Leisch(2002a,b,2003). R-functions for setting R-markup in Sweave by means of 'listings' command \lstset are defined. (lstsetR, lstsetRd) R-Comments will automatically be set in a different style using \lstset- resp. lstsetR()- argument 'commentstyle'. Different coloring for input, output and comments is set by default. .Rd markup is defined as a new "sublanguage" of TeX for listings package. Perhaps most useful is a feature for automatic keyword registration to listings for markup: We dynamically create a list of such keywords...