Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Ernesto Posse
I figured out the problem: on the Mac LyX stores the UserDir under ~/Library/Application Support/LyX-. I still had version 2.0 and was editing my layout file in that folder, rather than the one in the 2.1 folder. I now works as expected. Thanks again. On Fri, Nov 14, 2014 at 3:46 AM, Jürgen Spit

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > > 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). > > No. You are sure that you do not have a copy of the layout file which is > used by LyX? Also assure

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Jürgen Spitzmüller
Ernesto Posse wrote: > 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

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Ernesto Posse
Thanks. Comments inline below. On Thu, Nov 13, 2014 at 9:57 AM, Jürgen Spitzmüller 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

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Jürgen Spitzmüller
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

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread 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 t

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Jürgen Spitzmüller
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 "Man

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread 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 argumen

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Jürgen Spitzmüller
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 > InPreamble1 > LabelTypeStatic > LabelString"Category" >

Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Jürgen Spitzmüller
2014-11-12 19:18 GMT+01:00 Ernesto Posse: > Hi. I'm trying to define my own layout file and I ran into this situation: > I need a style whose latex command must go into the preamble (as required > by the underlying latex class), but I need to define my own command for the > style because the one p

Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Ernesto Posse
Hi. I'm trying to define my own layout file and I ran into this situation: I need a style whose latex command must go into the preamble (as required by the underlying latex class), but I need to define my own command for the style because the one provided by the base class doesn't work well with th