LyX ⇒ Text-macro in LyX
Text-macro in LyX
More specifically, I would like that a particular word, say "dummy", has a particular font style, say "\textcolor{red}{\textsf{Dummy}}" in LaTeX.
Of course, I can define a \newcommand in the preamble, but this is not very convenient in LyX because I would have to use a ERT environment each time I write "dummy".
In LyX, the words "lyx" and "latex" are automatically replaced and this is the kind of thing I would like to do.
In other words, I look for an equivalent of the math-macros but that can be applied to regular text and not only in the math environment.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Text-macro in LyX
Strangely enough this was just asked on stackexchange. Please see my answer and warning there:
http://tex.stackexchange.com/questions/ ... 1591#71591
I might see if the LyX developers would consider adding a more flexible way for the user to do this. However, my guess is that there's a reason why it's not easy to do.
Scott