How to create an empty macro?
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon May 12 15:28:48 UTC 2025
Le 12/05/2025 à 16:57, Richard Kimberly Heck a écrit :
> On 5/12/25 5:47 AM, Jean-Marc Lasgouttes wrote:
>> Hi there,
>>
>> I tried to replace the example in section 6.9 Branches of the user's
>> guide by proper math macros, because the example as it is breaks
>> previews.
>>
>> So I would like to define
>> \newcommand[1]{\question}{#1}
>> \newcommand[1]{\answer}{}
>>
>> However, I cannot construct a math macro that does not use its
>> parameter. The parameter is automatically removed. Is there a way
>> around this?
>
> Add the argument to the LyX box, and put \relax (or whatever) in the
> LaTeX box. Presumably, one wants some version of the content to show in
> LyX itself anyway.
Not really a good example to put in a UserGuide, then. But indeed, it
would work.
I have not found yet an example with macros that would make sense and be
simple enough. The current example is stupid _and_ breaks previews.
Thanks,
JMarc
More information about the lyx-devel
mailing list