]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/initials.module
update layout formats
[lyx.git] / lib / layouts / initials.module
index 22a6678ec4d77fcebea487bcc9ce155100292a5c..622163b9246a4139a936dc48d6e45c690c9613d9 100644 (file)
@@ -1,49 +1,60 @@
-#\DeclareLyXModule{Initials}
+#\DeclareLyXModule{Initials (Drop Caps)}
+#\DeclareCategory{Paragraph Styles}
 #DescriptionBegin
-#Define character style for initials.
-#Hint: try to use math and its artistic font styles like Fractur or the Calligraphic one.
+#Defines a style for paragraphs with an enlarged initial letter (drop cap).
+#See the EmbeddedObjects manual for a detailed description.
 #DescriptionEnd
-#Category: charstyles
-# Author: Pavel Sanda and Uwe Stöhr
+#Authors: Pavel Sanda and Uwe Stöhr
 
-Format 35
+Format 79
+
+AddToPreamble
+       \@ifundefined{lettrine}{\usepackage{lettrine}}{}
+EndPreamble
 
 InsetLayout Flex:Initial
-       LyxType                 charstyle
-       LabelString             "Initial"
-       LatexType               command
-       LatexName               lettrine
+       LyxType         charstyle
+       LabelString     "Initial"
+       LatexType       command
+       LatexName       lettrine
        Font
-         Size                  Large
+         Size          Large
        EndFont
-       Requires                lettrine
-       Preamble
-               \usepackage{lettrine}
-       EndPreamble
+       Requires        lettrine
+       ResetsFont true
 End
 
 Style Initial
-       Category                MainText
-       LatexType               command
-       LatexName               lettrine
-       Margin                  First_Dynamic
-       LabelType               static
-       LabelString             Initial
-       OptionalArgs            1
-       RequiredArgs            1
-       LabelSep                x
-       ParIndent               MMM
-       ParSkip                 0.4
-       TopSep                  0.7
-       BottomSep               0.7
-       ParSep                  0.3
-       Align                   Left
-       AlignPossible           Left
+       Category        MainText
+       LatexType       command
+       LatexName       lettrine
+       Margin          First_Dynamic
+       LabelType       static
+       LabelString     Initial
+       Argument 1
+         LabelString   "Options"
+         Tooltip       "Option(s) for the initial"
+       EndArgument
+       Argument 2
+         Mandatory     1
+         LabelString   "Initial"
+         Tooltip       "Initial letter(s)"
+       EndArgument
+       Argument 3
+         Mandatory     1
+         LabelString   "Rest of Initial"
+         Tooltip       "Rest of initial word or text"
+       EndArgument
+       LabelSep        x
+       ParIndent       MMM
+       ParSkip         0.4
+       TopSep          0.7
+       BottomSep       0.7
+       ParSep          0.3
+       Align           Left
+       AlignPossible   Left
        LabelFont
-         Series                Bold
+         Series        Bold
        EndFont
-       Preamble
-         \usepackage{lettrine}
-       EndPreamble
 End