Re: Detokenized Math Macros?
On Wed, Nov 11, 2020 at 9:06 AM Richard Kimberly Heck wrote: > On 11/10/20 1:13 PM, Joel Kulesza wrote: > > Colleagues, > > > > Is there a way to detokenize math macros in LyX such that characters > > like an underscore are not passed? I'd like to highlight text and > > then apply the macro (via toolbar button/shortcut), but it passes > > through characters without escaping them automatically. > > This is intentional. The idea is that you can write some LaTeX, > highlight it, and them hit ctrl-M to make it math. Or paste it. Or > whatever. > 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. > My goal is to apply macro-based styling to various keywords in a > > document, so a macro seems like the most natural way to mark those > > items and then update them, as needed. However, I'm happy to consider > > other, better, ways to accomplish that. > > This looks like a job for a character style. The Logical Markup module > defines a 'Code' style that renders its content as monospace. Of course, > it can be customized. > Interesting—I'll look into that. Thanks Riki! - Joel -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: Detokenized Math Macros?
On 11/10/20 1:13 PM, Joel Kulesza wrote: Colleagues, Is there a way to detokenize math macros in LyX such that characters like an underscore are not passed? I'd like to highlight text and then apply the macro (via toolbar button/shortcut), but it passes through characters without escaping them automatically. This is intentional. The idea is that you can write some LaTeX, highlight it, and them hit ctrl-M to make it math. Or paste it. Or whatever. My goal is to apply macro-based styling to various keywords in a document, so a macro seems like the most natural way to mark those items and then update them, as needed. However, I'm happy to consider other, better, ways to accomplish that. This looks like a job for a character style. The Logical Markup module defines a 'Code' style that renders its content as monospace. Of course, it can be customized. Riki -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Detokenized Math Macros?
Colleagues, Is there a way to detokenize math macros in LyX such that characters like an underscore are not passed? I'd like to highlight text and then apply the macro (via toolbar button/shortcut), but it passes through characters without escaping them automatically. For example, please see the attached MWE. My goal is to apply macro-based styling to various keywords in a document, so a macro seems like the most natural way to mark those items and then update them, as needed. However, I'm happy to consider other, better, ways to accomplish that. Thank you, Joel detokenize_macro.lyx Description: Binary data -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users