[R-pkg-devel] Latex got me

Jim Lemon drjimlemon at gmail.com
Fri May 5 13:29:10 CEST 2017

Thanks Duncan. Your suggestion gave me an error message that I could
understand and fix it. It was a "Runaway argument" in the first line.
As I often say, a day without learning something is a day wasted.


On Fri, May 5, 2017 at 8:00 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 05/05/2017 5:47 AM, Jim Lemon wrote:
>> Hi,
>> In adding a contributed function to the plotrix package, I keep
>> getting a latex error:
>> * checking PDF version of manual ... WARNING
>> LaTeX errors when creating PDF version.
>> This typically indicates Rd problems.
>> LaTeX errors found:
>> ! File ended while scanning use of \HeaderA.
>> <inserted text>
>>                \par
>> <*> \input ./Rd2.tex
>> ! Emergency stop.
>> <*> \input ./Rd2.tex
>> *** (job aborted, no legal \end found)
>> !  ==> Fatal error occurred, no output PDF file produced!
>> * checking PDF version of manual without hyperrefs or index ... ERROR
>> * DONE
>> I thought it might be an errant character in the Rd file, and after
>> quite a bit of staring at a hex editor, I just retyped the whole
>> thing. Everything runs okay except for this error. The file ends with
>> the same line as many other Rd files in plotrix:
>> \keyword{misc}
>> and the last character is a line feed (0x0A). If I remove the function
>> and man page, the error goes away. Thanks to any Sherlock out there.
> You'll need to show us the source, but a guess based on "File ended while
> scanning use of \HeaderA." is that one of your titles or names contains
> characters that are confusing LaTeX.
> You can also try
> R CMD Rd2pdf --no-clean foo.Rd
> to see what LaTeX got produced from the foo.Rd man page.  That will likely
> contain an error if the full manual does.
> Duncan Murdoch

More information about the R-package-devel mailing list