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

2022-03-27 Thread Jürgen Spitzmüller via lyx-users
Am Sonntag, dem 27.03.2022 um 16:25 + schrieb tush via lyx-users:
> 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?

InsetLayout Flex:MarginalNote
LyXTypecustom
LabelString"Margin Note"
LatexType  Command
LatexName  marginnote
Decoration classic
NeedProtect0
Argument post:1
LabelString vertical
EndArgument
End

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


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

2022-03-27 Thread tush via lyx-users
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?-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users