On 09/18/2015 09:40 AM, Sajjad wrote:
Hello forum,

I am trying to insert TeX code directly from the LyX interface Insert->Tex Code . Then I see a box in the editor. Inside the box I entered the following:

\sqrt A-B
But that is not correct TeX code. If you were to write that in an editor and tried to run TeX, you would get the same error. If you write, in the box, (as TeX claims it will do in that error message) $\sqrt A-B$ you would not get an error, but you would also not get what I suspect you want. The $s put it in math mode for TeX. To get the square root of the difference, write $\sqrt{A-B}$. Alternately, go to Math mode in LyX, rather than TeX mode, and enter \sqrt . If you then hit the space bar, you see a little blue square root sign, with a blue box inside, and the cursor in the box. Then enter A-B. Easier, and you see what you will get.


--
David L. Johnson
Department of Mathematics
Lehigh University

Reply via email to