I'm migrating from standard LaTeX to LyX and I'm having issues with using \newcommand.
I like to leave around my texts some highlighted red texts (the idea is that I should fix something afterwards). I've done this in Latex just by including \newcommand{\replace}[1]{{\bf\color{red}{#1}}}
and afterwards just write \replace{ Confirm this ! }
to leave the message.
I'm not being able to find on the internet a way of creating a "non-math" command with an input in LyX. Is there a way?
Thanks !
Best Answer
LyX supports the concept of Character Styles one can select from the Text Style menu.
However, to be available, character styles have to be defined inside a
.layout
file or in the document-local Local Layout field available under Document Setting. (The Local Layout basically can be understood as the LyX-specific preamble of the document.)Add the following to the Local Layout:
Now you have a new character style Replace available in your document.