summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tcolorbox/tcolorbox.doc.beamer.tex
blob: ec70fd713a75e1ceb754c92d7f8828e56ba21abb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
% !TeX root = tcolorbox.tex
% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox)
\clearpage
\section{Beamer Support}\label{sec:beamer}%
\tcbset{external/prefix=external/beamer_}%
The \mylib{skins} library adds some supporting options for the |beamer| package
\cite{tantau:beamer}.
For the following options, the \mylib{skins} library has to be loaded
by a package option or inside the preamble by:
\begin{dispListing}
\tcbuselibrary{skins}
\end{dispListing}

See \Vref{sec:skins} for the documentation of all other options of the \mylib{skins} library.

\begin{docTcbKey}[][doc new and updated={2015-01-09}{2019-03-01}]{only}{=\textless\meta{overlay specification}\textgreater\marg{options}}{style, no default, initially unset}
Sets the given |tcolorbox| \meta{options} in dependency of
a |beamer| \meta{overlay specification}.
Note that this needs the |beamer| class \cite{tantau:beamer}.
The \meta{options} will only be used on the specified |beamer| frames.


\begin{fulldocumentlisting}{}
\documentclass{beamer}
\usepackage[many]{tcolorbox}
\begin{document}

\begin{frame}
  \begin{tcolorbox}[title=My title,fonttitle=\bfseries,
      enhanced,colframe=red!50!black,colback=red!10,colbacktitle=red,
      sidebyside,righthand width=3cm,
      lowerbox=invisible,lower separated=false,
      drop lifted shadow,
      only=<1>{colbacktitle=yellow,coltitle=red!50!black,colframe=red},
      only=<3>{colback=yellow!50,watermark text={Attention!}},
      only=<3->{lowerbox=visible}  ]
    This is a test.
    \begin{itemize}[<+->]
      \item One
      \item Two
      \item \alert<3>{Three}
      \item Four
    \end{itemize}
  \tcblower
    \begin{equation*}
    \int\limits_{1}^{x} \frac{1}{t}~dt = \ln(x).
    \end{equation*}
  \end{tcolorbox}
\end{frame}
\end{document}
\end{fulldocumentlisting}


\begin{fulldocumentlisting}{}
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\begin{document}

\begin{frame}[fragile]
  \begin{tcblisting}{beamer,colback=blue!5,colframe=blue!20!gray,coltitle=yellow,
    title=Example,
    only=<1>{lowerbox=invisible},only=<2>{}
  }
This is an \textbf{example listing}
  \end{tcblisting}
\end{frame}
\end{document}
\end{fulldocumentlisting}

\begin{marker}
The option \refKey{/tcb/only} belonged to the base package before version 4.20.
\end{marker}
\end{docTcbKey}



\begin{docTcbKey}[][doc new={2019-03-01}]{hide}{=\textless\meta{overlay specification}\textgreater}{style, no default, initially unset}
Sets the \refKey{/tcb/beamer hidden} style in dependency of
a |beamer| \meta{overlay specification}.
\refKey{/tcb/beamer hidden} can be redefined for customization.
\end{docTcbKey}


\begin{docTcbKey}[][doc new={2019-03-01}]{beamer hidden}{}{style, no options, initially |nirvana|}
This style is not intended to be used directly, but in concealed way by applying
\refKey{/tcb/hide}. The style can be redefined.
\begin{dispListing}
\tcbset{
  beamer hidden/.style={invisible,interior hidden,colframe=blue!20!gray!15},
}
\end{dispListing}
\end{docTcbKey}

\clearpage

\begin{docTcbKey}[][doc new={2019-03-01}]{alert}{=\textless\meta{overlay specification}\textgreater}{style, no default, initially unset}
Sets the \refKey{/tcb/beamer alerted} style in dependency of
a |beamer| \meta{overlay specification}.
\refKey{/tcb/beamer alerted} can be redefined for customization.
\end{docTcbKey}


