[R] preformatted and '#' in manual pages

Gábor Csárdi csardi at rmki.kfki.hu
Wed Sep 30 23:25:20 CEST 2009


On Wed, Sep 30, 2009 at 10:51 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 9/29/2009 7:31 AM, Gábor Csárdi wrote:
>>
>> Uwe, thanks, but this does not help, I still get:
>>
>> LaTeX errors when creating PDF version.
>> This typically indicates Rd problems.
>> LaTeX errors found:
>> ! You can't use `macro parameter character #' in vertical mode.
>> <argument> ...ike the following: \begin {alltt} ##
>>                                                   vertex1name vertex2name
>> [...
>> l.9051 listed one per line on subsequent lines.}
>>
>> * checking PDF version of manual without index ... ERROR
>>
>> In fact, I added the '\' after the package check failed, but it made
>> no visible difference.
>>
>> Best,
>> Gabor
>
>
> I think this is an inconsistency between LaTeX versions.  On my system, the
> version with no \ on the # works fine, and the documentation for alltt (the
> LaTeX environment used for \preformatted) says it should.
>
> However, R 2.9.2 did add an escape on the #, and that also works fine on my
> system, so I'm going to get R 2.10.0 to add the backslash again. Hopefully
> this will fix things on your system, leave them okay on mine, and not break
> someone else's.

Yep, this sound good, thanks for the help. Btw. it is the LaTeX
version on the windows build service server that gives the error
messages, I haven't tried 2.10.0 on my Linux box yet.

Best,
Gabor

> Duncan Murdoch
>
>> 2009/9/29 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
>>>
>>> From Writing R Extensions:
>>>
>>> "‘#’, ‘_’ and ‘&’ must not be escaped."
>>>
>>> Uwe Ligges
>>>
>>>
>>>
>>>
>>>
>>> Gábor Csárdi wrote:
>>>>
>>>> Dear All,
>>>>
>>>> I have the following in a .Rd file:
>>>> ...
>>>>     human readable (not binary) format. The format itself is like
>>>>     the following:
>>>>     \preformatted{
>>>>       \# vertex1name
>>>>       vertex2name [optionalWeight]
>>>>       vertex3name [optionalWeight]
>>>>     }
>>>>     Here, the first vertex of an edge is preceded with a pound sign
>>>> ...
>>>>
>>>> and it is fine with R 2.9.2, but fails on R-devel, when building the
>>>> PDF version of the manual:
>>>> ...
>>>> * checking PDF version of manual ... WARNING
>>>> LaTeX errors when creating PDF version.
>>>> This typically indicates Rd problems.
>>>> LaTeX errors found:
>>>> ! You can't use `macro parameter character #' in vertical mode.
>>>> <argument> ...ike the following: \begin {alltt} ##
>>>>                                                  vertex1name vertex2name
>>>> [...
>>>> l.9051 listed one per line on subsequent lines.}
>>>>
>>>> * checking PDF version of manual without index ... ERROR
>>>>
>>>> To be precise, this is
>>>> * using R version 2.10.0 Under development (unstable) (2009-09-27
>>>> r49847)
>>>>
>>>> Is there a way to escape the '#' for LaTeX?
>>>>
>>>> Thanks,
>>>> Gabor
>>>>
>>>
>>
>>
>>
>
>



-- 
Gabor Csardi <Gabor.Csardi at unil.ch>     UNIL DGM




More information about the R-help mailing list