From maechler@stat.math.ethz.ch  Thu Nov  4 17:20:46 1999
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Thu, 4 Nov 1999 18:20:46 +0100 (MET)
Subject: bug in Rdconvlib.pl converting to latex (PR#311)
Message-ID: <199911041720.SAA04538@pubhealth.ku.dk>

>>>>> "Saikat" == Saikat DebRoy <saikat@stat.wisc.edu> writes:

>>>>> "maechler" == maechler  <maechler@stat.math.ethz.ch> writes:
>>>>> "Ray" == Ray Brownrigg <Ray.Brownrigg@mcs.vuw.ac.nz> writes:
    Ray> If .../<pkg>/man/ contains a filename beginning with [, such as
    Ray> [.datetimes, Rdconvlib.pl cannot convert that help file into
    Ray> latex at INSTALL time.  [Using --no-latex is a workaround.]

    maechler> Well, the bug is more that of documentation of what is
    maechler> allowed for *.Rd file names.

    Saikat> I do not think that the problem is with the file names here. It
    Saikat> occurs in line 1335 of Rdconvlib.pl (0.90.0 development
    Saikat> version). You can get around it by escaping the spacial
    Saikat> characters in $blocks{"name"}.

I see, sounds plausible.  We don't have  \name{..}s  with funny chars in
them till now (even though we do have \alias{}es).


    Saikat> The following patch does just that.

    Saikat> ============================================================
    Saikat> --- Rdconvlib.pl Thu Nov  4 07:45:11 1999
    Saikat> +++ Rdconvlib.pl Thu Nov  4 09:57:43 1999
    Saikat> @@ -1332,7 +1332,7 @@
    Saikat> print STDERR "rdoc2l: alias='$_', code2l(.)='$c', latex_c_a(.)='$a'\n"
    Saikat> if $debug;
    Saikat> printf latexout "\\alias\{%s\}\{%s\}\n", $a, $blocks{"name"}
    Saikat> -       unless /^$blocks{"name"}$/;
    Saikat> +       unless /^\Q$blocks{"name"}$/;
    Saikat> }
    Saikat> foreach (@keywords) {
    Saikat> printf latexout "\\keyword\{%s\}\{%s\}\n", $_, $blocks{"name"}

Good idea to use Perl's \Q feature,
but my  perl online help says

     \Q		quote regexp metacharacters till \E
					    -------
so, you probably should also add a delimiting \E,  shouldn't you ?

Thanks again, Saikat !

Martin

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


bug in Rdconvlib.pl converting to latex (PR#311)
maechler@stat.math.ethz.ch