[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: Grohtml question/request
From: |
Gaius Mulley |
Subject: |
Re: [Groff] Re: Grohtml question/request |
Date: |
19 Oct 2004 10:19:46 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Larry Kollar <address@hidden> writes:
> I wrote:
>
> > How difficult would it be to extend .JOBNAME (or the associated -j
> > filename option) to split the output deeper than a level-1
> > heading?
> Never mind, I figured it out. Here's the patch. It creates (and
> documents) a new command line option for grohtml, -S level -- grohtml
> splits files when it hits a heading of the specified level, or any
> superior heading (that is, -S3 splits at .NH 1, .NH 2, and .NH 3).
excellent, useful..
>
> Index: src/devices/grohtml/grohtml.man
> ===================================================================
> RCS file: /cvsroot/groff/groff/src/devices/grohtml/grohtml.man,v
> retrieving revision 1.19
> diff -r1.19 grohtml.man
> 48a49
> > .OP \-S level
> 188c189,190
> < is the stem and all level one section headings start a new
> ---
> > is the stem and specified section headings
> > (default is level one) start a new
> 191a194,199
> > .BI \-S level
> > When splitting HTML output,
> > splits at the heading level (or higher)
> > defined by
> > .IR level .
> > .TP
> Index: src/devices/grohtml/post-html.cpp
> ===================================================================
> RCS file: /cvsroot/groff/groff/src/devices/grohtml/post-html.cpp,v
> retrieving revision 1.11
> diff -r1.11 post-html.cpp
> 87a88
> > static int split_level = 2; /* What
> heading level do we want to split at? */
> 2478c2479
> < if (header.header_level == 2) {
> ---
> > if (header.header_level >= 2 && header.header_level <=
> split_level) {
> 4815c4816
> < while ((c = getopt_long(argc, argv, "a:g:o:i:I:j:D:F:s:vbdhlrnp",
> long_options, NULL))
> ---
> > while ((c = getopt_long(argc, argv,
> "a:g:o:i:I:j:D:F:s:S:vbdhlrnp", long_options, NULL))
> 4873a4875,4877
> > case 'S':
> > split_level = atoi(optarg)+1;
> > break;
> Index: src/preproc/html/pre-html.cpp
> ===================================================================
> RCS file: /cvsroot/groff/groff/src/preproc/html/pre-html.cpp,v
> retrieving revision 1.12
> diff -r1.12 pre-html.cpp
> 1549c1549
> < "+a:g:o:i:I:j:D:F:s:vbdhlrnp", long_options,
> NULL))
> ---
> > "+a:g:o:i:I:j:D:F:s:S:vbdhlrnp",
> long_options, NULL))
Hi,
well done with the grohtml patch.
Gaius