I would like a file of latex commands to be rendered in LyX's editor.
Variations of this question exist all over the internet and tex stack exchange, but the answers seem either inconsistent, not sufficiently explicit, or outdated.
Suppose I create a file called mycommands.tex
% Tex commands
\newcommand{foo}{\alpha}
\newcomman{bar}{\beta}
Then, in the LyX preamble, I do \usepackage{mycommands}
or \input{mycommands.tex}
is there a way to get these user-defined commands to render/preview? To be even clearer, if I type control+M, then \alpha in LyX, it will render an $\alpha$ right in my editor. If I type control+M then \foo, will it also render?
LyX must get these definitions from somewhere. And presumably people running Linux should have access to all the installation files, and there must be a way to define new commands that render in LyX.
This one is related: tex stack exchange post
Thanks!