mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
colored-boxes.lyx: add info about shadows
- also some fixes and improvements
This commit is contained in:
parent
66be58cf8a
commit
eebac83a04
@ -145,7 +145,7 @@ The fancy boxes are generated by the \SpecialChar LaTeX
|
||||
tcolorbox
|
||||
\series default
|
||||
.
|
||||
This package has so many features so that its manual exceeds 400
|
||||
This package has so many features that its manual exceeds 400
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
@ -282,7 +282,7 @@ status open
|
||||
\series bold
|
||||
Note:
|
||||
\series default
|
||||
the box can contain forced page breaks but they will be ignored.
|
||||
The box can contain forced page breaks but they will be ignored.
|
||||
To get breakable boxes, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
@ -335,8 +335,15 @@ A dynamic color box.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
In contrary to static boxes dynamic boxes cannot have parts, they cannot
|
||||
made breakable but one can set their vertical placement, see
|
||||
In contrary to static boxes dynamic boxes cannot have parts, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Box-parts"
|
||||
|
||||
\end_inset
|
||||
|
||||
, and they cannot made breakable but one can set their vertical placement,
|
||||
see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Vertical"
|
||||
@ -352,7 +359,7 @@ Fit
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
A fit color box insert is inserted via the menu
|
||||
A fit color box is inserted via the menu
|
||||
\family sans
|
||||
Insert\SpecialChar menuseparator
|
||||
Custom Insets\SpecialChar menuseparator
|
||||
@ -386,7 +393,7 @@ reference "subsec:Geometry"
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is a fit color box:
|
||||
These are fit color boxes:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -426,7 +433,6 @@ cm wide fit color box with some text.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Another fit color box:
|
||||
\begin_inset Flex Fit Color Box
|
||||
status open
|
||||
|
||||
@ -484,7 +490,7 @@ Box
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
How to use and customize the custom color boxes, see
|
||||
How to use and customize custom color boxes, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:General"
|
||||
@ -599,11 +605,18 @@ reference "subsec:Title-text"
|
||||
|
||||
\begin_layout Subsection
|
||||
Box parts
|
||||
\begin_inset CommandInset label
|
||||
LatexCommand label
|
||||
name "subsec:Box-parts"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The content of the box can be divided into an upper and a lower part with
|
||||
by using the environment
|
||||
The content of the box can be divided into an upper and a lower part by
|
||||
using the environment
|
||||
\family sans
|
||||
Color Box Separator
|
||||
\family default
|
||||
@ -611,8 +624,8 @@ Color Box Separator
|
||||
's environment selection combobox.
|
||||
The idea behind this is that both parts can be treated and customized separatel
|
||||
y.
|
||||
An example would be where the upper part contains a description and the
|
||||
lower part an equation.
|
||||
An application would be that the upper part contains a description and
|
||||
the lower part an equation.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -791,11 +804,11 @@ Color Box Line
|
||||
\family default
|
||||
.
|
||||
The line is by default dashed.
|
||||
it is just a line and does not separate box parts.
|
||||
Note that it is just a line and does not separate box parts!
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is a box where the content is divided:
|
||||
This is a box with a line:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -820,20 +833,51 @@ Some text
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The line style can be changed with the box option
|
||||
The line style can only be changed if a skin is specified, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Enhanced"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
Then one can use the box option
|
||||
\series bold
|
||||
segmentation style={}
|
||||
segmentation style={commands}
|
||||
\series default
|
||||
where
|
||||
\series bold
|
||||
commands
|
||||
\series default
|
||||
are commands to define the style.
|
||||
See section
|
||||
\family sans
|
||||
Library
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
skins
|
||||
\family default
|
||||
of the
|
||||
\series bold
|
||||
tcolorbox
|
||||
\series default
|
||||
manual for possible commands,
|
||||
\begin_inset CommandInset citation
|
||||
LatexCommand cite
|
||||
key "tcolorbox"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
To be able to use this option, the option
|
||||
\series bold
|
||||
Here is an example in the
|
||||
\emph on
|
||||
enhanced
|
||||
\series default
|
||||
needs to be added too.
|
||||
Here is an example with a double blue line:
|
||||
\emph default
|
||||
skin with a double blue line:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -867,18 +911,10 @@ Some text
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
For more details have a loot at the
|
||||
\series bold
|
||||
tcolorbox
|
||||
\series default
|
||||
manual,
|
||||
\begin_inset CommandInset citation
|
||||
LatexCommand cite
|
||||
key "tcolorbox"
|
||||
|
||||
\begin_inset Newpage newpage
|
||||
\end_inset
|
||||
|
||||
.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
@ -893,7 +929,11 @@ name "sec:Beakable-boxes"
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
To make a box breakable the option breakable is added.
|
||||
To make a box breakable the option
|
||||
\series bold
|
||||
breakable
|
||||
\series default
|
||||
is added.
|
||||
If a page break occurs within a box, the box will get broken this way:
|
||||
\end_layout
|
||||
|
||||
@ -992,7 +1032,7 @@ title after break
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
If boxes are inside boxes, only the outer box can be made breakable.
|
||||
If boxes are inside boxes, only the outer box can made breakable.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -1004,7 +1044,7 @@ status open
|
||||
\series bold
|
||||
Note:
|
||||
\series default
|
||||
Dynamic boxes and fit boxes cannot be made breakable!
|
||||
Dynamic boxes and fit boxes cannot made breakable!
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
@ -1032,9 +1072,7 @@ The following subsections show many possibilities to customize boxes.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
In real documents one wants only a few types of boxes and all boxes of a
|
||||
type should look identical.
|
||||
To avoid to write the box commands all the time, you can use the environment
|
||||
To avoid to write the box commands all the time, you can use the environment
|
||||
|
||||
\family sans
|
||||
Color
|
||||
@ -1050,8 +1088,11 @@ Setup
|
||||
.
|
||||
It is inserted via \SpecialChar LyX
|
||||
's style selection combobox.
|
||||
There you can write all options that should be applied for all boxes of
|
||||
the document
|
||||
There you can write all options that should be applied for
|
||||
\emph on
|
||||
all
|
||||
\emph default
|
||||
boxes of the document
|
||||
\emph on
|
||||
following
|
||||
\emph default
|
||||
@ -1069,16 +1110,18 @@ cm and a width of 3
|
||||
\end_inset
|
||||
|
||||
cm.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is not useful if one needs several box types since the changes would
|
||||
affect
|
||||
However, this is not useful if one needs several box types since the changes
|
||||
would affect
|
||||
\emph on
|
||||
all
|
||||
\emph default
|
||||
boxes.
|
||||
Therefore the module
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
In most documents one need a few types of boxes and all boxes of a type
|
||||
should look identical.
|
||||
To achieve this the module
|
||||
\emph on
|
||||
Fancy
|
||||
\begin_inset space ~
|
||||
@ -1191,6 +1234,7 @@ Default Value
|
||||
\end_layout
|
||||
|
||||
\begin_layout New Color Box Type
|
||||
|
||||
\begin_inset Argument 2
|
||||
status open
|
||||
|
||||
@ -1226,7 +1270,7 @@ enhanced, frame style={left color=red!75!black, right color=blue!75!black},
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Now every
|
||||
This way you defined the box type
|
||||
\family sans
|
||||
Custom
|
||||
\begin_inset space ~
|
||||
@ -1242,7 +1286,8 @@ Box
|
||||
|
||||
1
|
||||
\family default
|
||||
will look like this:
|
||||
.
|
||||
Boxes of this type will look like this:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -1318,8 +1363,11 @@ Name
|
||||
\series bold
|
||||
cBoxB
|
||||
\series default
|
||||
.
|
||||
The Argument is
|
||||
,
|
||||
\family sans
|
||||
Arguments
|
||||
\family default
|
||||
is
|
||||
\series bold
|
||||
1
|
||||
\series default
|
||||
@ -1365,6 +1413,7 @@ Box
|
||||
\end_layout
|
||||
|
||||
\begin_layout New Color Box Type
|
||||
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
@ -1549,7 +1598,11 @@ cBoxC
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
Arguments, the Argument is therefore
|
||||
Arguments,
|
||||
\family sans
|
||||
Arguments
|
||||
\family default
|
||||
is therefore
|
||||
\series bold
|
||||
2
|
||||
\series default
|
||||
@ -1599,6 +1652,7 @@ More Color Box Options
|
||||
\end_layout
|
||||
|
||||
\begin_layout New Color Box Type
|
||||
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
@ -1722,8 +1776,16 @@ Skins
|
||||
|
||||
\begin_layout Standard
|
||||
The \SpecialChar LaTeX
|
||||
package tcolorbox provides different skins.
|
||||
For a full list, see the tcolorbox manual, section
|
||||
package
|
||||
\series bold
|
||||
tcolorbox
|
||||
\series default
|
||||
provides different skins.
|
||||
For a full list, see the
|
||||
\series bold
|
||||
tcolorbox
|
||||
\series default
|
||||
manual, section
|
||||
\family sans
|
||||
Library
|
||||
\begin_inset space ~
|
||||
@ -1762,10 +1824,17 @@ This skin is enabled by adding the option enhanced.
|
||||
LatexCommand ref
|
||||
reference "subsec:Lines"
|
||||
|
||||
\end_inset
|
||||
|
||||
or the ability to have shadows, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Shadows"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
Another feature is a nicer view of breakable boxes:
|
||||
Another feature is a nicer style of breakable boxes:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
@ -1854,7 +1923,8 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
A feature you might like is to add color gradient with the options
|
||||
Another feature you might like is to add color gradients with the options
|
||||
|
||||
\series bold
|
||||
frame style
|
||||
\series default
|
||||
@ -1863,11 +1933,19 @@ frame style
|
||||
interior style
|
||||
\series default
|
||||
.
|
||||
Its syntax is
|
||||
Their syntax is
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\series bold
|
||||
frame style={left color=color, right color=color}
|
||||
\begin_inset Newline newline
|
||||
\end_inset
|
||||
|
||||
|
||||
\series default
|
||||
where
|
||||
where
|
||||
\series bold
|
||||
color
|
||||
\series default
|
||||
@ -1983,7 +2061,7 @@ The color of the lower part can be changed with the option
|
||||
colbacklower
|
||||
\series default
|
||||
.
|
||||
See also
|
||||
See
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Color"
|
||||
@ -1993,10 +2071,6 @@ reference "subsec:Color"
|
||||
for color customization.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Shadow drop shadow
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsubsection
|
||||
Beamer
|
||||
\begin_inset CommandInset label
|
||||
@ -6844,6 +6918,23 @@ title=A title, coltitle=orange
|
||||
Title text color
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Flex Subtitle
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
The subtitle
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Plain Layout
|
||||
Text
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
@ -6927,6 +7018,278 @@ Lower text color
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Newpage newpage
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
Shadows
|
||||
\begin_inset CommandInset label
|
||||
LatexCommand label
|
||||
name "subsec:Shadows"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Boxes can only be decorated with shadows if a skin is specified, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Enhanced"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsubsection
|
||||
Shadow
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
A shadow is added with the box option
|
||||
\series bold
|
||||
drop shadow=color
|
||||
\series default
|
||||
where
|
||||
\series bold
|
||||
color
|
||||
\series default
|
||||
is a color name or definition, see
|
||||
\begin_inset CommandInset ref
|
||||
LatexCommand ref
|
||||
reference "subsec:Color"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
One can omit the color, the shadow color is then black!50!white.
|
||||
The option
|
||||
\series bold
|
||||
drop fuzzy shadow
|
||||
\series default
|
||||
creates a semi-transparent shadow.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Flex Color Box
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
enhanced, drop shadow, nobeforeafter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
A box with a shadow
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\begin_inset Flex Color Box
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
enhanced, drop fuzzy shadow, nobeforeafter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
A box with a fuzzy shadow
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The default shadow is placed right below the box.
|
||||
For other shadow placements have a look at section
|
||||
\family sans
|
||||
Shadow Option Keys
|
||||
\family default
|
||||
of the
|
||||
\series bold
|
||||
tcolorbox
|
||||
\series default
|
||||
manual,
|
||||
\begin_inset CommandInset citation
|
||||
LatexCommand cite
|
||||
key "tcolorbox"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsubsection
|
||||
Halo
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
A halo is added with the box option
|
||||
\series bold
|
||||
halo=size with color
|
||||
\series default
|
||||
where
|
||||
\series bold
|
||||
size
|
||||
\series default
|
||||
is a value and
|
||||
\series bold
|
||||
color
|
||||
\series default
|
||||
is a color name or definition.
|
||||
One can omit the size and color, the halo is then 0.9
|
||||
\begin_inset space \thinspace{}
|
||||
\end_inset
|
||||
|
||||
mm thick and has the color yellow.
|
||||
Note that one cannot omit only the size or color, either both is omitted
|
||||
or both is specified.
|
||||
The option
|
||||
\series bold
|
||||
fuzzy halo
|
||||
\series default
|
||||
creates a semi-transparent halo.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Flex Color Box
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
enhanced, halo, nobeforeafter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
A box with a halo
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset VSpace defskip
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Flex Color Box
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
enhanced, fuzzy halo=5mm with green, nobeforeafter
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
A box with a 5
|
||||
\begin_inset space \thinspace{}
|
||||
\end_inset
|
||||
|
||||
mm thick, green fuzzy halo
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsubsection
|
||||
Generic
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Generic shadows/halos can be created with the box option
|
||||
\series bold
|
||||
shadow
|
||||
\series default
|
||||
or
|
||||
\series bold
|
||||
fuzzy shadow
|
||||
\series default
|
||||
.
|
||||
For a brief description of these options consult section
|
||||
\family sans
|
||||
Generic Shadows
|
||||
\family default
|
||||
of the
|
||||
\series bold
|
||||
tcolorbox
|
||||
\series default
|
||||
manual,
|
||||
\begin_inset CommandInset citation
|
||||
LatexCommand cite
|
||||
key "tcolorbox"
|
||||
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Flex Color Box
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
\begin_inset Argument 1
|
||||
status open
|
||||
|
||||
\begin_layout Plain Layout
|
||||
enhanced, title=Double shadow, shadow={-2.5mm}{-2.5mm}{0mm}{fill=blue, opacity=0.25
|
||||
}, shadow={1.5mm}{1.5mm}{0mm}{fill=red, opacity=0.25}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
A box with 2
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
generic shadows
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Bibliography
|
||||
|
Loading…
Reference in New Issue
Block a user