]> git.lyx.org Git - lyx.git/blob - lib/layouts/tcolorbox.module
New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing...
[lyx.git] / lib / layouts / tcolorbox.module
1 #\DeclareLyXModule[tcolorbox.sty,environ.sty,etoolbox.sty,pgf.sty]{Fancy Colored Boxes}
2 #\DeclareCategory{Boxes}
3 #DescriptionBegin
4 #Adds custom insets that support colored boxes via the tcolorbox package.
5 #See the tcolorbox documentation for details.
6 #DescriptionEnd
7 #Authors: Jürgen Spitzmüller
8 #         Uwe Stöhr <uwestoehr@lyx.org>
9
10 Format 99
11
12 InsetLayout Flex:Color_Box
13   LyXType               custom
14   Decoration            classic
15   LabelString           "Color Box"
16   LatexType             environment
17   LatexName             tcolorbox
18   Requires              tcolorbox
19   Argument 1
20     LabelString         "Color Box Options"
21     Tooltip             "Insert the color box options here (see tcolorbox manual)"
22     PassThruChars       "\[]{}"
23         DocBookTag          IGNORE
24   EndArgument
25   ResetsFont            true
26   DocBookTag            phrase
27   DocBookAttr           role='color-box'
28 End
29
30 InsetLayout Flex:Dynamic_Color_Box
31   CopyStyle             Flex:Color_Box
32   LatexType             command
33   LabelString           "Color Box (Dynamic)"
34   LatexName             tcbox
35   DocBookTag            phrase
36   DocBookAttr           role='dynamic-color-box'
37 End
38
39 InsetLayout Flex:Fit_Color_Box
40   CopyStyle             Flex:Dynamic_Color_Box
41   LabelString           "Color Box (Fit Contents)"
42   LatexName             tcboxfit
43   DocBookTag            phrase
44   DocBookAttr           role='fit-color-box'
45 End
46
47 InsetLayout Flex:Raster_Color_Box
48   CopyStyle             Flex:Color_Box
49   LabelString           "Raster Color Box"
50   LatexName             tcbraster
51   DocBookTag            phrase
52   DocBookAttr           role='raster-color-box'
53 End
54
55 InsetLayout Flex:Subtitle
56   CopyStyle            Flex:Dynamic_Color_Box
57   LatexName            tcbsubtitle
58   LabelString          "Subtitle"
59   Argument 1
60     LabelString        "Subtitle Options"
61     ToolTip            "Insert the options here"
62     PassThruChars      "\[]{}"
63   EndArgument
64 End
65
66 Style Color_Box_Separator
67   Category         "Color Boxes"
68   LatexType        command
69   LatexName        tcblower
70   ParIndent        MM
71   ParSkip          0.4
72   Align            Left
73   AlignPossible    Block, Left, Right, Center
74   Margin           First_Dynamic
75   TopSep           0
76   BottomSep        0
77   ParSep           0
78   LabelType        Static
79   LabelBottomSep   0
80   LabelString      "-----"
81   KeepEmpty        1
82   LabelFont 
83     Series         medium
84     Size           normal
85     Color          latex
86     Series         bold
87   EndFont
88   Requires         tcolorbox
89 End
90
91 Style Color_Box_Line
92   CopyStyle        Color_Box_Separator
93   LatexName        tcbline
94   LabelFont 
95     Color          textlabel1
96   EndFont
97   Requires         tcolorbox
98 End
99
100 Style Color_Box_Setup
101   Category         "Color Boxes"
102   LatexName        tcbset
103   LatexType        command
104   PassThru         1
105   Margin           Dynamic
106   LabelSep         xx
107   ParSkip          0.0
108   ItemSep          0.2
109   TopSep           0.7
110   BottomSep        0.7
111   ParSep           0.3
112   Align            Block
113   AlignPossible    Block
114   LabelType        Static
115   LabelString      "Color Box Setup"
116   Font
117     Color          latex
118     Family         typewriter
119   EndFont
120   LabelFont
121     Color          textlabel2
122     Family         roman
123   EndFont
124   Requires         tcolorbox
125   Spellcheck       0
126 End
127
128 Style New_Color_Box_Type
129   CopyStyle            Color_Box_Setup
130   LatexName        newtcolorbox
131   LabelString      "New Color Box Type"
132   Font
133     Family         roman
134   EndFont
135   LabelFont
136     Color          textlabel2
137   EndFont
138   Argument 1
139     LabelString    "New Box Options"
140     Tooltip        "Options for the new box type (optional)"
141     PassThruChars  "\[]{}"
142   EndArgument
143   Argument 2
144     LabelString    "Name"
145     Tooltip        "Name of the new box type"
146     Mandatory      1
147     AutoInsert     1
148   EndArgument
149   Argument 3
150     LabelString    "Arguments"
151     Tooltip        "Number of arguments (remove this inset if none!)"
152     Requires       4
153     PassThru       1
154   EndArgument
155   Argument 4
156     LabelString    "Default Value"
157     Tooltip        "Default value for argument (keep empty!)"
158     Requires       3
159   EndArgument
160   DocBookTag       IGNORE
161 End
162
163 # define 5 different box environments that can be customized by the user
164
165 InsetLayout Flex:Custom_Color_Box_1
166   CopyStyle        Flex:Color_Box
167   LabelString      "Custom Color Box 1"
168   LatexName        cBoxA
169   Argument 2
170     LabelString    "More Color Box Options"
171     Tooltip        "Insert more color box options here"
172     Mandatory      1
173   EndArgument
174   DocBookTag       phrase
175   DocBookAttr      role='color-box-1'
176 End
177
178 InsetLayout Flex:Custom_Color_Box_2
179   CopyStyle        Flex:Custom_Color_Box_1
180   LabelString      "Custom Color Box 2"
181   LatexName        cBoxB
182   DocBookTag       phrase
183   DocBookAttr      role='color-box-2'
184 End
185
186 InsetLayout Flex:Custom_Color_Box_3
187   CopyStyle        Flex:Custom_Color_Box_1
188   LabelString      "Custom Color Box 3"
189   LatexName        cBoxC
190   DocBookTag       phrase
191   DocBookAttr      role='color-box-3'
192 End
193
194 InsetLayout Flex:Custom_Color_Box_4
195   CopyStyle        Flex:Custom_Color_Box_1
196   LabelString      "Custom Color Box 4"
197   LatexName        cBoxD
198   DocBookTag       phrase
199   DocBookAttr      role='color-box-4'
200 End
201
202 InsetLayout Flex:Custom_Color_Box_5
203   CopyStyle        Flex:Custom_Color_Box_1
204   LabelString      "Custom Color Box 5"
205   LatexName        cBoxE
206   DocBookTag       phrase
207   DocBookAttr      role='color-box-5'
208 End