braket package defines Dirac's braket notation. To use it in Lyx, I add the line:
to the LaTeX preamble. Then Lyx will be able to compile commands like
\ket. Problem is that the Lyx editor itself won't recognize this commands.
If instead of using the
braket package I had defined math-macros for the commands
\ket, etc., I could tell Lyx how these things should look in the editor. That is, I can tell it to put an
\rangle before the argument (that Lyx knows how to draw) and a
Is there a way to use the
\ket, etc., commands from the
braket package, and still be able to tell Lyx how these should look in the editor?
EDIT: Right after posting, I discovered this question, which mentions the Instant Preview feature of Lyx. Although this kind of fixes my issue, it's not exactly what I want. I want to be able to specify what the command should look like in the editor, in terms of other commands that Lyx already recognizes (in the editor), like I would do with a math-macro.