]> git.lyx.org Git - lyx.git/blob - lib/layouts/tcolorbox.module
Add a pref to disable OS keyboard language support
[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 76
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   EndArgument
24   ResetsFont            true
25 End
26
27 InsetLayout Flex:Dynamic_Color_Box
28   CopyStyle             Flex:Color_Box
29   LatexType             command
30   LabelString           "Color Box (Dynamic)"
31   LatexName             tcbox
32 End
33
34 InsetLayout Flex:Fit_Color_Box
35   CopyStyle             Flex:Dynamic_Color_Box
36   LabelString           "Color Box (Fit Contents)"
37   LatexName             tcboxfit
38 End
39
40 InsetLayout Flex:Raster_Color_Box
41   CopyStyle             Flex:Color_Box
42   LabelString           "Raster Color Box"
43   LatexName             tcbraster
44 End
45
46 InsetLayout Flex:Subtitle
47   CopyStyle            Flex:Dynamic_Color_Box
48   LatexName            tcbsubtitle
49   LabelString          "Subtitle"
50   Argument 1
51     LabelString        "Subtitle Options"
52     ToolTip            "Insert the options here"
53     PassThruChars      "\[]{}"
54   EndArgument
55 End
56
57 Style Color_Box_Separator
58   Category         "Color Boxes"
59   LatexType        command
60   LatexName        tcblower
61   ParIndent        MM
62   ParSkip          0.4
63   Align            Left
64   AlignPossible    Block, Left, Right, Center
65   Margin           First_Dynamic
66   TopSep           0
67   BottomSep        0
68   ParSep           0
69   LabelType        Static
70   LabelBottomSep   0
71   LabelString      "-----"
72   KeepEmpty        1
73   LabelFont 
74     Series         medium
75     Size           normal
76     Color          latex
77     Series         bold
78   EndFont
79   Requires         tcolorbox
80 End
81
82 Style Color_Box_Line
83   CopyStyle        Color_Box_Separator
84   LatexName        tcbline
85   LabelFont 
86     Color          blue
87   EndFont
88   Requires         tcolorbox
89 End
90
91 Style Color_Box_Setup
92   Category         "Color Boxes"
93   LatexName        tcbset
94   LatexType        command
95   PassThru         1
96   Margin           Dynamic
97   LabelSep         xx
98   ParSkip          0.0
99   ItemSep          0.2
100   TopSep           0.7
101   BottomSep        0.7
102   ParSep           0.3
103   Align            Block
104   AlignPossible    Block
105   LabelType        Static
106   LabelString      "Color Box Setup"
107   Font
108     Color          latex
109     Family         typewriter
110   EndFont
111   LabelFont
112     Color          green
113     Family         roman
114   EndFont
115   Requires         tcolorbox
116   Spellcheck       0
117 End
118
119 Style New_Color_Box_Type
120   CopyStyle            Color_Box_Setup
121   LatexName        newtcolorbox
122   LabelString      "New Color Box Type"
123   Font
124     Family         roman
125   EndFont
126   LabelFont
127     Color          green
128   EndFont
129   Argument 1
130     LabelString    "New Box Options"
131     Tooltip        "Options for the new box type (optional)"
132     PassThruChars  "\[]{}"
133   EndArgument
134   Argument 2
135     LabelString    "Name"
136     Tooltip        "Name of the new box type"
137     Mandatory      1
138     AutoInsert     1
139   EndArgument
140   Argument 3
141     LabelString    "Arguments"
142     Tooltip        "Number of arguments (remove this inset if none!)"
143     Requires       4
144     PassThru       1
145   EndArgument
146   Argument 4
147     LabelString    "Default Value"
148     Tooltip        "Default value for argument (keep empty!)"
149     Requires       3
150   EndArgument
151 End
152
153 # define 5 different box environments that can be customized by the user
154
155 InsetLayout Flex:Custom_Color_Box_1
156   CopyStyle        Flex:Color_Box
157   LabelString      "Custom Color Box 1"
158   LatexName        cBoxA
159   Argument 2
160     LabelString    "More Color Box Options"
161     Tooltip        "Insert more color box options here"
162     Mandatory      1
163   EndArgument
164 End
165
166 InsetLayout Flex:Custom_Color_Box_2
167   CopyStyle        Flex:Custom_Color_Box_1
168   LabelString      "Custom Color Box 2"
169   LatexName        cBoxB
170 End
171
172 InsetLayout Flex:Custom_Color_Box_3
173   CopyStyle        Flex:Custom_Color_Box_1
174   LabelString      "Custom Color Box 3"
175   LatexName        cBoxC
176 End
177
178 InsetLayout Flex:Custom_Color_Box_4
179   CopyStyle        Flex:Custom_Color_Box_1
180   LabelString      "Custom Color Box 4"
181   LatexName        cBoxD
182 End
183
184 InsetLayout Flex:Custom_Color_Box_5
185   CopyStyle        Flex:Custom_Color_Box_1
186   LabelString      "Custom Color Box 5"
187   LatexName        cBoxE
188 End