diff options
author | dkf <dkf@noemail.net> | 2007-10-24 14:44:07 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2007-10-24 14:44:07 (GMT) |
commit | e900ee79c8cc6a21fdcd403382ecaa62ff8a80bf (patch) | |
tree | 999ad2b823f8fa6a890e4868e0b00f0e38e835c8 | |
parent | e65677716e495ef5631115879eadb8cfb1b3b763 (diff) | |
download | tcl-e900ee79c8cc6a21fdcd403382ecaa62ff8a80bf.zip tcl-e900ee79c8cc6a21fdcd403382ecaa62ff8a80bf.tar.gz tcl-e900ee79c8cc6a21fdcd403382ecaa62ff8a80bf.tar.bz2 |
Allow new options to be rendered as HTML.
FossilOrigin-Name: 7578ef5866548755d6921fc052e17731a4e8ae64
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | tools/man2html2.tcl | 41 |
2 files changed, 42 insertions, 2 deletions
@@ -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 " "]" } |