From d6e9a804920a02a3adb105e4f641552513a40371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 12 Sep 2003 17:14:12 +0000 Subject: [PATCH] convert the stdinlcude to new label scheme, applied to to classes. More to come... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7740 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/article.layout | 19 ++++++ lib/layouts/broadway.layout | 6 +- lib/layouts/stdlists.inc | 42 ++++++------- lib/layouts/stdsections.inc | 117 +++++++++--------------------------- 4 files changed, 72 insertions(+), 112 deletions(-) diff --git a/lib/layouts/article.layout b/lib/layouts/article.layout index 4e2d6f2d03..51cfbe69c7 100644 --- a/lib/layouts/article.layout +++ b/lib/layouts/article.layout @@ -28,6 +28,7 @@ Style Part EndFont End + Style Part* Align Left AlignPossible Left @@ -38,3 +39,21 @@ Style Part* Size Larger EndFont End + + +Style Section + LabelString "\arabic{section}" + LabelStringAppendix "\Alph{section}" +End + + +Style Subsection + LabelString "@Section@.\arabic{subsection}" + LabelStringAppendix "@Section@.\arabic{subsection}" +End + + +Style Subsubsection + LabelString "@Subsection@.\arabic{subsubsection}" + LabelStringAppendix "@Subsection@.\arabic{subsubsection}" +End diff --git a/lib/layouts/broadway.layout b/lib/layouts/broadway.layout index 1c19bdb8c2..13fe9c5837 100644 --- a/lib/layouts/broadway.layout +++ b/lib/layouts/broadway.layout @@ -66,7 +66,8 @@ Style ACT # KeepEmpty 1 Align Center AlignPossible Center - LabelType Counter_Chapter + LabelType Counter + LabelCounter chapter LabelString "ACT " End @@ -81,7 +82,8 @@ Style SCENE # KeepEmpty 1 Align Center AlignPossible Center - LabelType Counter_Section + LabelType Counter + LabelCounter section LabelString "SCENE " End diff --git a/lib/layouts/stdlists.inc b/lib/layouts/stdlists.inc index 7d0c33be77..54501b04a5 100644 --- a/lib/layouts/stdlists.inc +++ b/lib/layouts/stdlists.inc @@ -6,7 +6,7 @@ # This include files contains various standard environments for lists. -# Itemize style definition + Style Itemize Margin Static LatexType Item_Environment @@ -20,11 +20,11 @@ Style Itemize ParSep 0.3 Align Block AlignPossible Block, Left - LabelType Static + LabelType Itemize LabelString * End -# Enumerate style definition + Style Enumerate Margin Static LatexType Item_Environment @@ -39,10 +39,10 @@ Style Enumerate ParSep 0.3 Align Block AlignPossible Block, Left - LabelType Counter_EnumI + LabelType Enumerate End -# Description style definition + Style Description Margin First_Dynamic LatexType Item_environment @@ -59,14 +59,12 @@ Style Description AlignPossible Block, Left LabelType Manual LabelString MM - - # label font definition LabelFont Series Bold EndFont End -# List style definition + Style List Margin Manual LatexType List_Environment @@ -84,19 +82,17 @@ Style List #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}} + \newenvironment{lyxlist}[1] + {\begin{list}{} + {\settowidth{\labelwidth}{#1} + \setlength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \renewcommand{\makelabel}[1]{##1\hfil}}} + {\end{list}} EndPreamble - End - Style Bibliography Margin Static LatexType Bib_Environment @@ -111,7 +107,7 @@ Style Bibliography ParSep 0.3 Align Block AlignPossible Block, Left - LabelType Counter_EnumI + LabelType Enumerate End @@ -131,8 +127,8 @@ End # TopSep 0.7 # BottomSep 0.7 # ParSep 0.3 -# Align Block -# AlignPossible Block, Left +# Align Block +# AlignPossible Block, Left # LabelType Static #End @@ -148,8 +144,8 @@ End # TopSep 0.7 # BottomSep 0.7 # ParSep 0.3 -# Align Block -# AlignPossible Block, Left -# LabelType Counter_EnumI +# Align Block +# AlignPossible Block, Left +# LabelType Enumerate #End diff --git a/lib/layouts/stdsections.inc b/lib/layouts/stdsections.inc index ae8b9d593c..648b9b28df 100644 --- a/lib/layouts/stdsections.inc +++ b/lib/layouts/stdsections.inc @@ -7,7 +7,6 @@ # commands that are useful for article-like document classes, but not # for letters. -# Part style definition Style Part Margin Dynamic LatexType Command @@ -21,19 +20,16 @@ Style Part ParSep 0.8 Align Center Alignpossible Center - LabelType Static - LabelString "Part #" - - # standard font definition + LabelType Counter + LabelCounter part + LabelString "Part \arabic{part}" Font Series Bold Size Huge EndFont - End -# Chapter style definition Style Chapter Margin Static LatexType Command @@ -46,20 +42,18 @@ Style Chapter ParSep 0.8 Align Block AlignPossible Block, Left - LabelType Counter_Chapter - LabelString "Chapter " - LabelStringAppendix "Appendix " - OptionalArgs 1 - - # standard font definition + LabelType Counter + LabelCounter chapter + LabelString "\arabic{chapter}" + LabelStringAppendix "Appendix \Alph{chapter}" + OptionalArgs 1 Font Series Bold Size Huge EndFont - End -# Section style definition + Style Section Margin Dynamic LatexType Command @@ -73,114 +67,63 @@ Style Section ParSep 0.7 Align Block AlignPossible Block, Left - LabelType Counter_Section - OptionalArgs 1 - - # standard font definition + LabelType Counter + LabelCounter section + LabelString "\arabic{chapter}.\arabic{section}" + LabelStringAppendix "\Alph{chapter}.\arabic{section}" + OptionalArgs 1 Font Series Bold Size Larger EndFont - End -# Subsection style definition + Style Subsection - Margin Dynamic - LatexType Command + CopyStyle Section LatexName subsection - NeedProtect 1 - NextNoIndent 1 - LabelSep xxx - ParSkip 0.4 TopSep 0.9 BottomSep 0.5 ParSep 0.5 - Align Block - AlignPossible Block, Left - LabelType Counter_Subsection - OptionalArgs 1 - - # standard font definition + LabelCounter subsection + LabelString "@Section@.\arabic{subsection} Font Series Bold Size Large EndFont - End -# Subsubsection style definition + Style Subsubsection - Margin Dynamic - LatexType Command + CopyStyle Subsection LatexName subsubsection - NeedProtect 1 - NextNoIndent 1 - LabelSep xxx - ParSkip 0.4 TopSep 0.7 BottomSep 0.4 - ParSep 0.4 - Align Block - AlignPossible Block, Left - LabelType Counter_SubSubSection - OptionalArgs 1 - - # standard font definition + LabelCounter subsubsection + LabelString "@Subsection@.\arabic{subsubsection} Font Series Bold Size Normal EndFont - End -# Paragraph style definition + Style Paragraph - Margin Dynamic - LatexType Command + CopyStyle Subsubsection LatexName paragraph - NeedProtect 1 - NextNoIndent 1 - LabelSep xxx - ParSkip 0.4 TopSep 0.4 BottomSep 0 - ParSep 0.4 - Align Block - AlignPossible Block, Left - LabelType Counter_Paragraph - OptionalArgs 1 - - # standard font definition - Font - Series Bold - Size Normal - EndFont - + LabelCounter paragraph + LabelString "@Subsubsection@.\arabic{paragraph} End -# Subparagraph style definition + Style Subparagraph - Margin Dynamic - LatexType Command + CopyStyle Paragraph LatexName subparagraph - NeedProtect 1 NextNoIndent 0 LeftMargin MM LabelSep xxx - ParSkip 0.4 - TopSep 0.4 - BottomSep 0 - ParSep 0.4 - Align Block - AlignPossible Block, Left - LabelType Counter_SubParagraph - OptionalArgs 1 - - # standard font definition - Font - Series Bold - Size Normal - EndFont - + LabelCounter subparagraph + LabelString "@Paragraph@.\arabic{subparagraph} End