search for: escapeinside

Displaying 4 results from an estimated 4 matches for "escapeinside".

2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
...size,% 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 character captionpos=b,% positioning of the caption below breaklines=true,% automatic line breaking escapeinside={(*}{*)},% escaping to LaTeX fancyvrb=true,% verbatim code is typset by listings extendedchars=false,% prohibit extended chars (chars of codes 128--255) literate={"}{{\texttt{"}}}1{<-}{{$\leftarrow$}}1{<<-}{{$\twoheadleftarrow$}}1 {~}{{$\sim$}}1{&l...
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
...umentclass{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) } else y <- 4 \end{lstlisting} That was \lstinline|x <- 22| \lil{q <-...
2011 Nov 23
1
R-latex syntax highlighting?
...=\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, escapeinside={}, keywordstyle={}, morekeywords={} } But I know that using the color latex package it can look a lot nicer and I guess some people might have configured that before and are willing to share it? I'm also interested in the a similar problem best way to put R code with syntax highlighting into...
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