Thanks. Comments inline below. On Thu, Nov 13, 2014 at 9:57 AM, Jürgen Spitzmüller <sp...@lyx.org> wrote:
> 2014-11-13 15:38 GMT+01:00 Ernesto Posse: > >> 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} >> > > If you do not use post:, you need to stick with the pre numbering, that is > > Argument 1 > > Mandatory 1 > > LabelString "CR number" > > EndArgument > > Argument 2 > > Mandatory 1 > > LabelString "Sub-Category" > > EndArgument > > Argument 3 > > LabelString "Subject Descriptor" > > EndArgument > > > That's exactly what I tried but got exactly the same result as using 'post:'. I think that for some reason, when I reconfigure and restart, LyX is not catching the changes in the layout file. I've tried running it from the command-line with different debug options, but I don't see anything about it, other than a comment saying that it's loading layout files, but not mention of whether it was successful or not. Is it possible that LyX caches layout files somewhere and it's not picking up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's worth). > 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). >> > > Maybe you are looking for a flex inset rather than a style? > > I've read a bit about those, but I don't think so. I just need a plain command, and the documentation explicitly says that the output should be such that the work area text is the last argument to the command. > >> Also, why doesn't the "Mandatory 0" flag work? I would expect it to >> produce an argument enclosed in [...], not in {...}. >> > > > Works for me. Although it is superfluous (Mandatory is false by default). > > In your example it seems to work. I've no idea why it's not working for my other test files. The only difference seems to be that I'm not using a local layout. > Jürgen > > >> >> 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. >> > > -- Ernesto Posse Zeligsoft.com