\begin{docTcbKey}[][doc new={2019-03-01}]{beamer alerted}{}{style, no options, initially |fuzzy halo|}
This style is not intended to be used directly, but in concealed way by applying
\refKey{/tcb/alert}. The style can be redefined.
\begin{dispListing}
\tcbset{
  beamer alerted/.style={colframe=red!50!gray},
}
\end{dispListing}
\end{docTcbKey}


\bigskip

The following examples use \refEnv{tcbitemize} from \mylib{raster} for
convenient use of a list of boxes which are uncovered one by one.


\begin{fulldocumentlisting}{run pdflatex}
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\begin{document}

\begin{frame}
  \begin{tcbitemize}[raster equal height=rows,
    enhanced,colback=blue!5,colframe=blue!20!gray,coltitle=yellow,
    ]
  \tcbitem[title=One,alert=<1>]
    First Statement
  \tcbitem[title=Two,hide=<-1>,alert=<2>]
    Second Statement
  \tcbitem[title=Three,hide=<-2>,alert=<3>]
    Test
  \tcbitem[title=Four,hide=<-3>,alert=<4>]
    \begin{equation*}
    \int\limits_{1}^{x} \frac{1}{t}~dt = \ln(x).
    \end{equation*}
  \tcbitem[title=Five,hide=<-4>,alert=<5>]
    \includegraphics[width=1cm]{goldshade.png}
  \tcbitem[title=Six,hide=<-5>,alert=<6>]
    Test
  \end{tcbitemize}
\end{frame}
\end{document}
\end{fulldocumentlisting}



\begin{fulldocumentlisting}{run pdflatex}
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\begin{document}

\begin{frame}
  \begin{tcbitemize}[raster equal height=rows,
    enhanced,colback=blue!5,colframe=blue!20!gray,coltitle=yellow,
    beamer hidden/.style={invisible,interior hidden,colframe=blue!20!gray!15},
    beamer alerted/.style={colframe=red!50!gray},
    ]
  \tcbitem[title=One,alert=<1>]
    First Statement
  \tcbitem[title=Two,hide=<-1>,alert=<2>]
    Second Statement
  \tcbitem[title=Three,hide=<-2>,alert=<3>]
    Test
  \tcbitem[title=Four,hide=<-3>,alert=<4>]
    \begin{equation*}
    \int\limits_{1}^{x} \frac{1}{t}~dt = \ln(x).
    \end{equation*}
  \tcbitem[title=Five,hide=<-4>,alert=<5>]
    \includegraphics[width=1cm]{goldshade.png}
  \tcbitem[title=Six,hide=<-5>,alert=<6>]
    Test
  \end{tcbitemize}
\end{frame}
\end{document}
\end{fulldocumentlisting}



\begin{fulldocumentlisting}{run pdflatex}
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\begin{document}

\begin{frame}
  \begin{tcbitemize}[raster equal height=rows,
    beamer,colback=blue!5,colframe=blue!20!gray,coltitle=yellow,
    beamer hidden/.style={colback=white,colframe=gray!50,opacityupper=0.2,opacitytitle=0.2},
    beamer alerted/.style={colframe=red!50!gray,fuzzy halo},
    ]
  \tcbitem[title=One,alert=<1>]
    First Statement
  \tcbitem[title=Two,hide=<-1>,alert=<2>]
    Second Statement
  \tcbitem[title=Three,hide=<-2>,alert=<3>]
    Test
  \tcbitem[title=Four,hide=<-3>,alert=<4>]
    \begin{equation*}
    \int\limits_{1}^{x} \frac{1}{t}~dt = \ln(x).
    \end{equation*}
  \tcbitem[title=Five,hide=<-4>,alert=<5>]
    \includegraphics[width=1cm]{goldshade.png}
  \tcbitem[title=Six,hide=<-5>,alert=<6>]
    Test
  \end{tcbitemize}
\end{frame}
\end{document}
\end{fulldocumentlisting}