[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-users
Subject:    Re: How to change Lyx numbering styles with modules
From:       Guenter Milde <milde () users ! berlios ! de>
Date:       2009-04-30 9:15:03
Message-ID: gtbq6n$uvu$1 () ger ! gmane ! org
[Download RAW message or body]

On 2009-04-21, Stefano Franchi wrote:

> I am trying to write a few very simple modules that will change the
> labels Lyx displays for sectioning and enumerate environments to
> reflect the final output. However, I cannot figure out how to do it.

> For instance, let's say that I want to redefine subsubsections to show
> just the subsubsection number followed by a period with this
> declaration:

> \renewcommand\thesubsubsection{\arabic{subsubsection}.}

> I thought I could put this bit of code in a module within the AddToPreamble 
> block and then change the actual appearance within Lyx in the Style 
> Subsubsection block. But I am stumped. The relevant style block in the 
> standard file stdsections.inc shows:


> Style Subsubsection
>         CopyStyle             Subsection
>         LabelCounter            subsubsection
>         TocLevel              3
>         LatexName             subsubsection
>         TopSep                0.7
>         BottomSep             0.4
>         Font
>           Series              Bold
>           Size                Normal
>         EndFont
> End

> which I assume means that the label is produced from the Latex label 
> subsubsection.  Since I just instructed LyX to redefine it, shouldn't
> LyX pick up the correct label?

It means (to you) that the label corresponds to subsubsection, but
LyX cannot parse the LaTeX definitions and does its own counting.

Unfortunately, the possibilities to configure LyX counters are limited
(at least the ones documented in the Customization guide). (I did not
find a way to generate correct labels for the "continuing enumeration" in
the enumitem module.)

> What should I change in the LabelCounter field of that block to produce
> the proper label? I am clearly missing something about how modules work
> (or, rather, LyX).  Reading the Customization manual did not provide
> any enlightenment.

My knowledge in this field is limited as well.
Asking in the LyX devel list might help.

Günter


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic