From Ted.Harding at nessie.mcc.ac.uk  Fri Sep 16 22:04:03 2005
From: Ted.Harding at nessie.mcc.ac.uk ( (Ted Harding))
Date: Fri, 16 Sep 2005 21:04:03 +0100 (BST)
Subject: [Rd] Rd and guillemots
In-Reply-To: <XFMail.050916203438.Ted.Harding@nessie.mcc.ac.uk>
Message-ID: <XFMail.050916210403.Ted.Harding@nessie.mcc.ac.uk>

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 ------------------------------



[Rd] Rd and guillemots
 (Ted Harding