[LyX/master] Fix screen display of parts and chapters in default classes

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Nov 18 08:49:55 UTC 2020


commit 0b9c27222a69f0ec657f008345ea812030596702
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Nov 18 10:15:05 2020 +0100

    Fix screen display of parts and chapters in default classes
    
    This has been done by reading the LaTeX sources (classes.dtx) to try
    to get things right
    
    * fix font sizes of chapters and parts. Note that the labels have
      smaller size as the title itself.
    
    * fix alignment of Part and put label on top
    
    * add spacing between label and title.
---
 lib/layouts/article.layout  |   13 +++++++++++++
 lib/layouts/stdsections.inc |   15 ++++++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/lib/layouts/article.layout b/lib/layouts/article.layout
index 1afa9d7..fa89bef 100644
--- a/lib/layouts/article.layout
+++ b/lib/layouts/article.layout
@@ -21,8 +21,17 @@ NoStyle Chapter*
 Style Part
 	Align                 Left
 	AlignPossible         Left
+	LabelType             Above
 	TopSep                2
 	BottomSep             1.5
+	Font
+	  Series              Bold
+	  Size                Huge
+	EndFont
+	LabelFont
+	  Series              Bold
+	  Size                Larger
+	EndFont
 End
 
 
@@ -31,4 +40,8 @@ Style Part*
 	AlignPossible         Left
 	TopSep                2
 	BottomSep             1.5
+	Font
+	  Series              Bold
+	  Size                Huge
+	EndFont
 End
diff --git a/lib/layouts/stdsections.inc b/lib/layouts/stdsections.inc
index 4516d07..359d69e 100644
--- a/lib/layouts/stdsections.inc
+++ b/lib/layouts/stdsections.inc
@@ -11,9 +11,9 @@ Format 85
 
 Style Part
 	Category              Sectioning
-	Margin                Dynamic
+	Margin                Static
 	LabelString           "Part \thepart"
-	LabelType             Static
+	LabelType             Centered
 	TocLevel              -1
 	LabelCounter          part
 	LatexType             Command
@@ -21,7 +21,7 @@ Style Part
 	NeedProtect           1
 	NextNoIndent          1
 	ToggleIndent          Never
-	Labelsep              xxx
+	LabelBottomSep        1
 	ParSkip               0.4
 	TopSep                4
 	BottomSep             4
@@ -36,6 +36,10 @@ Style Part
 	EndArgument
 	Font
 	  Series              Bold
+	  Size                Giant
+	EndFont
+	LabelFont
+	  Series              Bold
 	  Size                Huge
 	EndFont
 	HTMLTag               h1
@@ -60,6 +64,7 @@ Style Chapter
 	NeedProtect           1
 	NextNoIndent          1
 	ToggleIndent          Never
+	LabelBottomSep        1
 	ParSkip               0.4
 	TopSep                2
 	BottomSep             0.8
@@ -73,6 +78,10 @@ Style Chapter
 	EndArgument
 	Font
 	  Series              Bold
+	  Size                Giant
+	EndFont
+	LabelFont
+	  Series              Bold
 	  Size                Huge
 	EndFont
 	HTMLTag               h1


More information about the lyx-cvs mailing list