Compare commits

...
3 changed files with 44 additions and 0 deletions
+6
View File
@@ -1,3 +1,9 @@
2012-99-99 Donal K. Fellows <dkf@users.sf.net>
* tools/tcltk-man2html-utils.tcl (make-manpage-section): Start of some
* doc/man.macros (.FI): support for a macro for figures, which is
mainly intended for use with Tk.
2012-07-31 Donal K. Fellows <dkf@users.sf.net>
* generic/tclInterp.c (Tcl_GetInterpPath):
+23
View File
@@ -67,6 +67,14 @@
.\" Print an open parenthesis, arg1 in quotes, then arg2 normally
.\" (for trailing punctuation) and then a closing parenthesis.
.\"
.\" .FI pictureName caption
.\" Creates a figure from the picture called "pictureName". This
.\" translates into a URL to a PNG version of the picture when formatted
.\" for a terminal, a use of the EPS version of the picture when
.\" formatting for printed output, and a centered inline image (from the
.\" PNG) in the version for the web. The caption is added below, with
.\" appropriate numbering.
.\"
.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
@@ -265,3 +273,18 @@ Database Class: \\fB\\$3\\fR
.de MT
.QW ""
..
.\" # FI - figure with caption
.ds UB http://www.tcl.tk/man/tcl8.6/img/
.nr fi 0 1
.de FI
.RS
.PP
.ie n \{\
.ce
<\\*(UB\\$1.png>
.\}
.el .PSPIC img/\\$1.eps
.ce
Figure \\n+(fi: \\$2
.RE
..
+15
View File
@@ -1470,6 +1470,21 @@ proc make-manpage-section {outputDir sectionDescriptor} {
}
error "found .. outside of .de"
}
.ds {
regexp {^(\S+) ([^\s""]+|".*")$} $rest var rest
if {$var eq "UB"} {
variable ImageUrlBase [unquote $rest]
}
}
.FI {
flushbuffer
regexp {^(\S+) ([^\s""]+|".*")$} $rest fig caption
variable ImageUrlBase
set fig $ImageUrlBase$fig.png
set caption [process-text [unquote $caption]]
lappend manual(text) \
"<center><img src=\"$fig\"><br>$caption</center>"
}
default {
if {!$verbose} {
puts stderr ""