> You can do this for mathed but not for the rest of LyX. Eg, typing as
> normal text "$a=b+c$" (without quotes), highlighting the block and
> selecting Insert->Math->Display Formula will convert the code into a
> mathed inset.
Still it would be great, if it were possible to do that with any text.
Since the functionality is there already for the import... I try to put
a feature request...
If LyX interprets \textcolor{red}{} as you'd like, why not add a
pre-processor step to your conversion. Something like (untested):
$ sed 's/\\fp{}/\\textcolor{red}{}/g' input.tex > output.tex
$ diff -u input.tex output.tex
Unfortunatelly, LyX does not do that. I was very surprised since color
text gets exported to LaTeX as \textcolor{} but the import does not
work. It gets imported as two ERT boxes: one with \textcolor{red}{ and
the other with the closing brace }.
Thank you,
David