[Rd] Rd and guillemots

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Fri Sep 16 22:04:03 CEST 2005


On 16-Sep-05 Ted Harding wrote:
> On 16-Sep-05 Duncan Murdoch wrote:
>> Yes, this is the tex that gets output:
>> 
>> \code{mlazy( <{}<objname1>{}>, <<objname2>>, <<etc>>)}
>> 
>> This seems to happen in Rdconv.pm, around here:
>> 
>>      ## avoid conversion to guillemots
>>      $c =~ s/<</<\{\}</;
>>      $c =~ s/>>/>\{\}>/;
>> 
>> 
>> But I don't know enough Perl syntax to tell it to replace all << by 
>> <{}<, instead of just the first.  (I would have guessed appending a g 
>> would work, but didn't in a quick test, i.e. $c =~ s/<</<\{\}</g;
>> didn't work.)
>> 
>> Duncan Murdoch
> 
> Perl is overkill -- by a long way!
> 
> echo "{mlazy( <<objname1>>, <<objname2>>, <<etc>>)}" |
>   sed 's/<</<{}</g;s/>>/>{}>/g'
> 
> {mlazy( <{}<objname1>{}>, <{}<objname2>{}>, <{}<etc>{}>)}
> 
> Cheers,
> Ted.

Sorry, Duncan -- I misread the role of Perl in your mail.

But the substitution string might also work in Perl ... ?

Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 16-Sep-05                                       Time: 21:03:58
------------------------------ XFMail ------------------------------



More information about the R-devel mailing list