search for: deletekeywords

Displaying 3 results from an estimated 3 matches for "deletekeywords".

2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
...t;=}{{$\le$}}1{>=}{{$\ge$}}1{!=}{{$\neq$}}1{^}{{$^\wedge$}}1,% item to replace, text, length of chars alsoletter={.<-},% becomes a letter alsoother={$},% becomes other otherkeywords={!=, ~, $, *, \&, \%/\%, \%*\%, \%\%, <-, <<-, /},% other keywords deletekeywords={c}% remove keywords } \begin{document} \noindent Just some text; see Line \ref{foo}. \begin{lstlisting}[caption={A first example}, label=list:ex] x <- c(1, 3, 2) id <- function(x){ x # just a dummy (*\label{foo}*) } 3 <= 4 3 != 4 !TRUE y <- "foo" (pv <- sum(x*x^x)) y...
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
This is what I have 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,%
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