create an Inset for \marginnote{text}[arg]

ehud.behar at protonmail.com ehud.behar at protonmail.com
Sun Mar 27 16:25:47 UTC 2022


I am having difficulties creating a Flex Inset that creates the following command:

\marginnote{text}
and
\marginnote{text}[arg]

Because sometimes the user needs to give the argument arg​.

If I do the following:

InsetLayout Flex:MarginalNote

LyXType custom

LabelString "Margin Note"

LatexType Command

LatexName marginnote

Decoration classic

NeedProtect 0

Argument 1

LabelString vertical

Mandatory 0

LeftDelim [

RightDelim ]

EndArgument

Argument 2

LabelString left

#Mandatory 0

Requires 1

LeftDelim [

RightDelim ]

EndArgument

End

Then I get the latex code \marginnote[arg]{text goes here}.
I tried to follow the instruction written in section 5.3.7 (for "Requires") in the customization manual, but I can't figure it out my self.

What changes should I make?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220327/eebbff32/attachment.html>


More information about the lyx-users mailing list