[Tex/LaTex] Creating wysiwyg preview for a custom math functions on lyx

lyxwysiwyg

Let's say I want to create a "macro" called \limx that will be defined as:

\newcommand{\limx}{\displaystyle{\lim_{x\to\x_{0}}}}

How can I make LyX recognize it and make an auto-prieview of it?

Another example, I'm using the cancel package. When I'm using \cancel in a math equation it doesn't preview it while editing. I can still see "\cancel" on the equation editor. Only when I render the document the \cancel is being really rendered. How can I add that functionality to the LyX's WYSIWYG environment as well?

Best Answer

As I understand things, it's not necessary to do anything special for macros that get used inside equations; LyX just runs them through LaTeX and (with the aid of preview.sty) extracts the preview images.

Related Question