avoid prepending \protect to custom inset
ehud.behar at protonmail.com
ehud.behar at protonmail.com
Mon Feb 21 17:22:55 UTC 2022
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.
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.
Any idea on how to remove it?
The module file is attached. Its content is the following:
> #\DeclareLyXModule{Parbox}
> #DescriptionBegin
> #Adds LaTeX parbox command with the width of the margin paragaraph, as an inset (Insert->Custon Insets->Parbox)
> #DescriptionEnd
>
> Format 66
>
> InsetLayout Flex:parbox
> LyXType custom
> LabelString "paragraphBox"
> LatexType Command
> LatexName parbox{\marginparwidth}
> Decoration classic
> NeedProtect 1
> End
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220221/ffe1a727/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parbox.module
Type: application/octet-stream
Size: 391 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220221/ffe1a727/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: protect screen shot.png
Type: image/png
Size: 301232 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220221/ffe1a727/attachment-0001.png>
More information about the lyx-users
mailing list