[Tex/LaTex] LyX & LaTeX formulas

lyxmath-mode

When I open a new project in LyX, i cannot pass LaTeX functions inside my text. e.g. \sqrt A or \frac{A}b etc. As i know and i have seen in many video presentations when the user insert a LaTeX formula in LyX editor this is compiled directly to a "understood-mathematical" output. Should i activate something?

** (I am new to LaTeX and LyX; until now i was using MS Word. First I tried to install MikTeX, but ran into problems; now I have installed TEXlive and LyX to do my job. It is working nice but the installation TEXlive takes time (~2h))

Best Answer

You have to be in math mode. Type Ctrl + M. Then do \frac{x}{y}. After you type \frac LyX will convert it into its internal representation.

If you want to type LaTeX directly, you could alternatively insert it with Ctrl + L (or Insert > TeX Code).

Finally, note that in LyX 2.1 you will be able to paste LaTeX code in and it will be converted. This was already true of math but now you can paste, for example, \textbf{hello}. To do that, go to edit > paste > LaTeX text (this name might be different on release but it should be in that place).