|
Lugaru's Epsilon Programmer's Editor
Context:
|
Epsilon User's Manual and Reference > Commands by Topic > Language Modes > TeX and LaTeX ModesEpsilon automatically enters either TeX or LaTeX mode when you read a file with an extension of .tex, .ltx, .sty, or (in most cases) .cls. (By default it enters LaTeX mode, but see the tex-force-latex command below.) TeX and LaTeX modes are almost identical, and will be described together.Keys in TeX/LaTeX mode include Alt-i for italic text, Alt-Shift-I for slanted text, Alt-Shift-T for typewriter, Alt-Shift-B for boldface, Alt-Shift-C for small caps, Alt-Shift-F for a footnote, and Alt-s for a centered line.
Alt-Shift-E prompts for the name of a LaTeX environment, then inserts
\begin{env} and \end{env} lines for
the one you select. You can press ? to select an environment from a
list. (The list of environments comes from the file For most of these commands, you can highlight a block of text first and Epsilon will insert formatting commands to make the text italic, slanted, etc. or you can use the command and then type the text to be italic, slanted, etc.
By default, Epsilon inserts the appropriate LaTeX 2e/3 command (such
as \textit for italic text). Set the variable
latex-2e-or-3 to The keys "{" and "$" insert matched pairs of characters (either {} or $$). When you type \( or \[, TeX/LaTeX mode will insert a matching \) or \], respectively. But if you type "{" just before a non-whitespace character, it inserts only a "{". This makes it easier to surround existing text with braces.
The keys <Comma> and <Period> remove a preceding italic
correction \/, the
Some TeX mode commands are slightly different in LaTeX than in pure
TeX. Set tex-force-latex to When the cursor is on a curly brace or square bracket character like {, }, [, or ], Epsilon will try to locate its matching character and highlight them both. If the current character has no match, Epsilon will not highlight it. Set the variable auto-show-tex-delimiters to zero to disable this feature. Set the variable tex-look-back to a bigger number if you want TeX mode to more accurately syntax highlight very large paragraphs but be slower, or a smaller number if you want recoloring to be faster but perhaps miscolor large paragraphs. You can customize syntax highlighting using the variables latex-display-math-env-pat, latex-math-env-pat, and latex-non-text-argument.
The compile-buffer command uses the compile-tex-cmd
variable in TeX mode and the compile-latex-cmd variable in
LaTeX mode. You may need to set these if the version of TeX or
LaTeX you use takes some different flags. The MiKTeX version of TeX
and LaTeX for Windows, for instance, works well with Epsilon if you
use the flags "
If your TeX system uses a compatible DVI
previewer, then you can use Epsilon's jump-to-dvi command to see
the DVI output resulting from the current line of TeX or LaTeX.
This requires some setup so that the DVI file contains TeX source
file line number data. See the jump-to-dvi command for
details. With such setup, you can also configure your DVI viewer to
run Epsilon, showing the source file and line corresponding to a
certain spot in your DVI file. The details depend on your DVI viewer,
but a command line like You can use the list-definitions command to see a list of LaTeX labels in the current file and move to one. The tagging commands (see Tags) also work on labels. See the latex-tag-keywords variable if you want to make these work on cite tags too, or make other tagging customizations. In LaTeX mode, the spell checker uses the latex-spell-options variable. Also see the latex-non-text-argument variable to control how the spell checker treats the parameter of LaTeX commands like \begin that can take keywords. In TeX mode, the spell checker uses the tex-spell-options variable.
|