Re: module question - modifying list environment
Jean-Marc Lasgouttes wrote: Richard Heck writes: James C. Sutherland wrote: I think that we could benefit from a detailed description of how to create modules, and what all of the knobs mean. For example, I struggled with determining how to set a "LabelType" and "LabelString" in LyX. I never got quite what I wanted: something like "Task 1" "Task 2" etc. The closest I could get was "Task" or "1" but not a string and a counter together. The compiled output looks fine, but in LyX it isn't quite what I would like... I'll try to have a look at this. I've been puzzled myself about how the item counters, etc, work, and frustrated by similar limitations. I'm not sure there is any way to get exactly what you want in an item- or list-type environment. Look at the chapter style: Style Chapter MarginStatic Category Section LabelString "Chapter \thechapter" LabelStringAppendix "Appendix \thechapter" LabelType Counter LabelCounterchapter Easy, isn't it? Sorry, my question was more about list-type environments, and how to change to, say, \roman in an enumeration like environment. That's now been filed as an enhancement request. I'm not sure how this applies to the OP's issue. rh
Re: module question - modifying list environment
Richard Heck writes: > James C. Sutherland wrote: >> I think that we could benefit from a detailed description of how to >> create modules, and what all of the knobs mean. For example, I >> struggled with determining how to set a "LabelType" and >> "LabelString" in LyX. I never got quite what I wanted: something >> like "Task 1" "Task 2" etc. The closest I could get was "Task" or >> "1" but not a string and a counter together. The compiled output >> looks fine, but in LyX it isn't quite what I would like... >> > I'll try to have a look at this. I've been puzzled myself about how > the item counters, etc, work, and frustrated by similar limitations. > I'm not sure there is any way to get exactly what you want in an item- > or list-type environment. Look at the chapter style: Style Chapter MarginStatic Category Section LabelString "Chapter \thechapter" LabelStringAppendix "Appendix \thechapter" LabelType Counter LabelCounterchapter Easy, isn't it? JMarc
Re: module question - modifying list environment
Stefano Franchi wrote: I just learned (on the developers list) that the behavior of the counter in the Enumerate environment is hardcoded and cannot be modified by modules. My problem was how to modify the counter strings (from levels 2 on) from roman to arabic. Presumably, the problem discussed here runs into the the same difficulty. We non-coders neeed to wait until the developers change the C++ code and make Enumerate customizable. Stefano, could you file an enhancement request for this, and cc me (at rgh...@comcast.net). I seem to be the layout guy these days, and I'd like to do the same thing you want to do. Viz, I want a Roman Enumerate environment, which I can easily get LaTeX-wise, but not in LyX. Richard
Re: module question - modifying list environment
James C. Sutherland wrote: I think that we could benefit from a detailed description of how to create modules, and what all of the knobs mean. For example, I struggled with determining how to set a "LabelType" and "LabelString" in LyX. I never got quite what I wanted: something like "Task 1" "Task 2" etc. The closest I could get was "Task" or "1" but not a string and a counter together. The compiled output looks fine, but in LyX it isn't quite what I would like... I'll try to have a look at this. I've been puzzled myself about how the item counters, etc, work, and frustrated by similar limitations. I'm not sure there is any way to get exactly what you want in an item- or list-type environment. One thing I should say is that this is nothing specifically to do with modules. Modules are just fragments of layout, so it's an issue about layout in general. Richard
Re: module question - modifying list environment
On Wednesday 06 May 2009 09:18:59 am James C. Sutherland wrote: > On May 6, 2009, at 12:40 AM, Guenter Milde wrote: > > On 2009-05-06, James C. Sutherland wrote: > >> I am trying to create a modified List environment where is counter is > >> not reset each time the environment begins. I have created a module > >> (attached) that does part of this for me - it creates a new > >> "TaskList" > >> environment in LyX. However, I cannot seem to get the counter to keep > >> incrementing - it resets with each instantiation of the environment. > > > > You might try the enumitem.module. Search at http://wiki.lyx.org for > > "enumitem". > > > > (Actually, the Counter is re-set in LyX as well (but blue to make > > sure it is just an internal label), the LaTeX output uses the > > "enumitem" > > package.) > > > > Günter > > I have used the enumitem module. However, I wanted to change the > enumeration name ("Task 1" rather than "1"). Also, I wanted to be > able to have enumeration environments in my document and a special > "TaskItem" environment that was globally incremented. The enumitem > module will not quite allow this. > > I think that we could benefit from a detailed description of how to > create modules, and what all of the knobs mean. For example, I > struggled with determining how to set a "LabelType" and "LabelString" > in LyX. I never got quite what I wanted: something like "Task 1" > "Task 2" etc. The closest I could get was "Task" or "1" but not a > string and a counter together. The compiled output looks fine, but in > LyX it isn't quite what I would like... I just learned (on the developers list) that the behavior of the counter in the Enumerate environment is hardcoded and cannot be modified by modules. My problem was how to modify the counter strings (from levels 2 on) from roman to arabic. Presumably, the problem discussed here runs into the the same difficulty. We non-coders neeed to wait until the developers change the C++ code and make Enumerate customizable. Cheers, S. __ Stefano Franchi Department of Philosophy Ph: (979) 862-2211 Texas A&M University Fax: (979) 845-0458 305B Bolton Hall fran...@philosophy.tamu.edu College Station, TX 77843-4237
Re: module question - modifying list environment
On May 5, 2009, at 10:26 PM, Steve Litt wrote: On Tuesday 05 May 2009 11:07:13 pm James C. Sutherland wrote: On May 5, 2009, at 6:06 PM, James C. Sutherland wrote: LyX Module Gurus: I am trying to create a modified List environment where is counter is not reset each time the environment begins. I have created a module (attached) that does part of this for me - it creates a new "TaskList" environment in LyX. However, I cannot seem to get the counter to keep incrementing - it resets with each instantiation of the environment. This may be a LaTeX question, since I cannot get it working properly in LaTeX either. I just hope someone out there can shed some light on this... I have managed to find a solution to this (see attached), although I could really benefit from knowing how modules work in more depth. The user manual (Customization Ch. 5) is very terse on this topic! I'm almost positive both of you should have used "LatexType Item_Environment" in the LyX part of your definitions. Actually it works fine without it. I tried two things: LatexType List_Environment LatexType Item_Environment The "List" option worked better for me since the "Item" one just gives a bullet in LyX whereas the List option allows you more control over what LyX shows for the enumeration. However, this is all pretty cloudy to me - there is a sore lack of documentation on this really nice feature in LyX.
Re: module question - modifying list environment
On May 6, 2009, at 12:40 AM, Guenter Milde wrote: On 2009-05-06, James C. Sutherland wrote: I am trying to create a modified List environment where is counter is not reset each time the environment begins. I have created a module (attached) that does part of this for me - it creates a new "TaskList" environment in LyX. However, I cannot seem to get the counter to keep incrementing - it resets with each instantiation of the environment. You might try the enumitem.module. Search at http://wiki.lyx.org for "enumitem". (Actually, the Counter is re-set in LyX as well (but blue to make sure it is just an internal label), the LaTeX output uses the "enumitem" package.) Günter I have used the enumitem module. However, I wanted to change the enumeration name ("Task 1" rather than "1"). Also, I wanted to be able to have enumeration environments in my document and a special "TaskItem" environment that was globally incremented. The enumitem module will not quite allow this. I think that we could benefit from a detailed description of how to create modules, and what all of the knobs mean. For example, I struggled with determining how to set a "LabelType" and "LabelString" in LyX. I never got quite what I wanted: something like "Task 1" "Task 2" etc. The closest I could get was "Task" or "1" but not a string and a counter together. The compiled output looks fine, but in LyX it isn't quite what I would like...
Re: module question - modifying list environment
On 2009-05-06, James C. Sutherland wrote: > I am trying to create a modified List environment where is counter is > not reset each time the environment begins. I have created a module > (attached) that does part of this for me - it creates a new "TaskList" > environment in LyX. However, I cannot seem to get the counter to keep > incrementing - it resets with each instantiation of the environment. You might try the enumitem.module. Search at http://wiki.lyx.org for "enumitem". (Actually, the Counter is re-set in LyX as well (but blue to make sure it is just an internal label), the LaTeX output uses the "enumitem" package.) Günter
Re: module question - modifying list environment
On Tuesday 05 May 2009 11:07:13 pm James C. Sutherland wrote: > On May 5, 2009, at 6:06 PM, James C. Sutherland wrote: > > LyX Module Gurus: > > > > I am trying to create a modified List environment where is counter > > is not reset each time the environment begins. I have created a > > module (attached) that does part of this for me - it creates a new > > "TaskList" environment in LyX. However, I cannot seem to get the > > counter to keep incrementing - it resets with each instantiation of > > the environment. > > > > This may be a LaTeX question, since I cannot get it working properly > > in LaTeX either. I just hope someone out there can shed some light > > on this... > > I have managed to find a solution to this (see attached), although I > could really benefit from knowing how modules work in more depth. The > user manual (Customization Ch. 5) is very terse on this topic! I'm almost positive both of you should have used "LatexType Item_Environment" in the LyX part of your definitions. SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt
Re: module question - modifying list environment
On May 5, 2009, at 6:06 PM, James C. Sutherland wrote: LyX Module Gurus: I am trying to create a modified List environment where is counter is not reset each time the environment begins. I have created a module (attached) that does part of this for me - it creates a new "TaskList" environment in LyX. However, I cannot seem to get the counter to keep incrementing - it resets with each instantiation of the environment. This may be a LaTeX question, since I cannot get it working properly in LaTeX either. I just hope someone out there can shed some light on this... I have managed to find a solution to this (see attached), although I could really benefit from knowing how modules work in more depth. The user manual (Customization Ch. 5) is very terse on this topic! tasklist.module Description: Binary data