On 03/20/2018 03:39 PM, Baris Erkus wrote:

Hello,

Is there a way to change the latex math code in LyX by editing the code?

For example, if I enter a fraction in math environment using back slash  like \frac, is there a way to edit this Latex code and make it \dfrac simply by placing “d” in front of “f”?

Baris Erkus

Yes, but not (I think) within LyX. Instead, open the .lyx file in your favorite text editor, make the change and save it. If you do this while LyX is open (at least LyX 2.3.0; I haven't tried it with earlier versions), LyX will warn you that the document changed and ask if you want to reload it.

If you are not sure exactly what you are looking for in the text editor, you can open the preview pane (View > Code Preview Pane in 2.3.0; I think this might have been View > Source or something similar in previous versions). Set the format selector to LyX and the view selector to Current Paragraph, then put the cursor in the math formula you want to change and see what it looks like in the .lyx file.

Paul

Reply via email to