From 64bb8264b9d31a619682247bf196f421f803bb7a Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 17 Apr 2011 00:50:31 +0000 Subject: [PATCH] Fix up the enumitem module by separating out the Labeling code, so that we do not have to copy and paste it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38423 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/enumitem.module | 40 +----------------------------- lib/layouts/stdlists.inc | 49 ++----------------------------------- 2 files changed, 3 insertions(+), 86 deletions(-) diff --git a/lib/layouts/enumitem.module b/lib/layouts/enumitem.module index 8816f81fd6..bcd6de120f 100644 --- a/lib/layouts/enumitem.module +++ b/lib/layouts/enumitem.module @@ -70,30 +70,10 @@ End # Customisable LyX List # --------------------- -# We expect this already to be defined, but there may be some classes -# that do not include stdlists.inc or do not declare Labeling. So we -# have copied the info from stdlists.inc. -# To make sure that we are starting fresh, we first clear everything. -NoStyle Labeling +Input stdlyxlist.inc Style Labeling - # copied from stdlists.inc - Category List LatexName elabeling - OptionalArgs 1 - Margin Manual - LatexType List_Environment - NextNoindent 1 - LabelSep xxx - ParSkip 0.4 - TopSep 0.7 - BottomSep 0.7 - ParSep 0.5 - Align Block - AlignPossible Block, Left - LabelType Manual - LabelString "00.00.0000" - # FIXME This should probably be defined using \newlist instead Preamble % labeling-like list based on enumitem's description list with @@ -104,24 +84,6 @@ Style Labeling leftmargin=\lyxlabelwidth,#1]} {\end{description}} EndPreamble - - HTMLTag ol - HTMLAttr class='lyxlist' - HTMLItem li - HTMLLabel span - HTMLLabelAttr class='lyxlist' - HTMLStyle - ol.lyxlist { - list-style-type: none; - } - li.labeling_item { - text-indent: -5em; - margin-left: 5em; - } - span.lyxlist { - margin-right: 1em; - } - EndHTMLStyle End diff --git a/lib/layouts/stdlists.inc b/lib/layouts/stdlists.inc index f0e8def3ee..9ec0568877 100644 --- a/lib/layouts/stdlists.inc +++ b/lib/layouts/stdlists.inc @@ -8,6 +8,8 @@ Format 35 +Input stdlyxlist.inc + Style Itemize Category List Margin Static @@ -84,53 +86,6 @@ Style Description End -Style Labeling - Category List - Margin Manual - LatexType List_Environment - LatexName lyxlist - NextNoindent 1 - LabelSep xxx - ParSkip 0.4 - TopSep 0.7 - BottomSep 0.7 - ParSep 0.5 - Align Block - AlignPossible Block, Left - LabelType Manual - LabelString "00.00.0000" - HTMLTag ol - HTMLAttr class='lyxlist' - HTMLItem li - HTMLLabel span - HTMLLabelAttr class='lyxlist' - - #define the environment lyxlist - Preamble - \newenvironment{lyxlist}[1] - {\begin{list}{} - {\settowidth{\labelwidth}{#1} - \setlength{\leftmargin}{\labelwidth} - \addtolength{\leftmargin}{\labelsep} - \renewcommand{\makelabel}[1]{##1\hfil}}} - {\end{list}} - EndPreamble - - HTMLStyle - ol.lyxlist { - list-style-type: none; - } - li.labeling_item { - text-indent: -5em; - margin-left: 5em; - } - span.lyxlist { - margin-right: 1em; - } - EndHTMLStyle -End - - Style List Obsoletedby Labeling End -- 2.39.2