diff options
author | davygrvy <davygrvy@noemail.net> | 2002-05-08 04:23:41 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@noemail.net> | 2002-05-08 04:23:41 (GMT) |
commit | 6ab4d50309a1f1a711e354a51b21f8a26fe0f0e6 (patch) | |
tree | 9ae16ce245aa1d55dbce58a0ebda30b4f9566ba2 | |
parent | e9e3581e49207952d26c1a9ea27144cff981fca5 (diff) | |
download | tcl-6ab4d50309a1f1a711e354a51b21f8a26fe0f0e6.zip tcl-6ab4d50309a1f1a711e354a51b21f8a26fe0f0e6.tar.gz tcl-6ab4d50309a1f1a711e354a51b21f8a26fe0f0e6.tar.bz2 |
Improved handling of CS/CE fields. Use Courier New and indent better.
Changes from Peter Spjuth <peter.spjuth@space.se>.
FossilOrigin-Name: 9c272eef9e13a630f54d7edfd24709e4548d50cd
-rw-r--r-- | tools/man2help2.tcl | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl index aef5f61..acf0d88 100644 --- a/tools/man2help2.tcl +++ b/tools/man2help2.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: man2help2.tcl,v 1.8 2002/03/28 21:45:24 davygrvy Exp $ +# RCS: @(#) $Id: man2help2.tcl,v 1.9 2002/05/08 04:23:42 davygrvy Exp $ # # Global variables used by these scripts: @@ -280,16 +280,20 @@ proc macro {name args} { BS {} BE {} CE { - decrNestingLevel + puts -nonewline $::file "\\f0\\fs20 " set state(noFill) 0 set state(breakPending) 0 - newPara 0i + newPara "" + set state(leftIndent) [expr {$state(leftIndent) - $state(offset)}] + set state(sb) 80 } CS { # code section - incrNestingLevel set state(noFill) 1 - newPara 0i + newPara "" + set state(leftIndent) [expr {$state(leftIndent) + $state(offset)}] + set state(sb) 80 + puts -nonewline $::file "\\f1\\fs18 " } DE { set state(noFill) 0 @@ -903,8 +907,11 @@ proc newPara {leftIndent {firstIndent 0i}} { if $state(paragraph) { puts -nonewline $file "\\line\n" } - set state(leftIndent) [expr {$state(leftMargin) \ - + ($state(offset) * $state(nestingLevel)) +[getTwips $leftIndent]}] + if {$leftIndent != ""} { + set state(leftIndent) [expr {$state(leftMargin) \ + + ($state(offset) * $state(nestingLevel)) \ + + [getTwips $leftIndent]}] + } set state(firstIndent) [getTwips $firstIndent] set state(paragraphPending) 1 } |