[R] long captions -- new issue
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Apr 12 08:25:02 CEST 2006
On Wed, 12 Apr 2006, Brian Quinif wrote:
> I have found out that the way to have a break apart a long caption in
> the way that one desires is to have a short caption for use in the
> list of tables that is not broken with \\
> I can manually adjust the LaTeX output from the Hmisc function latex()
> to get the tables how I want them. However, I would like to automate
> the creation of these tables.
> Inside the latex() function, I tried this:
> caption='Estimated HOPE Effects on \\ Typical First-Year Students, 1990/1995 \\
> (Robust Std. Errors in Parentheses)',
> caption.lot='HOPE Effects on Typical First-Year Students'
> The resulting latex output however, turns the "\\" into "\", which
> will not create the line breaks that I want.
> How can I remedy this?
You inserted \ not \\ ! (Remember that R character strings use C-style
escapes: see e.g. ?Quotes.) Use "\\\\" to insert \\
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help