The R Project SVN R

Rev

Rev 6460 | Rev 7002 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6460 Rev 6994
Line 405... Line 405...
405
 
405
 
406
    my ($text, $cmd) = @_;
406
    my ($text, $cmd) = @_;
407
    my $loopcount = 0;
407
    my $loopcount = 0;
408
    while(checkloop($loopcount++, $text, "\\$cmd") &&  $text =~ /\\$cmd/){
408
    while(checkloop($loopcount++, $text, "\\$cmd") &&  $text =~ /\\$cmd/){
409
	my ($id, $arg)	= get_arguments($cmd, $text, 1);
409
	my ($id, $arg)	= get_arguments($cmd, $text, 1);
410
	$text =~ s/\\$cmd$id.*$id/$`$'/s;
410
	$text =~ s/\\$cmd$id.*$id//s;
411
    }
411
    }
412
    $text;
412
    $text;
413
}
413
}
414
 
414
 
415
 
415
 
Line 1562... Line 1562...
1562
sub latex_code_cmd {
1562
sub latex_code_cmd {
1563
 
1563
 
1564
    my $code = $_[0];
1564
    my $code = $_[0];
1565
 
1565
 
1566
    if($code =~ /[$LATEX_SPECIAL]/){
1566
    if($code =~ /[$LATEX_SPECIAL]/){
1567
	die("\nERROR: found `\@' in \\code{...\}\n")
1567
	warn("\nERROR: found `\@' in \\code{...\}\n")
1568
	  if $code =~ /@/;
1568
	  if $code =~ /@/;
1569
	die("\nERROR: found `HYPERLINK(' in \$code: '" . $code ."'\n")
1569
	warn("\nERROR: found `HYPERLINK(' in \$code: '" . $code ."'\n")
1570
	  if $code =~ /HYPERLINK\(/;
1570
	  if $code =~ /HYPERLINK\(/;
1571
	## till 0.63.1 
1571
	## till 0.63.1 
1572
	## $code = "\\verb@" . $code . "@";
1572
	## $code = "\\verb@" . $code . "@";
1573
	##          [Problem: Fails in new Methods.Rd: verb NOT in command arg!
1573
	##          [Problem: Fails in new Methods.Rd: verb NOT in command arg!
1574
	$code =~ s/[$LATEX_SPECIAL]/\\$&/go;# escape them (not the "bsl" )
1574
	$code =~ s/[$LATEX_SPECIAL]/\\$&/go;# escape them (not the "bsl" )