From peter.ruckdeschel at web.de  Thu Nov  6 19:26:41 2008
From: peter.ruckdeschel at web.de (Peter Ruckdeschel)
Date: Thu, 06 Nov 2008 19:26:41 +0100
Subject: [Rd] Two minor escaping issues using \preformatted{....} in Rd
	format
Message-ID: <491336E1.6010702@web.de>

Hi r-devels,

I have two minor problems with special characters in Rd files when
used within a  \preformatted{} markup command:

------------------------------------------------------
1. issue: backslash + single brace
------------------------------------------------------

I would like to write "\\\}" to produce \} on output (documenting
the need to escape the brace once again before TeX-ing it);
this fails if there is no space between the second and third
backslash, but works if there is a space, but this produces
\ } then....

------------------------------------------------------
2. issue: backslash + percent sign
------------------------------------------------------

I would like to write "\\\\\%" to give a string argument \\% on
output; this is needed for documenting how to register special
operators to TeX package 'listings'.
Again this fails, while "\\\\ \%" works.

In neither case 1 or 2 the standard TeX trick to produce a
linebreak in the source without producing a space on output
helps, i.e.

\\%
\}

resp.
\\\\%
\%

both produce valid code [the resp. first % is read as a comment
sign] but also insert a non-intended space in the output.

Any idea how to circumvent this?
Best, Peter



[Rd] Two minor escaping issues using \preformatted{....} in Rd format
Peter Ruckdeschel