<div dir="ltr"><div dir="ltr">On Wed, Nov 11, 2020 at 9:06 AM Richard Kimberly Heck <<a href="mailto:rikiheck@lyx.org">rikiheck@lyx.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 11/10/20 1:13 PM, Joel Kulesza wrote:<br>
> Colleagues,<br>
><br>
> Is there a way to detokenize math macros in LyX such that characters <br>
> like an underscore are not passed?  I'd like to highlight text and <br>
> then apply the macro (via toolbar button/shortcut), but it passes <br>
> through characters without escaping them automatically.<br>
<br>
This is intentional. The idea is that you can write some LaTeX, <br>
highlight it, and them hit ctrl-M to make it math. Or paste it. Or whatever.<br></blockquote><div><br></div><div>Makes sense, and I understand.  I was asking on behalf of a colleague with the hope that there was a "quick fix" based on how we've implemented macros. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">> My goal is to apply macro-based styling to various keywords in a <br>
> document, so a macro seems like the most natural way to mark those <br>
> items and then update them, as needed.  However, I'm happy to consider <br>
> other, better, ways to accomplish that.<br>
<br>
This looks like a job for a character style. The Logical Markup module <br>
defines a 'Code' style that renders its content as monospace. Of course, <br>
it can be customized.<br></blockquote><div><br></div><div>Interesting—I'll look into that.  Thanks Riki!</div><div><br></div><div>- Joel </div></div></div>