// Texenv.vdm Mar. 1999 // Menu of LaTeX environments // If block set, insert environment definitions around block, else at // cursor position. // Fritz Heberlein, Dept. of Classics, U Eichstaett / Bavaria // sla019@ku-eichstaett.de // Related files: // 1. Texcmds.vdm: TeX commands // 2. Tex-Tbl.vdm: Tabular Macro // 3. Tex.syn // 4. Docsty.tex: Document style definition file // 5. mulpar.sty: Sty file for parallel columns // 6. zaehler.sty Sty file for numbered (linguistic) examples Message(" ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ LateX begin / end - environments Press desired key ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ (a) DOCUMENT STYLE ³ (j) ³ (s) small ³ ³ (b) ³ (k) ³ (t) tabular ³ ³ (c) center ³ (l) large ³ (u) Tabular Macro ³ ³ (d) description ³ (m) minipage ³ (v) verbatim ³ ³ (e) enumerate ³ (n) ³ (w) ³ ³ (f) flushleft ³ (o) ³ (x) ³ ³ (g) ³ (p) multiparagraph ³ (á) ³ ³ (h) ³ (q) quote ³ (z) zaehler ³ ³ (i) itemize ³ (r) flushright ³ (#) MORE TEX-SHORTCUTS ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ") repeat (ALL) { #80 = Get_Key("Kennbuchstaben eingeben (Abbruch mit ESC): ",STATLINE+RAW) //Escape: if (#80==27) { breakOut(extra)} //Insert default documentstyle definition (needs docsty.tex): if (#80=='a') {regload(10,"c:\vedit\docsty.tex") BOF() regins(10) regempty(10) EOF() instext("\end{document}") s("\begin",reverse) line(1) BreakOut(extra)} //Center: if (#80=='c'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{center}") insnewline(2) Ins_Text("\end{center}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{center}") gotopos(BE) EOL() insnewline() Ins_Text("\end{center}") BreakOut(extra) }} // Description: if (#80=='d'){ if (block_begin==-1) {insnewline() Ins_Text("\begin{description}") insnewline(2) Ins_Text("\end{description}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{description}") gotopos(BE) EOL() insnewline() Ins_Text("\end{description}") BreakOut(extra) }} // Enumerate: if (#80=='e'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{enumerate}") insnewline(2) Ins_Text("\end{enumerate}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{enumerate}") gotopos(BE) EOL() insnewline() Ins_Text("\end{enumerate}") BreakOut(extra) }} // Itemize: if (#80=='i'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{itemize}") insnewline(2) Ins_Text("\end{itemize}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{itemize}") gotopos(BE) EOL() insnewline() Ins_Text("\end{itemize}") BreakOut(extra) }} // Flushleft: if (#80=='f'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{flushleft}") insnewline(2) Ins_Text("\end{flushleft}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{flushleft}") gotopos(BE) EOL() insnewline() Ins_Text("\end{flushleft}") BreakOut(extra) }} // large: if (#80=='l') { if (block_begin==-1) { insnewline() Ins_Text("\begin{large}") insnewline(2) Ins_Text("\end{large}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{large}") gotopos(BE) EOL() insnewline() Ins_Text("\end{large}") BreakOut(extra) }} // Minipage: if (#80=='m'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{minipage}{\textwidth}") insnewline(2) Ins_Text("\end{minipage}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{minipage}") gotopos(BE) EOL() insnewline() Ins_Text("\end{minipage}") BreakOut(extra) }} // Parallel columns: needs mulpar.sty if (#80=='p') { insnewline() Ins_Text("\begin{multicolpar}{2}") insnewline(2) Ins_Text("\end{multicolpar}") line(-1) BOL() BreakOut(extra)} //quote: if (#80=='q'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{quote}") insnewline(2) Ins_Text("\end{quote}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{quote}") gotopos(BE) EOL() insnewline() Ins_Text("\end{quote}") BreakOut(extra) }} //flushright: if (#80=='r'){ if (block_begin==-1) { insnewline() Ins_Text("\begin{flushright}") insnewline(2) Ins_Text("\end{flushright}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{flushright}") gotopos(BE) EOL() insnewline() Ins_Text("\end{flushright}") BreakOut(extra) }} //small: if (#80=='s') { if (block_begin==-1) { insnewline() Ins_Text("\begin{small}") insnewline(2) Ins_Text("\end{small}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{small}") gotopos(BE) EOL() insnewline() Ins_Text("\end{small}") BreakOut(extra) }} if (#80=='t') { insnewline() Ins_Text("\begin{tabular}{}") insnewline(2) Ins_Text("\end{tabular}") line(-2) EOL()Char(-1) BreakOut(extra)} // calls tabular macro tex-tbl.vdm: if (#80=='u') { winclear() callf(101,"tex-tbl.vdm") BreakOut(extra)} // Verbatim: if (#80=='v'){ if (block_begin==-1) {insnewline() Ins_Text("\begin{verbatim}") insnewline(2) Ins_Text("\end{verbatim}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{verbatim}") gotopos(BE) EOL() insnewline() Ins_Text("\end{verbatim}") BreakOut(extra) }} // environment for numbering (linguistic) examples if (#80=='z') { if (block_begin==-1) { insnewline() Ins_Text("\begin{zaehler}") insnewline(2) Ins_Text("\end{zaehler}") line(-1) BOL() BreakOut(extra)} else{ gotopos(BB) insnewline(1) line(-1) Ins_Text("\begin{zaehler}") gotopos(BE) EOL() insnewline() Ins_Text("\end{zaehler}") BreakOut(extra) }} //jump to the tex commands macro: if (#80=='#') { chainfile(121,"texcmds.vdm") BreakOut(extra)} } //end of "repeat all"