[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog ./NEWS src/devices/grohtml/gr...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog ./NEWS src/devices/grohtml/gr... |
Date: |
Sat, 20 Nov 2004 04:33:48 -0500 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 04/11/20 09:27:57
Modified files:
. : ChangeLog NEWS
src/devices/grohtml: grohtml.man post-html.cpp
tmac : groff_www.man www.tmac
Log message:
* 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.
* 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.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.758&tr2=1.759&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/NEWS.diff?tr1=1.194&tr2=1.195&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/grohtml.man.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/post-html.cpp.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/groff_www.man.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/tmac/www.tmac.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.758 groff/ChangeLog:1.759
--- groff/ChangeLog:1.758 Wed Nov 17 23:37:14 2004
+++ groff/ChangeLog Sat Nov 20 09:27:57 2004
@@ -1,3 +1,25 @@
+2004-11-18 Werner LEMBERG <address@hidden>
+
+ * 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 <address@hidden>
+
+ * 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 <address@hidden>
* doc/Makefile.in (prepare_examples, webpage.html): Handle
Index: groff/NEWS
diff -u groff/NEWS:1.194 groff/NEWS:1.195
--- groff/NEWS:1.194 Tue Nov 16 12:48:49 2004
+++ groff/NEWS Sat Nov 20 09:27:57 2004
@@ -7,8 +7,9 @@
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 @@
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 @@
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.
Index: groff/src/devices/grohtml/grohtml.man
diff -u groff/src/devices/grohtml/grohtml.man:1.19
groff/src/devices/grohtml/grohtml.man:1.20
--- groff/src/devices/grohtml/grohtml.man:1.19 Sat Jul 3 12:46:58 2004
+++ groff/src/devices/grohtml/grohtml.man Sat Nov 20 09:27:57 2004
@@ -16,17 +16,23 @@
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 @@
.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 @@
.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 @@
.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 @@
.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 @@
.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 @@
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 @@
and
.B BI
mounted at font positions 1 to 4.
+.
+.
.SH DEPENDENCIES
.B grohtml
is dependent upon the png utilities
@@ -220,10 +264,14 @@
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@),
Index: groff/src/devices/grohtml/post-html.cpp
diff -u groff/src/devices/grohtml/post-html.cpp:1.12
groff/src/devices/grohtml/post-html.cpp:1.13
--- groff/src/devices/grohtml/post-html.cpp:1.12 Sat Oct 30 11:11:00 2004
+++ groff/src/devices/grohtml/post-html.cpp Sat Nov 20 09:27:57 2004
@@ -2489,23 +2489,23 @@
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 @@
/*
* 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_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();
Index: groff/tmac/groff_www.man
diff -u groff/tmac/groff_www.man:1.12 groff/tmac/groff_www.man:1.13
--- groff/tmac/groff_www.man:1.12 Wed Sep 29 06:49:38 2004
+++ groff/tmac/groff_www.man Sat Nov 20 09:27:57 2004
@@ -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 @@
\&.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 @@
.
.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 @@
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
Index: groff/tmac/www.tmac
diff -u groff/tmac/www.tmac:1.33 groff/tmac/www.tmac:1.34
--- groff/tmac/www.tmac:1.33 Tue Nov 16 12:48:50 2004
+++ groff/tmac/www.tmac Sat Nov 20 09:27:57 2004
@@ -270,17 +270,15 @@
.\" 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 @@
.\" 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 @@
.\" This is an internal macro.
.\"
.de HTML-TAG-NEXT
-. if \\n[www-html] \
-. taga html-tag:\\$*
+. taga html-tag:\\$*
..
.
.\" --------------------------------------------------------------------
@@ -674,20 +670,15 @@
.\" 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-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 @@
.\"
.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
..
.
- [Groff-commit] groff ./ChangeLog ./NEWS src/devices/grohtml/gr...,
Werner LEMBERG <=