home *** CD-ROM | disk | FTP | other *** search
- proc CreateCmdInfo {{file ../doc/cmds.tex}} {
- global CmdName CmdInfo
- set CmdName ""
- set CmdInfo ""
- set fid [open $file r]
- set gettingPara 0
- while {![eof $fid]} {
- set line [gets $fid]
- if {[string index $line 0]=="\\" && $gettingPara} {
- set gettingPara 0
- lappend CmdInfo $para
- }
- if $gettingPara {
- set para [format "%s %s" $para $line]
- }
- if [regexp "\\subsubsection{(.*)}" $line junk cmd] {
- set gettingPara 1
- lappend CmdName [lindex $cmd 0]
- set para [format "%s\n" $cmd]
- }
- }
- if $gettingPara {
- lappend CmdInfo $para
- }
- }
- #CreateCmdInfo
- #foreach x $CmdInfo {
- # puts stdout "<$x>"
- #}
-