diff options
author | gaius <gaius> | 2005-11-28 08:40:21 +0000 |
---|---|---|
committer | gaius <gaius> | 2005-11-28 08:40:21 +0000 |
commit | 67ffbefb3ac0fe267e48086b0cb3eaf600e69e62 (patch) | |
tree | c73cd888fc782683d3cd7b7c452aae12cfc624f2 /tmac | |
parent | 39a88aed140da462b23fe81a52f0175a8767b4c5 (diff) | |
download | groff-67ffbefb3ac0fe267e48086b0cb3eaf600e69e62.tar.gz |
* doc/Makefile.in: separate rule for webpage.html so that extra
command line options can be passed to grohtml.
* doc/groff.css: changed all margins to 0%.
* doc/webpage.ms: now uses new macros ALN, LNS and LNE
so that left navigation is exploited. Also updated webpage to
contain new sections on licences, mailing lists, cvs/ftp
access, groff dependencies and bug reports.
* tmac/groff_www.man: documented the new macros ALN, LNS and LNE.
* tmac/www.tmac: implemented the new macros ALN, LNS and LNE.
Diffstat (limited to 'tmac')
-rw-r--r-- | tmac/groff_www.man | 32 | ||||
-rw-r--r-- | tmac/www.tmac | 71 |
2 files changed, 103 insertions, 0 deletions
diff --git a/tmac/groff_www.man b/tmac/groff_www.man index e4b3f524..efc07e3e 100644 --- a/tmac/groff_www.man +++ b/tmac/groff_www.man @@ -97,6 +97,11 @@ Here is a summary of the functions found in this macro set. device driver \&.CDS code example begin \&.CDE code example end +\&.ALN place links on left of + main text. +\&.LNS start a new two column + table with links in the left. +\&.LNE end the two column table. .fi .PP Output of the @@ -480,6 +485,33 @@ Start displaying a code section in constant width font. .B ".CDE" End code display . +.TP +.B ".ALN [color] [percentage]" +Place section heading links automatically to the left of the main +text. The color argument is optional and if present indicates which +HTML background color is to be used under the links. +The optional percentage indicates the amount of width to devote to +displaying the links. The default values are #eeeeee and 30 +for color and percentage width respectively. +This macro should only be called once at the beginning of the document. +Once this macro has been called each section heading will emit an +HTML table consisting of the links in the left and the section text +on the right. +. +.TP +.B ".LNS" +Start a new two column table with links in the left column. +This can be called if the document has text before the first .SH +and if .ALN is used. Typically this is called just before the +first paragraph and after the main title as it indicates that +text after this point should be positioned to the right of +the left hand navigational links. +. +.TP +.B ".LNE" +End a two column table. This should be called at the end of the +document if .ALN was used. +. .SH SECTION HEADING LINKS By default .B \%grohtml diff --git a/tmac/www.tmac b/tmac/www.tmac index 5dcbd1ee..0e3c76fe 100644 --- a/tmac/www.tmac +++ b/tmac/www.tmac @@ -1215,6 +1215,77 @@ www functionality. It should work with any macro set. .ft P .. . +.ds www-nav-colour "#eeeeee +.nr www-nav-width-left 30 +.nr www-nav-width-right 70 +. +. +.\" LNS - left navigation start +. +.de LNS +. HTML</p> "<table><tr><td valign=top width=\\n[www-nav-width-left]% bgcolor=""\\*[www-nav-colour]"">" +. LK +. HTML</p> "</td><td valign=top width=\\n[www-nav-width-right]%>" +. nr SH-open 1 +.. +. +.\" LNE - left navigation end +. +.de LNE +. HTML</p> </td></tr></table> +. HR +.. +.nr SH-open 0 +.nr needs-begin 0 +. +. +.de www-SH +. if (0\\$1 == 0) \{\ +. if (\\n[SH-open] == 1) .LNE +. nr needs-begin 1 +. @SH-old +. \} +.. +. +.de www-NH +. if (0\\$1 <= 1) \{\ +. if (\\n[SH-open] == 1) .LNE +. nr needs-begin 1 +. @NH-old +. \} +.. +. +.de www-LP +. @LP-old +. if (\\n[needs-begin] == 1) \{\ +. HR +. LNS +. \} +. nr needs-begin 0 +.. +. +.\" ALN [colour] [left width percentage] +.\" turns on automatic left navigation, this macro should only be +.\" called once (normally at the start of the document) as it +.\" indicates the all top level section headings will form a +.\" navigation list on the left of the main text. +. +.de ALN +. if '\*(.T'html' \{\ +. if !'\\$1'' .ds www-nav-colour \\$1 +. if (0\\$2 > 0) \{\ +. nr www-nav-width-left \\$2 +. nr www-nav-width-right (100-\\$2) +. \} +. rn @SH @SH-old +. rn www-SH @SH +. rn @NH @NH-old +. rn www-NH @NH +. rn @LP @LP-old +. rn www-LP @LP +. \} +.. +. .if r ps4html .nop \O[0] .cp \n(_C . |