Re: [R] How to format R code in LaTex documents

From: John C Frain <frainj_at_gmail.com>
Date: Tue 16 Jan 2007 - 10:08:34 GMT

I often produce program listings in my LaTeX documents. I use the verbatim environment but use commands such as

\addtolength{\oddsidemargin}{-0.95in}
\addtolength{\evensidemargin}{-0.95in}

to widen the printed page so that I do not have to resort to line continuation characters. This method is simple and you can experiment with values other than 0.95in to find the value most appropriate to you

John

On 15/01/07, Benjamin Dickgiesser <dickgiesser@gmail.com> wrote:
>
> 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
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
John C Frain
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:frainj@tcd.ie
mailto:frainj@gmail.com

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue Jan 16 21:13:27 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 16 Jan 2007 - 10:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.