summaryrefslogtreecommitdiff
path: root/tmac/www.tmac
diff options
context:
space:
mode:
authorwl <wl>2004-10-13 07:24:45 +0000
committerwl <wl>2004-10-13 07:24:45 +0000
commit6830c4ce4f03f5ffc462c538e6968337c210ee29 (patch)
tree6e0a09f31a9e671ca4c36eb2402bb1634faef2b9 /tmac/www.tmac
parenta42979ea6d9e4adf68a62057fc276b01b0fe9f0c (diff)
downloadgroff-6830c4ce4f03f5ffc462c538e6968337c210ee29.tar.gz
* doc/groff.css: New file.
* doc/webpage.ms: Use `groff.css'. Other small fixes. * tmac/an-old.tmac (need_eo_h): New number register. (TH): Emit `.eo.tl' tag after title. (SH): Set `need_eo_h'. (an-trap): Handle `need_eo_h'. (an-do-tag): s/HTML-TAG-NS/HTML-TAG-NEXT/. * tmac/s.tmac (need_eo_h, need_eo_tl): New number registers. (TL): Always start diversion. Updated. (@AI): Always call `par@reset'. (@AB): Update code for -Thtml. (cov*tl-au-print): Handle -Thtml. (par@reset): Handle `need_eo_tl', `need_eo_h'. (@IP): Simplified. (@IT-html): Removed. (@SH): Set `need_eo_h' for -Thtml. (par@TL): s/HTML-TAG/HTMl-TAG-NS/. Set `need_eo_tl'. (@NH): s/HTML-TAG/HTMl-TAG-NS/. Set `need_eo_h' for -Thtml. (@EQ, @EN): Don't handle -Thtml specially. (par@load-init): Don't handle -Thtml specially. * tmac/www.tmac (www:paraspace): New macro. (HTML-NS, HTML-TAG-NS): Use new `tag' request. (HTML</p>, HTML-TAG-NEXT): New macros. (HnE): Emit tag `.eo.h' instead of break. (HR): s/HTML-NS/HTML/. (www-end-nowhere): End diversion only if `www-html' not set. Emit `.eo.tl' tag. (ULS, ULE): s|HTML|HTML</p>|. (LI): Call `www:paraspace'. (HEAD): New macro.
Diffstat (limited to 'tmac/www.tmac')
-rw-r--r--tmac/www.tmac66
1 files changed, 54 insertions, 12 deletions
diff --git a/tmac/www.tmac b/tmac/www.tmac
index a27ef7c2..0dd387af 100644
--- a/tmac/www.tmac
+++ b/tmac/www.tmac
@@ -104,6 +104,18 @@ www functionality. It should work with any macro set.
.\" --------------------------------------------------------------------
.
.\" --------------------------------------------------------------------
+.\" www:paraspace
+.\"
+.\" Space before paragraph. Use \n[PD] if it exists.
+.\"
+.nr www:pd 0.5v
+.de www:paraspace
+. ie r PD .sp \\n[PD]u
+. el .sp \\n[www:pd]u
+..
+.
+.\"
+.\" --------------------------------------------------------------------
.\" www:error (<test>...)
.\"
.\" Print error message
@@ -260,7 +272,17 @@ www functionality. It should work with any macro set.
.\"
.de HTML-NS
. if \\n[www-html] \
-. nop \X^html:\\$*^\c
+. 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>:\\$*^
+. \}
..
.\" --------------------------------------------------------------------
.\" HX n
@@ -403,9 +425,20 @@ www functionality. It should work with any macro set.
.\"
.de HTML-TAG-NS
. if \\n[www-html] \
-. nop \X^html-tag:\\$*^\c
+. tag html-tag:\\$*
..
.\" --------------------------------------------------------------------
+.\" HTML-TAG-NEXT
+.\"
+.\" When the troff state changes, emit a tag for grohtml (without a space)
+.\" This is an internal macro.
+.\"
+.de HTML-TAG-NEXT
+. if \\n[www-html] \
+. taga html-tag:\\$*
+..
+.
+.\" --------------------------------------------------------------------
.\" PIMG [-R|-L|-C] filename [width] [height]
.\"
.\" Include a png image. It will work for -Tps and -Thtml.
@@ -634,7 +667,7 @@ www functionality. It should work with any macro set.
.de HnE
. if (\\n[www-heading-no] == -1) \
. www-error "HnE found without a corresponding HnS"
-. br
+. HTML-TAG ".eo.h"
..
.\" --------------------------------------------------------------------
.\" LK
@@ -643,7 +676,7 @@ www functionality. It should work with any macro set.
.\" section/numbered headings at this position.
.\"
.de LK
-. HTML-TAG ".links"
+. HTML-TAG ".links"
..
.\" --------------------------------------------------------------------
.\" HR
@@ -653,7 +686,7 @@ www functionality. It should work with any macro set.
.de HR
. ie \\n[www-html] \{\
. ti 0
-. HTML-NS <hr>
+. HTML "<hr>"
. \}
. el \
. sp
@@ -671,7 +704,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
-. di
+. if !\\n[www-html] .di
+. HTML-TAG ".eo.tl"
..
.\" --------------------------------------------------------------------
.\" HTL
@@ -686,10 +720,8 @@ www functionality. It should work with any macro set.
.\"
.de HTL
. HTML-TAG ".html-tl"
-. if !\\n[www-html] \{\
-. di www-nowhere
-. it 2 www-end-nowhere
-. \}
+. if !\\n[www-html] .di www-nowhere
+. it 2 www-end-nowhere
..
.
.\" --------------------------------------------------------------------
@@ -725,7 +757,7 @@ www functionality. It should work with any macro set.
.de ULS
. www-push-level
. ie \\n[www-html] \
-. HTML "<ul>"
+. HTML</p> "<ul>"
. el \{\
. if (\\n[www-level] == 1) \
. nr www-depth \\n[.i]
@@ -739,7 +771,7 @@ www functionality. It should work with any macro set.
.\"
.de ULE
. ie \\n[www-html] \
-. HTML "</ul>"
+. HTML</p> "</ul>"
. el \{\
. nr www-depth -\w'\\*[www-level\\n[www-level]]'u
. in \\n[www-depth]u
@@ -755,6 +787,7 @@ www functionality. It should work with any macro set.
. ie \\n[www-html] \
. HTML "<li>"
. el \{\
+. www:paraspace
. in \\n[www-depth]u
. ti -\w'\\*[www-level\\n[www-level]]'u
. nop \\*[www-level\\n[www-level]]\c
@@ -890,6 +923,15 @@ www functionality. It should work with any macro set.
. HTML-TAG .job-name \\$1
..
.\" --------------------------------------------------------------------
+.\" HEAD
+.\"
+.\" Adds information to the <head> </head> section of the html
+.\" document
+.\" --------------------------------------------------------------------
+.de HEAD
+. HTML-TAG .head "\\$*"
+..
+.\" --------------------------------------------------------------------
.\" Final Setup
.\" --------------------------------------------------------------------
.