Displaying 14 results from an estimated 14 matches for "lstset".
Did you mean:
lastset
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.
--
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,%
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)...
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
2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
...uggestions, comments, or improvements are welcome.
Cheers,
Marius
### 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
numbe...
2009 Jul 02
0
SweaveListingUtils --- a package for joining markup provided by TeX package 'listings' with Sweave
...s package.
Briefly, SweaveListingUtils provides utilities to make accessible
the markup commands provided by TeX package 'listings' (Heinz 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 listi...
2004 Apr 26
1
need settings for the listings package
...TeX using the listings package. I have
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 muc...
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...
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
...with LaTeX (using attached test file) I
get a LaTeX error
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd)
! Missing \endcsname inserted.
<to be read again>
\global
l.25 } else y <- 4
The line in question is
\DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom=\lstset{fancyvrb=true},commandchars=\\\{\}}
Can anyone give me a pointer to how to properly change Sweave.sty to
allow it to use fancyvrb in this way? I am following the model in
SweaveListingUtils for having Sweave use the listings package to do
pretty-printing.
Thanks very much
Frank
Sweavel.sty:...
2009 Jul 02
0
SweaveListingUtils --- a package for joining markup provided by TeX package 'listings' with Sweave
...s package.
Briefly, SweaveListingUtils provides utilities to make accessible
the markup commands provided by TeX package 'listings' (Heinz 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 listi...
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,...
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
2003 Apr 05
3
slides in linux R
Hello,
In S-Plus Windows you can transform graphics to Powerpoint very easily, in R Windows you can use enhanced metafiles (.emf) and Powerpoint almost as easy. Is there a simular way with R in Linux to transform to the presentation program in StarOffice or OpenOffice or are you stuck with the pdf device?
Fredrik Lundgren
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