next up previous contents
Next: Importing LATEX Documents Up: LYX for LATEX Users Previous: LYX for LATEX Users   Contents

TEX Mode

Anything that you enter in TEX mode will be passed straight to LATEX, and will be displayed in red on the screen. You can use TEX commands in LYX by choosing Insert $ \triangleright$TeX. This creates a text box, and everything within it is passed straight to LATEX.

In a math formula, TEX mode is handled a bit differently. Enter TEX mode by typing a backslash. The backslash is not written out, but anything you type afterwards will be in red. You exit TEX mode by typing Space or some other non-alphabetic character, like a number, underscore, caret, or parenthesis. Once you exit TEX mode, if LYX knows the TEX command you've typed in, it will convert it to WYSIWYM. So if, in a formula, you type \gamma, then when you type Space, LYX will change the red ``gamma'' to a blue ``$ \gamma$''. This will work for almost all, non-complicated math macros. This may be faster than using the Math Panel, and will be especially convenient for experienced LATEX users.

As a special case, if you type a brace in TEX mode, then the beginning and ending braces will be inserted in red, then take you out of TEX mode and place the cursor between the braces. This makes it more convenient to type commands that LYX doesn't know which take an argument.

LYX can't do absolutely everything that LATEX can do (yet?). Some fancy functions are not supported at all, while some work but aren't WYSIWYM. TEX mode allows users to get the full flexibility of LATEX, while having all the convenient features of LYX, like WYSIWYM math, tables, and editing. LYX could never support every LATEX package. However, by typing \usepackage{foo} in the preamble (see Section [*]), you can use any package you want -- although you won't have WYSIWYM support for that package's features.


next up previous contents
Next: Importing LATEX Documents Up: LYX for LATEX Users Previous: LYX for LATEX Users   Contents
Jay Bolton 2004-04-15