summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--tools/man2html2.tcl41
2 files changed, 42 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 37849e8..8032799 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-10-24 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+ * tools/man2html2.tcl (macro): Added support for converting the new
+ macros into HTML.
+
* doc/man.macros (QW,PQ,QR,MT): New macros that hide the ugly mess
needed to get proper GOOBE quoting in the manual pages.
* doc/*.n, doc/*.3, doc/*.1: Lots of changes to take advantage of the
diff --git a/tools/man2html2.tcl b/tools/man2html2.tcl
index c000e21..243649e 100644
--- a/tools/man2html2.tcl
+++ b/tools/man2html2.tcl
@@ -6,7 +6,7 @@
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
#
-# $Id: man2html2.tcl,v 1.10 2007/10/17 17:33:51 dkf Exp $
+# $Id: man2html2.tcl,v 1.11 2007/10/24 14:44:08 dkf Exp $
#
package require Tcl 8.4
@@ -308,7 +308,11 @@ proc macro {name args} {
font B
set temp $textState
set textState REF
- text options
+ if {[llength $args] > 0} {
+ text [lindex $args 0]
+ } else {
+ text options
+ }
set textState $temp
font R
text " manual entry for detailed descriptions of the above options."
@@ -374,6 +378,39 @@ proc macro {name args} {
# }
# puts -nonewline $file "<FONT COLOR=\"GREEN\">"
}
+ QW {
+ puts -nonewline $file "&\#147;"
+ text [lindex $args 0]
+ puts -nonewline $file "&\#148;"
+ if {[llength $args] > 1} {
+ text [lindex $args 1]
+ }
+ }
+ PQ {
+ puts -nonewline $file "(&\#147;"
+ text [lindex $args 0]
+ puts -nonewline $file "&\#148;"
+ if {[llength $args] > 1} {
+ text [lindex $args 1]
+ }
+ puts -nonewline $file ")"
+ if {[llength $args] > 2} {
+ text [lindex $args 2]
+ }
+ }
+ QR {
+ puts -nonewline $file "&\#147;"
+ text [lindex $args 0]
+ puts -nonewline $file "&\#148;&\#150;&\#147;"
+ text [lindex $args 1]
+ puts -nonewline $file "&\#148;"
+ if {[llength $args] > 2} {
+ text [lindex $args 2]
+ }
+ }
+ MT {
+ puts -nonewline $file "&\#147;&\#148;"
+ }
default {
puts stderr "Unknown macro: .$name [join $args " "]"
}