2

I was trying to create my Lyx document in a structured way by defining a new latex command in the preample for the representation of complex conjugation, to keep all flexibility in case I would like to change it. In the preamble I added:

\let\cc\overline

How do I get Lyx to display the overline in the editor as I type my formulas?

0
1

In a LyX'ian way you can to the following instead of putting the definition in the LaTeX preamble.

At the beginning of your document do:

  1. Select menu "Insert" > "Math" > "Macro".
  2. Type cc and select "Edit" > "Math" > "Macro Definition" > "Append Argument".
  3. Go to the "TeX" field, mark/select the #1, and apply the style you like, e.g. type \overline + space

Later in a math environment:

Type \cc + space and then type whatever variable or expression you what to have \cc applied on

Finally, a little picture about the two parts above:

Macro definition

1

One was is to enable instant preview for math (Tools > Preferences > Look & Feel > Display) and then use ERT inside of math (control + L). Or use ERT outside of math and use instant preview (select the ERT box and put Insert > Preview. If you do this though you have to enter math mode yourself in the ERT.

You might find useful information in Help > Math, in the section "User-defined Commands".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.