texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @-command for # in verbatim protection


From: Patrice Dumas
Subject: Re: @-command for # in verbatim protection
Date: Sun, 12 Feb 2012 00:58:52 +0100
User-agent: Mutt/1.4.2.2i

On Fri, Feb 10, 2012 at 04:21:10PM -0800, Karl Berry wrote:
> 
> So, in that case, how about if we say that #line is not recognized
> as such inside @verbatim?  After all, one would never want that in
> practice, since there's no way to mess with lines or files inside
> @verbatim, by definition.

Ok.

> I still think it is best for CPP_LINE_DIRECTIVES to be set by default.
> To reiterate my reasoning: the only manual which would ever have a
> problem are those which need to document a #line directive of their own.
> That is a minuscule number.  Whereas any document at all might like to
> preprocess with macros.

In fact, the # directive regexp matches a bit more since line is optional,
as well as the file name.  For instance in the perl documentation:

pcregrep '^(\s*)#(\s*(line)? (\d+)( "([^"]+)")?(\s+\d+)*\s*)$' *.pod

perlebcdic.pod: #                                         35       123      123 
     123      35       123
perlfunc.pod:    # 0         1          2
perlfunc.pod:    #  0         1          2      3            4
perlfunc.pod:    #  5          6          7            8       9         10
perlfunc.pod:    #  0    1    2     3     4    5     6     7     8
perlre.pod:    # 1            2         2  3        2     3     4  
perlsyn.pod:    # line 200 "bzzzt"
perlsyn.pod:    # line 200 "bzzzt"
perlsyn.pod:    # line 345 "goop"

Fortunately, all are in Verbatim blocks so not processed anymore.

> By the way, where in the Perl manuals is this the problematic #line
> example?  I'm not seeing it.

See above..

> Also, can you send me the actual Texinfo you are creating now for perl?
> I'd like to see it, and/or use it :).

I attached a script you can use to convert the perl documentation to Info
using in-source texi2any and pod2texi.

-- 
Pat

Attachment: convert_perl_doc_to_info.sh
Description: Bourne shell script


reply via email to

[Prev in Thread] Current Thread [Next in Thread]