Thanks. That's quite nice, but it doesn't work quite as expected.
I tried the two forms, arguments with and without 'post:' and I get the
same result: the second argument of the command is the "body" (the text
that follows all arguments) and "Mandatory 0" seems to be ignored (the
generated argument is enclosed in {...} rather than [...]). For example, if
in the LyX work area I write the following (with text enclosed in <...>
representing the style name and <...>[ ... ] representing an argument inset)
<Category> <CR number>[D.2.4.1] <Category>[Software Engineering]
<Sub-category>[Software/Program Verification] <Subject> [Formal methods]
Some other text
Then the resulting code is
\category{D.2.4.1}{Some other text}{Software Engineering}{Software/Program
Verification}{Formal methods}
So it looks like all arguments after the first are treated as if they where
tagged with 'post:' and the optional flag seems to be ignored.
Is this a bug or am I missing something?
On Wed, Nov 12, 2014 at 2:08 PM, Jürgen Spitzmüller <[email protected]> wrote:
> 2014-11-12 20:01 GMT+01:00 Jürgen Spitzmüller:
>
>
>> However, if you use LyX 2.1, you do not need an own command, since the
>> command in question is possible with the help of the new argument syntax:
>>
>> Style Category
>> InPreamble 1
>> LabelType Static
>> LabelString "Category"
>> LatexType Command
>> LatexName category
>> Argument 1
>> Mandatory 1
>> LabelString "CR number"
>> EndArgument
>> Argument 2
>> Mandatory 1
>> LabelString "Category"
>> EndArgument
>> Argument 3
>> Mandatory 1
>> LabelString "Sub-Category"
>> EndArgument
>> Argument 4
>> LabelString "Subject Descriptor"
>> EndArgument
>> Margin Dynamic
>> Labelsep xx
>> LabelFont
>> Family Sans
>> Series Bold
>> Shape Slanted
>> Size Normal
>> Color Blue
>> EndFont
>> End
>>
>
>
> Sorry, this should be:
>
> Style Category
> InPreamble 1
> LabelType Static
> LabelString "Category"
> LatexType Command
> LatexName category
> Argument 1
> Mandatory 1
> LabelString "CR number"
> EndArgument
> Argument post:1
> Mandatory 1
> LabelString "Sub-Category"
> EndArgument
> Argument post:2
> LabelString "Subject Descriptor"
> EndArgument
> Margin Dynamic
> Labelsep xx
> LabelFont
> Family Sans
> Series Bold
> Shape Slanted
> Size Normal
> Color Blue
> EndFont
> End
>
>
> Jürgen
>
>
--
Ernesto Posse
Zeligsoft.com