diff options
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | NEWS | 20 | ||||
-rw-r--r-- | src/devices/grohtml/grohtml.man | 94 | ||||
-rw-r--r-- | src/devices/grohtml/post-html.cpp | 12 | ||||
-rw-r--r-- | tmac/groff_www.man | 24 | ||||
-rw-r--r-- | tmac/www.tmac | 31 |
6 files changed, 152 insertions, 51 deletions
@@ -1,3 +1,25 @@ +2004-11-18 Werner LEMBERG <wl@gnu.org> + + * tmac/www.tmac (HTML-NS, HTML-TAG-NS, HTML-TAG-NEXT): Simplified. + (HTML</p>): Minor clean-up. + + * tmac/groff_www.man: Updated. + + * src/devices/grohtml/grohtml.man: Revised and updated. + + * NEWS: Updated. + +2004-11-18 Gaius Mulley <gaius@glam.ac.uk> + + * src/devices/grohtml/post-html.cpp (html_printer::do_heading): + Fix space insertion. + (html_printer::do_links): Fix rules generation around automatic + heading links. + + * tmac/www.tmac (LK): Use HTML-TAG-NS. + (HR): Simplify. + No longer emit empty line for non-HTML devices. + 2004-11-17 Werner LEMBERG <wl@gnu.org> * doc/Makefile.in (prepare_examples, webpage.html): Handle @@ -7,8 +7,9 @@ VERSION 1.19.2 Troff ----- -o Analogously to the .ft and \f pair, two new requests `glyphcolor' and - `fillcolor' (which pair with \m and \M, respectively) have been added. +o Analogously to the .ft and \f pair, two new requests `gcolor' and + `fcolor' (which pair with \m and \M, respectively) have been added to + set the glyph and background colours. o A new read-only, string-valued register `.sty' returns the name of the current style. @@ -22,6 +23,14 @@ Pic o The `by' argument in a `for' loop can now be negative if it is additive. For the multiplicative case, it must be greater than zero. + +Grohtml +------- + +o This device driver has been raised to beta stage; its set of tags should + be stable now. + +o New command line option `-s' to set the base point size. Gxditview --------- @@ -80,6 +89,13 @@ o The SH macro in the ms package now accepts a numeric argument, to make heading size match that of NH with same argument value when the GROWPS/PSINCR feature is enabled. +o www.tmac: + + The HR macro no longer causes an empty line for non-HTML devices. + + A new macro `HEAD' has been added to directly add data to the + <head>...</head> block. + Please refer to the documentation of the ms package for other, minor improvements. diff --git a/src/devices/grohtml/grohtml.man b/src/devices/grohtml/grohtml.man index 8670b820..a3b04507 100644 --- a/src/devices/grohtml/grohtml.man +++ b/src/devices/grohtml/grohtml.man @@ -16,17 +16,23 @@ versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .. +. +. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp -.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP -.el .TP "\\$1" +. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +. el .TP "\\$1" .. +. +. .TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" . +. .SH NAME grohtml \- html driver for groff . +. .SH SYNOPSIS .nr a \n(.j .ad l @@ -34,22 +40,27 @@ grohtml \- html driver for groff .in +\w'\fBgrohtml 'u .ti \niu .B grohtml +. .de OP -.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" -.el .RB "[\ " "\\$1" "\ ]" +. ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +. el .RB "[\ " "\\$1" "\ ]" .. -.OP \-vhlrn +. +.OP \-vbphlrn .OP \-D dir .OP \-F dir -.OP \-i resolution +.OP \-i \%resolution .OP \-I \%image-stem .OP \-o \%image-vertical-offset +.OP \-j \%filename .OP \-a \%aa-text-bits -.OP \-a \%aa-graphic-bits +.OP \-g \%aa-graphic-bits +.OP \-s size .RI "[\ " files\|.\|.\|. "\ ]" .br .ad \na . +. .SH DESCRIPTION The .B grohtml @@ -84,13 +95,15 @@ using .BR groff 's .B \-P option. +. +. .SH OPTIONS .TP .BI \-a aa-text-bits Number of bits of antialiasing information to be used by .I text when generating png images. -The default is\~4 but legal values are 0, 1, 2, and\~4. +The default is\~4 but valid values are 0, 1, 2, and\~4. Note your version of .B gs needs to support the @@ -102,12 +115,13 @@ A value of\~0 stops .B grohtml from issuing antialiasing commands to .BR gs . +. .TP .BI \-g aa-graphic-bits Number of bits of antialiasing information to be used by .I graphics when generating png images. -The default is\~4 but legal values are 0, 1, 2, and\~4. +The default is\~4 but valid values are 0, 1, 2, and\~4. Note your version of .B gs needs to support the @@ -119,36 +133,55 @@ A value of\~0 stops .B grohtml from issuing antialiasing commands to .BR gs . +. .TP -.B -b +.B \-b Initialize the background color to white. +. .TP -.B -h -Generates section and number headings by using +.B \-h +Generate section and number headings by using .BR <B> .\|.\|. </B> and increasing the font size, rather than using the .BI <H n >\c \&.\|.\|.\c .BI </H n > tags. +. +.TP +.B \-l +Turn off the production of automatic section links at the top of the +document. +. .TP -.B -l -Turns off the production of automatic section links at the top of the document. +.B \-r +Turn off the automatic header and footer line (html rule). +. .TP -.B -r -Turns off the automatic header and footer line (html rule). +.B \-s size +Set the base point size of the source file. +Thereafter when this point size is used in the source it will correspond +to the html base size. +Every increase of two points in the source will yield a +.B <big> +tag, and conversely when a decrease of two points is seen a +.B <small> +tag is emitted. +. .TP -.B -n +.B \-n Generate simple heading anchors whenever a section/number heading is found. Without the option the anchor value is the textual heading. -This can cause problems when a heading contains a `?' on some browsers -(netscape). +This can cause problems when a heading contains a `?' on older versions of +some browsers (Netscape). This flag is automatically turned on if a heading contains an image. +. .TP -.B -p +.B \-p Display page rendering progress to stderr. .B grohtml only displays a page number when an image is required. +. .TP .BI \-F dir Prepend directory @@ -157,27 +190,34 @@ to the search path for font and device description files; .I name is the name of the device, usually .BR html . +. .TP .BI \-i resolution Select the resolution for all images. By default this is 100 pixels per inch. -Example: -i200 indicates 200 pixels per inch. +Example: +.B \-i200 +indicates 200 pixels per inch. +. .TP .BI \-I stem Determine the image stem name. If omitted grohtml uses -.BI grohtml- XXX +.BI \%grohtml- XXX .RI ( XXX is the process ID). +. .TP .BI \-o vertical-offset Specify the vertical offset of images in points. +. .TP .BI \-D dir Inform .B grohtml to place all image files into directory .IR dir . +. .TP .BI \-j filename Inform @@ -188,10 +228,12 @@ The is the stem and all level one section headings start a new file, named .IR filename-n.html . +. .TP .B \-v Print the version number. . +. .SH USAGE There are styles called .BR R , @@ -200,6 +242,8 @@ There are styles called and .B BI mounted at font positions 1 to 4. +. +. .SH DEPENDENCIES .B grohtml is dependent upon the png utilities @@ -220,10 +264,14 @@ from the package. Images are generated whenever a table, picture, equation or line is encountered. +. +. .SH BUGS .B Grohtml has been completely redesigned and rewritten. -It is still alpha code. +It is still beta code. +. +. .SH "SEE ALSO" .BR afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), diff --git a/src/devices/grohtml/post-html.cpp b/src/devices/grohtml/post-html.cpp index 648dab33..e464bfb6 100644 --- a/src/devices/grohtml/post-html.cpp +++ b/src/devices/grohtml/post-html.cpp @@ -2489,23 +2489,23 @@ void html_printer::determine_header_level (int level) void html_printer::do_heading (char *arg) { text_glob *g; - text_glob *l = 0; int level=atoi(arg); + int horiz; header.header_buffer.clear(); page_contents->glyphs.move_right(); if (! page_contents->glyphs.is_equal_to_head()) { g = page_contents->glyphs.get_data(); + horiz = g->minh; do { if (g->is_auto_img()) { string img=generate_img_src((char *)(g->text_string + 20)); if (! img.empty()) { simple_anchors = TRUE; // we cannot use full heading anchors with images - if (l != 0) + if (horiz < g->minh) header.header_buffer += " "; - l = g; header.header_buffer += img; } } @@ -2519,10 +2519,10 @@ void html_printer::do_heading (char *arg) /* * we ignore the other tag commands when constructing a heading */ - if (l != 0) + if (horiz < g->minh) header.header_buffer += " "; - l = g; + horiz = g->maxh; header.header_buffer += string(g->text_string, g->text_length); } page_contents->glyphs.move_right(); @@ -2827,7 +2827,7 @@ void html_printer::do_flush (void) void html_printer::do_links (void) { - current_paragraph->done_para(); + html.end_line(); // flush line auto_links = FALSE; /* from now on only emit under user request */ file_list.add_new_file(xtmpfile()); file_list.set_links_required(); diff --git a/tmac/groff_www.man b/tmac/groff_www.man index 503e03d6..ce203024 100644 --- a/tmac/groff_www.man +++ b/tmac/groff_www.man @@ -35,6 +35,8 @@ .SH NAME groff_www \- groff macros for authoring web pages .HR +. +. .SH SYNOPSIS .B "groff \-mwww" [ options ] @@ -81,6 +83,7 @@ Here is a summary of the functions found in this macro set. \&.HR produce a horizontal rule \&.NHR suppress automatic generation of rules. \&.HTL only generate HTML title +\&.HEAD add data to <head> block \&.ULS unorder list begin \&.ULE unorder list end \&.LI insert a list item @@ -378,7 +381,9 @@ those links can be seen right here. . .TP .B .HR -Generate a full-width horizontal rule. +Generate a full-width horizontal rule for +.BR \-Thtml . +No effect for all other devices. . .TP .B .NHR @@ -398,6 +403,23 @@ in the document. The macro terminates when a space or break is seen (.sp, .br). . .TP +.B .HEAD +Add arbitrary HTML data to the <head> block. +Ignored if not processed with +.BR \-Thtml . +Example: +.RS +.IP +.nf +.B ".HEAD" "\[dq]<link \[rs]" +.B " rel=\[dq]\[dq]icon\[dq]\[dq] \[rs]" +.B " type=\[dq]\[dq]image/png\[dq]\[dq] \[rs]" +.B " href=\[dq]\[dq]http://foo.org//bar.png\[dq]\[dq]/>\[dq]" +.fi +.ft P +.RE +. +.TP .B .HTML All text after this macro is treated as raw html. If the document is processed without diff --git a/tmac/www.tmac b/tmac/www.tmac index 5f1d491d..70a23797 100644 --- a/tmac/www.tmac +++ b/tmac/www.tmac @@ -270,17 +270,15 @@ www functionality. It should work with any macro set. .\" an auxiliary macro for HTML (without following space) .\" .de HTML-NS -. if \\n[www-html] \ -. tag "html:\\$* +. tag "html:\\$* .. .\" .\" emit a HTML tag after shutting down a (possibly open) paragraph .\" .de HTML</p> . if \\n[www-html] \{\ -. \" the following line makes the vertical mode leave, so to say -. nop \& -. nop \X^html</p>:\\$*^ +. \" the `\&' makes the vertical mode leave, so to say +. nop \&\X^html</p>:\\$*^ . \} .. .\" -------------------------------------------------------------------- @@ -422,8 +420,7 @@ www functionality. It should work with any macro set. .\" Emit a tag for grohtml (without a space). This is an internal macro. .\" .de HTML-TAG-NS -. if \\n[www-html] \ -. tag html-tag:\\$* +. tag html-tag:\\$* .. .\" -------------------------------------------------------------------- .\" HTML-TAG-NEXT @@ -432,8 +429,7 @@ www functionality. It should work with any macro set. .\" This is an internal macro. .\" .de HTML-TAG-NEXT -. if \\n[www-html] \ -. taga html-tag:\\$* +. taga html-tag:\\$* .. . .\" -------------------------------------------------------------------- @@ -674,20 +670,15 @@ www functionality. It should work with any macro set. .\" section/numbered headings at this position. .\" .de LK -. HTML-TAG ".links" +. HTML-TAG-NS ".links" .. .\" -------------------------------------------------------------------- .\" HR .\" -.\" Produce a horizontal line +.\" Produce a horizontal line. .\" .de HR -. ie \\n[www-html] \{\ -. ti 0 -. HTML "<hr>" -. \} -. el \ -. sp +. HTML-NS "<hr>" .. .\" -------------------------------------------------------------------- .\" NHR @@ -702,7 +693,8 @@ www functionality. It should work with any macro set. .\" www-end-nowhere - end of input trap called to finish diversion. .\" .de www-end-nowhere -. if !\\n[www-html] .di +. if !\\n[www-html] \ +. di . HTML-TAG ".eo.tl" .. .\" -------------------------------------------------------------------- @@ -718,7 +710,8 @@ www functionality. It should work with any macro set. .\" .de HTL . HTML-TAG ".html-tl" -. if !\\n[www-html] .di www-nowhere +. if !\\n[www-html] \ +. di www-nowhere . it 2 www-end-nowhere .. . |