]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/texify
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / texify
index c4dad63ebcff55ab7b46852a3ff5d03d1006ac8d..5bb300e3955cea78b9075c82008da0f16c7b4c38 100755 (executable)
@@ -4,7 +4,8 @@
 # a given macro.
 #
 # Call it with  texify '\macro' [...] to get a line per item giving ascent,
-# descent, width and the primitives that TeX would use to typeset the item
+# descent, width, the font and the position in the font TeX would use to
+# typeset the symbol.
 
 # Original script:
 #\batchmode
@@ -25,7 +26,7 @@ foreach item $::argv {
        set value   0
        set ascent  0
        set descent 0
-       set widht   0
+       set width   0
 
        set f [open $filebase.tex w 0600]
        puts $f "\\nonstopmode"
@@ -42,7 +43,9 @@ foreach item $::argv {
        set f [open $filebase.log r]
        while {![eof $f]} {
                gets $f line
+               # try to interpret it as a hbox line
                regexp $hboxexp $line dummy ascent descent width
+               # try to interpret it as a font line
                regexp $fontexp $line dummy font char
        }
        close $f