Hi Olivier, Thanks for your comment.
On 9/30/13 5:23 PM, Olivier Ripoll wrote:> On 30.09.2013 13:57, Michael Bach wrote: >> Dear LyX Users and Developers, >> >> I would like to add the numberbychapter=true option to the listings >> package for the code listings. I looked around but did not find a GUI >> option for it. I found a related issue [1] where the advice was to file >> a feature request to add options to packages already loaded by LyX. >> >> Could someone give me a hint? > > For listings, you can access the individual inset settings by right > clicking on it, the selecting "Settings...". > Then, you can type settings not in the GUI in the "Advanced" tab. Type > your options in the "More Parameters" text box. > > If you want to apply the settings to all listings in the document, which > is the case here (this option is global), then type the text directly in > Documents->Settings->Listings > I had the impression that the `numberbychapter' option is a package option and not an option for single (global) listing(s). > However, that option is true by default (according to listings > documentation and to my tests), so you should not need to do anything. > > If you want to switch the option off, then type > numberbychapter=false > in the above mentioned place. Note that LyX may prevent you to apply the > change, in such case you can check the "Bypass validation" option (I > needed to do that for that specific option). > I tested as you suggested in the global dialog and setting it true or false there makes no difference, both gives consecutive numbering "Code 1", "Code 2" etc., i.e. not what I want. > Tested in LyX 2.0.6 on Windows with MikTeX. > FWIW, I am in 2.0.5.1 on OS X 10.8.5 with MacTeX. One thing strikes me as odd just from the name of that option: I am using the `article' document class and not `book' where chapter is a sectioning command. That should be irrelevant, I guess (?). Best Regards, Michael
