summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-17 08:39:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-17 08:39:19 (GMT)
commit1889c1581962f1e38165d7a3a03e8a5cb3438385 (patch)
treec2130e2b59f4222d948814efdb7a5327683523d1 /tools
parent3e61e61d42ed7f064c2838b36db50cf78c435f5f (diff)
downloadtcl-1889c1581962f1e38165d7a3a03e8a5cb3438385.zip
tcl-1889c1581962f1e38165d7a3a03e8a5cb3438385.tar.gz
tcl-1889c1581962f1e38165d7a3a03e8a5cb3438385.tar.bz2
Extend tcltk-man2html-utils.tcl, so it can handle the TIP #588 man-page. Also fix 2 (minor) syntax errors in man-pages
Diffstat (limited to 'tools')
-rw-r--r--tools/tcltk-man2html-utils.tcl70
1 files changed, 58 insertions, 12 deletions
diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl
index 65d81de..0aa1d5c 100644
--- a/tools/tcltk-man2html-utils.tcl
+++ b/tools/tcltk-man2html-utils.tcl
@@ -130,8 +130,8 @@ proc htmlize-text {text {charmap {}}} {
\" {&quot;} \
{<} {&lt;} \
{>} {&gt;} \
- \u201c "&#8220;" \
- \u201d "&#8221;"
+ \u201c "&ldquo;" \
+ \u201d "&rdquo;"
return [string map $charmap $text]
}
@@ -144,20 +144,62 @@ proc process-text {text} {
{\&} "\t" \
{\%} {} \
"\\\n" "\n" \
- {\(+-} "&#177;" \
+ {\(r!} "&iexcl;" \
+ {\(ct} "&cent;" \
+ {\(Po} "&pound;" \
+ {\(Cs} "&curren;" \
+ {\(Ye} "&yen;" \
+ {\(bb} "&brvbar;" \
+ {\(sc} "&sect;" \
+ {\(ad} "&die;" \
{\(co} "&copy;" \
- {\(em} "&#8212;" \
- {\(en} "&#8211;" \
- {\(fm} "&#8242;" \
- {\(mc} "&#181;" \
- {\(mu} "&#215;" \
- {\(mi} "&#8722;" \
- {\(->} "<font size=\"+1\">&#8594;</font>" \
+ {\(Of} "&ordf;" \
+ {\(Fo} "&laquo;" \
+ {\(no} "&not;" \
+ {\(rg} "&reg;" \
+ {\(a-} "&macr;" \
+ {\(de} "&deg;" \
+ {\(+-} "&plusmn;" \
+ {\(S2} "&sup2;" \
+ {\(S3} "&sup3;" \
+ {\(aa} "&acute;" \
+ {\(mc} "&micro;" \
+ {\(ps} "&para;" \
+ {\(pc} "&middot;" \
+ {\(ac} "&cedil;" \
+ {\(S1} "&sup1;" \
+ {\(Om} "&ordm;" \
+ {\(Fc} "&raquo;" \
+ {\(14} "&frac14;" \
+ {\(12} "&frac12;" \
+ {\(34} "&frac34;" \
+ {\(r?} "&iquest;" \
+ {\(AE} "&AElig;" \
+ {\(-D} "&ETH;" \
+ {\(mu} "&times;" \
+ {\(TP} "&THORN;" \
+ {\(ss} "&szlig;" \
+ {\(ae} "&aelig;" \
+ {\(Sd} "&eth;" \
+ {\(di} "&divide;" \
+ {\(Tp} "&thorn;" \
+ {\(em} "&mdash;" \
+ {\(en} "&ndash;" \
+ {\(bu} "&bull;" \
+ {\(fm} "&prime;" \
+ {\(mi} "&minus;" \
+ {\(->} "<font size=\"+1\">&rarr;</font>" \
{\fP} {\fR} \
{\.} . \
- {\(bu} "&#8226;" \
- {\*(qo} "&ocirc;" \
]
+ # This might make a few invalid mappings, but we don't use them
+ foreach c {a c e i n o u y A C E I N O U Y} {
+ foreach {prefix suffix} {
+ o ring / slash : uml ' acute ^ circ ` grave ~ tilde , cedilla
+ } {
+ lappend charmap "\\\[${prefix}${c}\]" "&${c}${suffix};"
+ }
+ }
lappend charmap {\-\|\-} -- ; # two hyphens
lappend charmap {\-} - ; # a hyphen
@@ -1559,6 +1601,10 @@ proc make-manpage-section {outputDir sectionDescriptor} {
puts stderr ""
}
+ if {![llength $manual(wing-toc)]} {
+ fatal "not table of contents."
+ }
+
#
# make the wing table of contents for the section
#