summaryrefslogtreecommitdiff
path: root/tmac
diff options
context:
space:
mode:
authorwl <wl>2004-11-20 09:27:57 +0000
committerwl <wl>2004-11-20 09:27:57 +0000
commit8a1a0f5397a862caebebd597e90337321acd847b (patch)
treee49f139c3ee74ea7c550d08b57535d8f14f1f630 /tmac
parent36b1c7be0435b4d5d812d62bf9b19a2747e9ea80 (diff)
downloadgroff-8a1a0f5397a862caebebd597e90337321acd847b.tar.gz
* 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.
Diffstat (limited to 'tmac')
-rw-r--r--tmac/groff_www.man24
-rw-r--r--tmac/www.tmac31
2 files changed, 35 insertions, 20 deletions
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
..
.