avoid prepending \protect to custom inset
ehud.behar at protonmail.com
ehud.behar at protonmail.com
Wed Feb 23 13:52:02 UTC 2022
Thanks a lot. That's right. Modifying InsetLayout Marginal located in the stdinsets.inc file indeed controls the presence or absence of "\protect".
The reason I want to get rid of it is because that without the protect, the exported tex file looks more the way I would have typed in a text editor outside of LyX.
From the TeX point of view, is there really a reason for the protect in this case?
------- Original Message -------
On Tuesday, February 22nd, 2022 at 9:28 AM, Jürgen Spitzmüller <spitz at lyx.org> wrote:
> Am Mo., 21. Feb. 2022 um 18:23 Uhr schrieb tush via lyx-users <lyx-users at lists.lyx.org>:
>
>> I created the following module that adds the parbox command to LyX. That is, inserts the latex code "\parbox{\marginparwidth}{text goes here}" as an inset.
>>
>> For some reason lyx prepends "\protect" to this command when inserted inside a box, which itself is inserted inside a marginal note. See image.
>
> This is since InsetMargin has NeedProtect.
>
>> I added the NeedProtect option for this Inset and toggled both boolean values but the "\protect" is still there.
>>
>> I don't want it to appear there.
>
> Why? It is most likely needed. Is there a reason you want to get rid of it?
>
> Jürgen
>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220223/890df8e8/attachment-0001.html>
More information about the lyx-users
mailing list