Displaying 10 results from an estimated 10 matches for "ttfamily".
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,
ti...
2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
...ss{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 character
caption...
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 here rather...
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
...---------------------------------------------------------------
| \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 Jan 28
2
OT: Adding verbatim R code text into LaTeX documents: texttt; verb or url?
...erb is good, but it can hyphenate.
- Using \url is very good, but it:
* disappears my spaces; so for the above example, the spaces added for clarity are gone.
* Minor: I like my verbatim text a little smaller (\small size), and change the font size for verbatim using \def\verbatim at font{\small\ttfamily} but \url seems to ignore this and appears larger than if I used \text or \verb.
Also, using \url often adds line-breaks mid-variable at the dots (for example, splitting var.one to have "var." on one line, and "one" on the next). I'm not sure this is a problem or not; her...
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
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,%
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
2009 Jan 28
2
t.test in a loop
Hi All,
I've been having a little trouble with creating a loop that will run a a
series of t.tests for inspection,
Below is the code i've tried, and some checks i've looked at.
I've used the get(paste()) idea as i was told previously that the use of the
eval should try and be avoided.
I've run a single syntax to check that my systax is correct and works
without any problems