groff
[Top][All Lists]
Advanced

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

Re: [Groff] Re: Grohtml question/request


From: Larry Kollar
Subject: Re: [Groff] Re: Grohtml question/request
Date: Tue, 19 Oct 2004 10:20:36 -0400


Werner LEMBERG wrote:
Never mind, I figured it out. Here's the patch. [...]

Thanks.  Please resend it with the diff option `-u' to get a patch
which can be reliably applied even if the code has changed slightly.
I'm waiting for Gaius's approval, then I can add it to the CVS.

No problem, re-diff'ed patch follows...

PS: Have you found a new home for utpbook?  What about a first
    release?

No, that's on my list to do though. The recent patches have been work-related, which is why they've gotten ahead of UTP. I started a press release, and hope
to finish it soon.

        Larry

Index: src/devices/grohtml/grohtml.man
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grohtml/grohtml.man,v
retrieving revision 1.19
diff -u -r1.19 grohtml.man
--- src/devices/grohtml/grohtml.man 3 Jul 2004 12:46:58 -0000 1.19
+++ src/devices/grohtml/grohtml.man     19 Oct 2004 14:15:45 -0000
@@ -46,6 +46,7 @@
 .OP \-o \%image-vertical-offset
 .OP \-a \%aa-text-bits
 .OP \-a \%aa-graphic-bits
+.OP \-S level
 .RI "[\ " files\|.\|.\|. "\ ]"
 .br
 .ad \na
@@ -185,10 +186,17 @@
 to split the html output into multiple files.
 The
 .I filename
-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
 file, named
 .IR filename-n.html .
 .TP
+.BI \-S level
+When splitting HTML output,
+splits at the heading level (or higher)
+defined by
+.IR level .
+.TP
 .B \-v
 Print the version number.
 .
Index: src/devices/grohtml/post-html.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/grohtml/post-html.cpp,v
retrieving revision 1.11
diff -u -r1.11 post-html.cpp
--- src/devices/grohtml/post-html.cpp 15 Oct 2004 05:08:35 -0000 1.11
+++ src/devices/grohtml/post-html.cpp   19 Oct 2004 14:16:00 -0000
@@ -85,6 +85,7 @@
/* heading? */ static int base_point_size = 0; /* which troff font size maps onto html */ /* size 3? */ +static int split_level = 2; /* What heading level do we want to split at? */ static string head_info; /* user supplied information to be placed */ /* into <head> </head> */

@@ -2475,7 +2476,7 @@
     }
   }
   header.header_level = level+1;
-  if (header.header_level == 2) {
+  if (header.header_level >= 2 && header.header_level <= split_level) {
     header.no_of_level_one_headings++;
     insert_split_file();
   }
@@ -4812,7 +4813,7 @@
     { "version", no_argument, 0, 'v' },
     { NULL, 0, 0, 0 }
   };
- 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))
         != EOF)
     switch(c) {
     case 'v':
@@ -4871,6 +4872,9 @@
     case 'n':
       simple_anchors = TRUE;
       break;
+    case 'S':
+      split_level = atoi(optarg)+1;
+      break;
     case CHAR_MAX + 1: // --help
       usage(stdout);
       exit(0);
Index: src/preproc/html/pre-html.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/html/pre-html.cpp,v
retrieving revision 1.12
diff -u -r1.12 pre-html.cpp
--- src/preproc/html/pre-html.cpp 12 Oct 2004 21:39:31 -0000 1.12
+++ src/preproc/html/pre-html.cpp       19 Oct 2004 14:16:12 -0000
@@ -1546,7 +1546,7 @@
     { NULL, 0, 0, 0 }
   };
   while ((c = getopt_long(argc, argv,
- "+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))
         != EOF)
     switch(c) {
     case 'v':


--
Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"
http://home.alltel.net/kollar/utp/





reply via email to

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