Thanks. That is what I want to achieve and your example does accomplish
this, but I don't understand why using the first form of "Argument"
declaration in the layout file, without 'post:', the second argument to the
command is always the text from the work area, this is,

\command{arg1}{work area text}{arg2}{arg3} ...

I understand that's what 'post:' does, but without it, I obtain the same
result. What if I want to generate the following?

\command{arg1}{arg2}{arg3}{work area text}

In my particular case, it seems to me that there is no particularly good
reason why the "category" field should be treated differently than the
others (CR code, sub-category, subject).

Also, why doesn't the "Mandatory 0" flag work? I would expect it to produce
an argument enclosed in [...], not in {...}.

Thanks

PS: The style I want to use is ACM small journals (
http://www.acm.org/publications/submissions/latex_style). I'm not sure if
it's the same as the one for SIG proceedings, but I'm guessing there will
be some differences.

On Thu, Nov 13, 2014 at 4:01 AM, Jürgen Spitzmüller <sp...@lyx.org> wrote:

> 2014-11-12 21:14 GMT+01:00 Ernesto Posse:
>
>> 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?
>>
>
> Maybe I misunderstand you, but don't you want to achieve this output:
>
> \category{CR-Number}{Category}{Sub-Category}[Subject Descriptor]
>
>
> Whereas the second mandatory argument ("Category") is what is inserted in
> the main text?
>
> (I figured that you want to use this style:
>
> http://www.acm.org/sigs/publications/sigguide-v2.2sp)
>
>
> The attached document shows this (the definition is in Document > Local
> Layout).
>
>
> Jürgen
>
>


-- 
Ernesto Posse
Zeligsoft.com

Reply via email to