On 2008-11-30, stefano franchi wrote:

> I am trying really hard to understand how to produce interrupted multi-level
> lists in LyX/LaTeX,
...
> Every once in a while I need to insert text between the steps to make a
> more general point before resuming the argument. For clarity, I need to
> have the steps labeled with decimal numbering (i.e.. 1. 1.1, 1.2, etc.)

> Here is what I tried:

> 1. using the paralist package

> 2. Using the mdwlist package

I recommend the enumitem package (if you are using LyX 1.6, you can use
the attached enumitem module.

No need to explicitely \interrupt an enumeration. It just takes of the
last one *of the corresponding level* with the [resume] optional argument
(or with the Enumerate-Resume Style provided by the module).

Günter

enumitem.module:
================

#\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)}
#DescriptionBegin
# Control the layout of enumerate, itemize and description
# with an optional argument.
# See http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf
#DescriptionEnd
# Author: Günter Milde <[EMAIL PROTECTED]>

Format 11

# The package enumitem provides user control over the layout of the three
# basic list environments: enumerate, itemize and description. It supersedes
# both enumerate and mdwlist (providing well-structured replacements for all
# their funtionality), and in addition provides functions to compute the
# layout of labels, and to ‘clone’ the standard environments, to create new
# environments with counters of their own.
#
# - fancy labels and fancy refs,
# - leftmargin, labelsep and labelwidth automatically set,
# - changes applied globally or only in one of the three
#   types or even in a single list (including topsep) by
#   means of a sort of "inheritance",
# - several description styles (which fix some bad
#   spacing, too),
# - starting value and counter resuming,
# - trivlists properly formatted,
# - control on page breaking
#
# Styling the basic lists is possible 
#
# a) generally in the LaTeX preamble and 
# b) per environment with optional arguments
#
# See enumitem.pdf_ for details and examples.

AddToPreamble
        \usepackage{enumitem}
EndPreamble

# ensure the stdlist layouts are present (unmodified) 
# (as e.g. the KOMA script classes obsolete lyx-list with labeling)
# TODO: is this secure?

Input stdlists.inc

# Customizable Basic Lists
# ------------------------

# With enumitem, the three standard list environments take an optional
# argument. See enumitem.pdf_ for possible values.

Style Itemize
        OptionalArgs          1
End

Style Enumerate
        OptionalArgs          1
End

Style Description
        OptionalArgs          1
End

# List Variants
# -------------
#
# Styles with pre-defined optional arguments for ease of use

Style Enumerate-Resume
        CopyStyle             Enumerate
        LatexParam            [resume]
#       LatexParam            [resume*] # reuse optional arguments
        OptionalArgs          0
        # a blue label to indicate that this is not a WYSIWYG label
        # (the numbering differs in the output)
        LabelFont
          Color               blue
        EndFont
        
End

# Add compact lists here...

# References
# ----------
#
# .. _enumitem.pdf:
#    http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf


Reply via email to