home *** CD-ROM | disk | FTP | other *** search
- #############################################################################
- #############################################################################
- #
- # latexMenu.tcl (called from latex.tcl)
- #
- # LaTeX menu definition and key bindings
- #
- #############################################################################
- #
- # Author: Tom Scavo (trscavo@syr.edu)
- #
- #############################################################################
- #############################################################################
-
- proc getTeXMenu {} {
- return {
-
- "/TTypeset"
-
- {menu -M TeX -n Goto -m -p interpretMenuItem {
- "<U/SLaTeX"
- "BibTeX"
- "MakeIndex"
- "(-"
- {/cNext Tab Stop}
- {<U/cPrev Tab Stop}
- {<B/cnth Tab Stop╔}
- "(-"
- {Next Command}
- {Prev Command}
- {Next Command Select}
- {Prev Command Select}
- {Next Command Select With Args}
- {Prev Command Select With Args}
- "(-"
- {Next Environment}
- {Prev Environment}
- {Next Environment Select}
- {Prev Environment Select}
- "(-"
- {Next Section}
- {Prev Section}
- {Next Section Select}
- {Prev Section Select}
- {Next Subsection}
- {Prev Subsection}
- {Next Subsection Select}
- {Prev Subsection Select}
- }
- }
-
- {menu -M TeX -n {LaTeX Utilities} -m -p interpretMenuItem {
- {<I<O/TChoose Command}
- "(-"
- {<I/cInsert Literal Tab}
- {Insert Tab Stop}
- {Insert Reference╔}
- "(-"
- {<O/cDelete Tab Stops}
- {Delete Comments}
- "(-"
- {Convert Quotes}
- {Convert Dollar Signs}
- "(-"
- {Remove Auxiliary Files}
- }
- }
-
- "(-"
-
- {menu -M TeX -n Documents -m -p interpretMenuItem {
- "letter"
- "article"
- "report"
- "book"
- "slides"
- "custom╔"
- "(-"
- "options╔"
- "packages╔"
- "(-"
- "filecontents╔"
- }
- }
-
- {menu -M TeX -n {Page Layout} -m -p interpretMenuItem {
- "maketitle"
- "(-"
- "abstract"
- "titlepage"
- "(-"
- "pagestyle╔"
- "thispagestyle╔"
- "pagenumbering╔"
- "(-"
- "twocolumn"
- "onecolumn"
- }
- }
-
- {menu -M TeX -n Sectioning -m -p interpretMenuItem {
- "part"
- "chapter"
- "section"
- "subsection"
- "subsubsection"
- "paragraph"
- "subparagraph"
- "(-"
- "appendix"
- }
- }
-
- "(-"
-
- {menu -M TeX -n {Text Style} -m -p interpretMenuItem {
- "<B<I/Eemph"
- "<B<O/Uunderline"
- "(-"
- "textup"
- "<B<I/Itextit"
- "<B<I/Stextsl"
- "<B<I/Htextsc"
- "(-"
- "textmd"
- "<B<I/Btextbf"
- "(-"
- "<B<I/Rtextrm"
- "<B<I/Wtextsf"
- "<B<I/Ytexttt"
- "(-"
- "textnormal"
- }
- }
-
- {menu -M TeX -n {Text Size} -m -p interpretMenuItem {
- "tiny"
- "scriptsize"
- "footnotesize"
- "small"
- "normalsize"
- "large"
- "Large"
- "LARGE"
- "huge"
- "Huge"
- }
- }
-
- {menu -M TeX -n International -m -p interpretMenuItem {
- {ÿ}
- {ù}
- {Ö}
- {Ü}
- {¢}
- "(-"
- {ì}
- {╧}
- {╛}
- {î}
- {┐}
- "(-"
- {é}
- {╬}
- {«}
- {ü}
- {»}
- "(-"
- {º}
- {┴}
- {└}
- }
- }
-
- {menu -M TeX -n Environments -m -p interpretMenuItem {
- "<I/kitemize╔"
- "<U<I/kenumerate╔"
- "<B<I/kdescription╔"
- "thebibliography╔"
- "(-"
- "<I/lslide"
- "<U<I/loverlay"
- "<B<I/lnote"
- "(-"
- "<I/mfigure"
- "<U<I/mtable"
- "<B<I/mtabular╔"
- "(-"
- "<I/nverbatim"
- "<U<I/nquote"
- "<B<I/nquotation"
- "verse"
- "(-"
- "<I/ocenter"
- "<U<I/oflushleft"
- "<B<I/oflushright"
- "(-"
- "<I/pgeneral╔"
- }
- }
-
- {menu -M TeX -n Boxes -m -p interpretMenuItem {
- "<B<I/Mmbox"
- "makebox"
- "fbox"
- "framebox"
- "(-"
- "newsavebox"
- "sbox"
- "savebox"
- "usebox"
- "(-"
- "raisebox"
- "(-"
- "parbox"
- "minipage"
- "(-"
- "rule"
- }
- }
-
- {menu -M TeX -n Miscellaneous -m -p interpretMenuItem {
- "<B<I/Ffootnote"
- {<B<I/Nmarginal note}
- "(-"
- "<B<I/Llabel"
- "<B<I/Xref"
- "<B<I/Ppageref"
- "<B<I/Ccite"
- "(-"
- "<B<I/Jitem"
- "(-"
- "<B<I/'quotes"
- {<U<B<I/'double quotes}
- "(-"
- "!╔ellipsis"
- "!╨en-dash"
- "!╤em-dash"
- {TeX logo}
- {LaTeX logo}
- {LaTeX2e logo}
- "date"
- "(-"
- "!ádag"
- "ddag"
- {!ñsection mark}
- {!ªparagraph mark}
- "!⌐copyright"
- "!úpounds"
- }
- }
-
- "(-"
-
- {menu -M TeX -n {Math Modes} -m -p interpretMenuItem {}}
-
- {menu -M TeX -n {Math Style} -m -p interpretMenuItem {
- "<B<I<O/Imathit"
- "<B<I<O/Rmathrm"
- "<B<I<O/Bmathbf"
- "<B<I<O/Wmathsf"
- "<B<I<O/Ymathtt"
- "<B<I<O/Cmathcal"
- "(-"
- "<B<I<O/Ddisplaystyle"
- "<B<I<O/Ttextstyle"
- "<B<I<O/Sscriptstyle"
- "scriptscriptstyle"
- }
- }
-
- {menu -M TeX -n {Math Environments} -m -p interpretMenuItem {
- "<I/imath"
- "(-"
- "<U<I/idisplaymath"
- "<B<I/iequation"
- "(-"
- "<U<I/jeqnarray*╔"
- "<B<I/jeqnarray╔"
- "(-"
- "<I/jarray╔"
- "(-"
- "<I/pgeneral╔"
- }
- }
-
- {menu -M TeX -n Formulas -m -p interpretMenuItem {
- "subscript"
- "superscript"
- "(-"
- "<B<O/Ffrac"
- {<B<O/Rsqrt}
- {nth root}
- "(-"
- {<B<O/1one parameter╔}
- {<B<O/2two parameters╔}
- }
- }
-
- {menu -M TeX -n Greek -m -p interpretMenuItem {
- "alpha"
- "beta"
- "<SGamma"
- "<Sgamma"
- "<E<SDelta"
- "<Sdelta"
- "epsilon"
- "zeta"
- "eta"
- "<STheta"
- "<Stheta"
- "iota"
- "kappa"
- "<SLambda"
- "<Slambda"
- "mu"
- "nu"
- "<SXi"
- "<Sxi"
- "omicron"
- "<SPi"
- "<Spi"
- "rho"
- "<SSigma"
- "<Ssigma"
- "tau"
- "<SUpsilon"
- "<Supsilon"
- "<E<SPhi"
- "<Sphi"
- "chi"
- "<SPsi"
- "<Spsi"
- "<E<SOmega"
- "<Somega"
- "(-"
- "varepsilon"
- "vartheta"
- "varpi"
- "varrho"
- "varsigma"
- "varphi"
- }
- }
-
- {menu -M TeX -n {Binary Operators} -m -p interpretMenuItem {
- "!▒pm"
- "mp"
- "times"
- "!╓div"
- "ast"
- "star"
- "circ"
- "bullet"
- "cdot"
- "cap"
- "cup"
- "uplus"
- "sqcap"
- "sqcup"
- "vee"
- "wedge"
- "setminus"
- "(-"
- "diamond"
- "bigtriangleup"
- "bigtriangledown"
- "triangleleft"
- "triangleright"
- "lhd"
- "rhd"
- "unlhd"
- "unrhd"
- "(-"
- "oplus"
- "ominus"
- "otimes"
- "oslash"
- "odot"
- "(-"
- "bigcirc"
- "dagger"
- "ddagger"
- "amalg"
- "wr"
- }
- }
-
- {menu -M TeX -n Relations -m -p interpretMenuItem {
- "<S!│geq"
- "<S!▓leq"
- "<E<Ssucc"
- "<Sprec"
- "<E<Ssucceq"
- "<Spreceq"
- "<E<S!╚gg"
- "<S!╟ll"
- "<E<Ssupset"
- "<Ssubset"
- "<E<Ssupseteq"
- "<Ssubseteq"
- "<E<Ssqsupset"
- "<Ssqsubset"
- "<E<Ssqsupseteq"
- "<Ssqsubseteq"
- "<E<Sni"
- "<Sin"
- "<E<Sdashv"
- "<Svdash"
- "(-"
- "equiv"
- "sim"
- "simeq"
- "asymp"
- "!┼approx"
- "cong"
- "!¡neq"
- "doteq"
- "propto"
- "(-"
- "models"
- "perp"
- "mid"
- "parallel"
- "bowtie"
- "join"
- "smile"
- "frown"
- }
- }
-
- {menu -M TeX -n Arrows -m -p interpretMenuItem {
- "<SLeftarrow"
- "<Sleftarrow"
- "<E<SRightarrow"
- "<Srightarrow"
- "<E<SLeftrightarrow"
- "<Sleftrightarrow"
- "<E<SLongleftarrow"
- "<Slongleftarrow"
- "<E<SLongrightarrow"
- "<Slongrightarrow"
- "<E<SLongleftrightarrow"
- "<Slongleftrightarrow"
- "(-"
- "<SUparrow"
- "<Suparrow"
- "<E<SDownarrow"
- "<Sdownarrow"
- "<E<SUpdownarrow"
- "<Supdownarrow"
- "(-"
- "mapsto"
- "longmapsto"
- "leadsto"
- "(-"
- "leftharpoonup"
- "rightharpoonup"
- "leftharpoondown"
- "rightharpoondown"
- "rightleftharpoons"
- "hookleftarrow"
- "hookrightarrow"
- "nearrow"
- "searrow"
- "swarrow"
- "nwarrow"
- }
- }
-
- {menu -M TeX -n Dots -m -p interpretMenuItem {
- "bullet"
- "cdot"
- "(-"
- "ldots"
- "cdots"
- "vdots"
- "ddots"
- }
- }
-
- {menu -M TeX -n Symbols -m -p interpretMenuItem {
- "aleph"
- "hbar"
- "imath"
- "jmath"
- "ell"
- "wp"
- "Re"
- "Im"
- "mho"
- "(-"
- "angle"
- "backslash"
- "bot"
- "emptyset"
- "exists"
- "forall"
- "!░infty"
- "nabla"
- "!┬neg"
- "!╢partial"
- "prime"
- "!├surd"
- "top"
- "(-"
- "Box"
- "Diamond"
- "triangle"
- "clubsuit"
- "diamondsuit"
- "heartsuit"
- "spadesuit"
- "(-"
- "flat"
- "natural"
- "sharp"
- }
- }
-
- {menu -M TeX -n Functions -m -p interpretMenuItem {
- "arccos"
- "arcsin"
- "arctan"
- "arg"
- "cos"
- "cosh"
- "cot"
- "coth"
- "csc"
- "deg"
- "det"
- "dim"
- "exp"
- "gcd"
- "hom"
- "inf"
- "ker"
- "lg"
- "lim"
- "liminf"
- "limsup"
- "ln"
- "log"
- "max"
- "min"
- "Pr"
- "sec"
- "sin"
- "sinh"
- "sup"
- "tan"
- "tanh"
- "(-"
- "bmod"
- "pmod"
- }
- }
-
- {menu -M TeX -n {Large Operators} -m -p interpretMenuItem {
- "<B<O/Ssum"
- "<B<O/Pprod"
- "coprod"
- "<B<O/Iint"
- "oint"
- "(-"
- "bigcup"
- "bigcap"
- "bigsqcup"
- "bigvee"
- "bigwedge"
- "bigodot"
- "bigotimes"
- "bigoplus"
- "biguplus"
- }
- }
-
- {menu -M TeX -n Delimiters -m -p interpretMenuItem {
- "parentheses"
- "brackets"
- "braces"
- {vertical bars}
- {other delims╔}
- "(-"
- {half-open interval}
- {half-closed interval}
- "(-"
- {big parentheses}
- {big brackets}
- {big braces}
- {big vertical bars}
- {other big delims╔}
- "(-"
- {big left brace}
- {other mixed big delims╔}
- }
- }
-
- {menu -M TeX -n {Math Accents} -m -p interpretMenuItem {
- "<B<O/Aacute"
- "<B<O/Bbar"
- "breve"
- "<B<O/Ccheck"
- "<B<O/Ddot"
- "ddot"
- "<B<O/Ggrave"
- "<B<O/Hhat"
- "<B<O/Ttilde"
- "<B<O/Vvec"
- "(-"
- "widehat"
- "widetilde"
- "(-"
- "imath"
- "jmath"
- }
- }
-
- {menu -M TeX -n Grouping -m -p interpretMenuItem {
- "<B<O/Uunderline"
- "<B<O/Ooverline"
- "underbrace"
- "overbrace"
- "(-"
- "stackrel"
- }
- }
-
- {menu -M TeX -n Spacing -m -p interpretMenuItem {
- {neg thin}
- "thin"
- "medium"
- "thick"
- "(-"
- "quad"
- "qquad"
- "(-"
- "hspace"
- "vspace"
- "(-"
- "hfill"
- "vfill"
- "(-"
- "smallskip"
- "medskip"
- "bigskip"
- }
- }
- }
- }
-
-
- proc buildLaTeXMenu {} {
- global latexMenu TeXmodeVars
-
- menu -M TeX -n $latexMenu -m -p interpretMenuItem [getTeXMenu]
-
- if {$TeXmodeVars(useDollarSigns)} then {
- menu -M TeX -n {Math Modes} -m -p interpretMenuItem {
- {<B<O/4TeX math}
- {<B<I<O/4TeX displaymath}
- "(-"
- {LaTeX math}
- {LaTeX displaymath}
- }
- } else {
- menu -M TeX -n {Math Modes} -m -p interpretMenuItem {
- {TeX math}
- {TeX displaymath}
- "(-"
- {<B<O/4LaTeX math}
- {<B<I<O/4LaTeX displaymath}
- }
- }
-
- }
-
- proc interpretMenuItem {menu item} {
- switch $item {
- "Typeset" {set func "typeset"}
- "LaTeX" {set func "latex"}
- "BibTeX" {set func "bibtex"}
- "MakeIndex" {set func "makeindex"}
- {Next Tab Stop} {set func "nextTabStop"}
- {Prev Tab Stop} {set func "prevTabStop"}
- {nth Tab Stop} {set func nthTabStop}
- {Next Command} {set func "nextCommand"}
- {Prev Command} {set func "prevCommand"}
- {Next Command Select} {set func "nextCommandSelect"}
- {Prev Command Select} {set func "prevCommandSelect"}
- {Next Command Select With Args} {set func "nextCommandSelectWithArgs"}
- {Prev Command Select With Args} {set func "prevCommandSelectWithArgs"}
- {Next Environment} {set func "nextEnvironment"}
- {Prev Environment} {set func "prevEnvironment"}
- {Next Environment Select} {set func "nextEnvironmentSelect"}
- {Prev Environment Select} {set func "prevEnvironmentSelect"}
- {Next Section} {set func "nextSection"}
- {Prev Section} {set func "prevSection"}
- {Next Section Select} {set func "nextSectionSelect"}
- {Prev Section Select} {set func "prevSectionSelect"}
- {Next Subsection} {set func "nextSubsection"}
- {Prev Subsection} {set func "prevSubsection"}
- {Next Subsection Select} {set func "nextSubsectionSelect"}
- {Prev Subsection Select} {set func "prevSubsectionSelect"}
- {Choose Command} {set func "chooseCommand"}
- {Insert Literal Tab} {set func "insertLiteralTab"}
- {Insert Tab Stop} {set func "insertTabStop"}
- {Insert Reference} {set func "insertReference"}
- {Delete Tab Stops} {set func "deleteTabStops"}
- {Delete Comments} {set func "deleteComments"}
- {Convert Quotes} {set func "convertQuotes"}
- {Convert Dollar Signs} {set func "convertDollarSigns"}
- {Remove Auxiliary Files} {set func "removeAuxiliaryFiles"}
- "array" {set func "myArray"}
- "eqnarray\*" {set func "eqnarrayStar"}
- "ellipsis" {set func "ldots"}
- {TeX logo} {set func "texLogo"}
- {LaTeX logo} {set func "latexLogo"}
- {LaTeX2e logo} {set func "latex2eLogo"}
- "date" {set func "today"}
- {section mark} {set func "sectionMark"}
- {paragraph mark} {set func "paragraphMark"}
- {double quotes} {set func "dblQuotes"}
- {marginal note} {set func "marginalNote"}
- "item" {set func "insertItem"}
- {TeX math} {set func "texMath"}
- {TeX displaymath} {set func "texDisplaymath"}
- {LaTeX math} {set func "latexMath"}
- {LaTeX displaymath} {set func "latexDisplaymath"}
- {blackboard bold} {set func "blackboardBold"}
- {frac} {set func "fraction"}
- {sqrt} {set func "squareRoot"}
- {nth root} {set func "nthRoot"}
- {one parameter} {set func "oneParameter"}
- {two parameters} {set func "twoParameters"}
- {join} {set func "myJoin"}
- {vertical bars} {set func "absoluteValue"}
- {other delims} {set func "otherDelims"}
- {half-open interval} {set func "half-openInterval"}
- {half-closed interval} {set func "half-closedInterval"}
- {big parentheses} {set func "bigParentheses"}
- {big brackets} {set func "bigBrackets"}
- {big braces} {set func "bigBraces"}
- {big vertical bars} {set func "bigAbsoluteValue"}
- {other big delims} {set func "otherBigDelims"}
- {big left brace} {set func "bigLeftBrace"}
- {other mixed big delims} {set func "otherMixedBigDelims"}
- {neg thin} {set func "negThin"}
- default {set func $item}
- }
- eval $func
- }
-