LaTeX-Examples
レンダリング結果



先頭3ページのみプレビューしています。
PDFを開くTeXソース
TeXソース
入力コード
%% The LaTeX package tcolorbox - version 2.61 (2014/01/10)
%% tcolorbox-example.tex: an example for tcolorbox
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2013 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README
%%
\documentclass{tetsujsarticle}
\usepackage{tetsuryoku}
\begin{document}
{
\begin{tikzpicture}%P.2,tcolorboxの渦
\definecolorseries{boxcol}{rgb}{last}{red}{blue}%
\resetcolorseries[24]{boxcol}%
\coordinate (A) at (0,0); \coordinate (B) at (21,29.7);
\path[use as bounding box,top color=goldenrod!25!white,bottom color=navy!25!white]
(A) rectangle coordinate (C) (B);
\foreach \w in {-15,-30,...,-360}
{\node[below right,rotate around={\w:(C)}] at ([xshift=1cm]C) {%
\begin{tcolorbox}[width=8cm,title=tcolorbox が鉄\TeX で動いた!, fontupper=\scriptsize,fonttitle=\small\bfseries, colback=boxcol!25!white,colbacktitle=boxcol!!+!50!black,colframe=boxcol, enhanced jigsaw,opacityback=0.5,opacitybacktitle=0.75]
\lipsum[2] \end{tcolorbox}};%
}
\node[font=\Huge\bfseries] at ([yshift=12cm]C) {|tcolorbox|};
\node[font=\large\bfseries] at ([yshift=-12cm]C)
{マニュアルだよ};
\end{tikzpicture}
}
\newtcbox{\mylib}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,
right=0mm,left=4mm,arc=1pt,boxsep=2pt,before upper={\vphantom{dlg}},
colframe=green!50!black,coltext=green!25!black,colback=green!10!white,
overlay={\begin{tcbclipinterior}\fill[green!75!blue!50!white] (frame.south west)
rectangle node[text=white,font=\sffamily\bfseries\tiny,rotate=90] {LIB} ([xshift=4mm]frame.north west);\end{tcbclipinterior}}}
\mylib{ほげほげ}
{%P.3,赤地に黄色波のタイトル
\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, coltitle=black}
\begin{tcolorbox}[freelance,title=My title,title code={ \path[draw=yellow,solid,decorate,line width=2mm,
decoration={coil,aspect=0,segment length=10.1mm}]
([xshift=1mm]title.west) -- ([xshift=-1mm]title.east);}] This is a \textbf{tcolorbox}.
\tcblower
This is the lower part.
\end{tcolorbox}
}
{ \begin{tcolorbox}
This is a \textbf{tcolorbox}.
\end{tcolorbox}
}
%P.3,2段tcolorbox
{\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=My nice heading] This is another \textbf{tcolorbox}.
\tcblower
Here, you see the lower part of the box.
\end{tcolorbox}
}
{
\newtcbox{\mybox}[1][red]{nobeforeafter,tcbox raise base, arc=0pt,outer arc=0pt,colback=#1!10!white,colframe=#1!50!black, boxsep=0pt,left=1pt,right=1pt,top=2pt,bottom=2pt, boxrule=0pt,bottomrule=1pt,toprule=1pt}
\newtcbox{\xmybox}[1][red]{nobeforeafter,tcbox raise base, arc=7pt,colback=#1!10!white,colframe=#1!50!black,
before upper={\rule[-3pt]{0pt}{10pt}},boxrule=1pt, boxsep=0pt,left=6pt,right=6pt,top=2pt,bottom=2pt}
The \mybox[green]{quick} brown \mybox{fox} \mybox[blue]{jumps} over the
\mybox[green]{lazy} \mybox{dog}.\par
The \xmybox[green]{quick} brown \xmybox{fox} \xmybox[blue]{jumps} over the
\xmybox[green]{lazy} \xmybox{dog}.
}
{%P.3,青いタイトルの表
\tcbset{colframe=blue!50!black,colback=white,colupper=red!50!black, fonttitle=\bfseries,nobeforeafter,center title}
Text \tcbox[tcbox raise base]{Hello World}\hfill
\tcbox[left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=0mm,
toptitle=0.5mm,bottomtitle=0.5mm,title=My table]{%
\arrayrulecolor{blue!50!black}\renewcommand{\arraystretch}{1.2}%
\begin{tabular}{r|c|l}
One & Two & Three \\\hline\hline
Men & Mice & Lions \\\hline
Upper & Middle & Lower
\end{tabular}}\hfill
}
{%P.3,多重tcolorbox
\tcbset{colback=green!10!white} \tcbsetforeverylayer{colframe=red!75!black}
\begin{tcolorbox}[title=All options for this box] This is a tcolorbox.\par\medskip \begin{tcolorbox}[title=Nested box]
Note that this nested box has a red frame but no green background. \end{tcolorbox}
\end{tcolorbox}
\bigskip
\begin{tcolorbox}[reset]
hogehoge
\end{tcolorbox}
}
{\tcbset{colback=red!5!white,colframe=red!75!black, coltitle=blue!50!black,fonttitle=\bfseries}
%P.3,グラデーションタイトル
\begin{tcolorbox}[enhanced,title=My title, title style={left color=blue!15!yellow, right color=red!85!black}]
This is a \textbf{tcolorbox}. \tcblower
This is the lower part. \end{tcolorbox}
}
\br2
{%P.3,角に円
\tcbset{colback=red!5!white,colframe=red!75!black}
\begin{tcolorbox}[freelance,frame code={
\foreach \n in {north east,north west,south east,south west} {\path [fill=red!75!black] (interior.\n) circle (3mm); }; }]
This is a \textbf{tcolorbox}. \tcblower
This is the lower part. \end{tcolorbox}
}
\br2
{%P.3,仕切り線が青のグラデーション
\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[freelance,title=My title,segmentation code={
\path[top color=red!5!white,bottom color=red!5!white,middle color=blue] (segmentation.south west) rectangle (segmentation.north east);}]
This is a \textbf{tcolorbox}. \tcblower
This is the lower part. \end{tcolorbox}
}
{%P.4,赤にバツ印くり抜き
\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[freelance,title=My title,interior titled code={ \path[draw=red!5!white,line width=5mm,line cap=round]
([xshift=3mm,yshift=-3mm]interior.north west) --([xshift=-3mm,yshift=3mm]interior.south east) ([xshift=3mm,yshift=3mm]interior.south west) --([xshift=-3mm,yshift=-3mm]interior.north east);}]
This is a \textbf{tcolorbox}. \tcblower
This is the lower part. \end{tcolorbox}
}
{%P.4,下半分隠し
\begin{tcolorbox}[lowerbox=invisible,colback=white] This is a \textbf{tcolorbox}.
\tcblower
This is the lower part (but invisible). \end{tcolorbox}
%P.4,下半分非表示
\begin{tcolorbox}[lowerbox=ignored,colback=white] This is a \textbf{tcolorbox}.
\tcblower
This is the lower part (but ignored). \end{tcolorbox}
}
{
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
My box.
\end{tcolorbox}
}
{\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title=My title]
My box with my title.
\end{tcolorbox}
}
{\begin{tcolorbox}[colback=green!5!white,colframe=green!75!black]
Upper part of my box.
\tcblower
Lower part of my box.
\end{tcolorbox}
}
{\begin{tcolorbox}[colback=yellow!5!white,colframe=yellow!75!black,title=My title]
I can do this also with a title.
\tcblower
Lower part of my box.
\end{tcolorbox}
}
{%P.4,下半分を格納して別のtcolorboxに表示
\begin{tcolorbox}[colback=yellow!10!white,colframe=red!75!black,lowerbox=invisible,
savelowerto=\jobname_ex.tex]
Now, we play hide and seek. Where is the lower part?
\tcblower
I'm invisible until you find me.
\end{tcolorbox}
}
{\begin{tcolorbox}[colback=yellow!10!white,colframe=red!75!black,title=Here I am]
\input{\jobname_ex.tex}
\end{tcolorbox}
}
{%P.4,グラデーションタイトル
\tcbset{colback=red!5!white,colframe=red!75!black, coltitle=blue!50!black,fonttitle=\bfseries}
\begin{tcolorbox}[enhanced,title=My title, title style={left color=blue!15!yellow, right color=red!85!black}]
This is a \textbf{tcolorbox}. \tcblower
This is the lower part. \end{tcolorbox}
}
{\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries}
%P.5,タイトルの下に球の一部がはみ出している
\begin{tcolorbox}[enhanced,title=My title,
watermark tikz={\draw[line width=2mm] circle (1cm)
node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont ?};}] \lipsum[1]
\tcblower \lipsum[2] \end{tcolorbox}
}
{%P.5,角の丸みを調節
\begin{tcolorbox}[colback=blue!50!white,colframe=blue!25!black,coltext=yellow,
fontupper=\Large\bfseries,arc=6mm,boxrule=2mm,boxsep=5mm]
Funny settings.
\end{tcolorbox}
}
{\newtcolorbox{mybox2}[1]{ savelowerto=\jobname_bspsave2.tex,lowerbox=ignored,
colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, title=#1}%
\begin{mybox2}{My Example} Upper part.
\tcblower
Saved lower part! \end{mybox2}
}
{\begin{tcolorbox}[fontupper=Hello!~\sffamily] This is a \textbf{tcolorbox}.
\end{tcolorbox}
}
{\begin{tcolorbox}[coltext=red!75!black] This is a \textbf{tcolorbox}.
\tcblower あ
\end{tcolorbox}
}
{\tcbset{enhanced,colback=red!5!white,colframe=red!75!black, colbacktitle=red!90!black}%P.5,表題の背景色とタイトル文字の背景のずれ
\begin{tcolorbox}[titlerule=3mm,title=This is the title] This is a \textbf{tcolorbox}.
\end{tcolorbox}
}
%P.5,tcolorboxと2本の帯と球の重ね合わせ
{\tcbset{enhanced jigsaw,fonttitle=\bfseries,opacityback=0.35,colback=blue!5!white, frame style={left color=red!75!black,right color=red!10!yellow}}
\begin{tikzpicture}% draw two balls
\path[use as bounding box] (0,0.8) rectangle +(0.1,0.1); \shadedraw [shading=ball] (0,0) circle (1cm);
\shadedraw [ball color=red] (3,-2.2) circle (1cm);
\end{tikzpicture}
%
\begin{tcolorbox}[title=A translucent box, overlay={\begin{tcbinvclipframe}
\draw[red,line width=1cm] ([xshift=-2mm,yshift=2mm]frame.north west) --([xshift=2mm,yshift=-2mm]frame.south east);
\draw[red,line width=1cm] ([xshift=-2mm,yshift=-2mm]frame.south west) --([xshift=2mm,yshift=2mm]frame.north east);
\end{tcbinvclipframe}% 2本の帯
}]
\lipsum[2]
\end{tcolorbox}
} \newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{%P.6本文内に2本の帯
\begin{tcolorbox}[enhanced,title=My Title, overlay={\begin{tcbclipinterior}
\draw[red,line width=1cm] (interior.north west)--(interior.south east);
\draw[red,line width=1cm] (interior.south west)--(interior.north east); \end{tcbclipinterior}}]
\lipsum[1]
\end{tcolorbox}
%P.6,タイトル文字の高さでタイトル部分が揃わなくなる
\tcbset{colback=white,arc=0mm,width=(\linewidth-4pt)/4,
equal height group=AT,before=,after=\hfill,fonttitle=\bfseries}
The following titles are not adjusted:\\
\foreach \n in {xxx,ggg,AAA,\"Agypten} {\begin{tcolorbox}[title=\n,colframe=red!75!black]
Some content.\end{tcolorbox}}
%P.6,タイトル文字によらずタイトル部分が揃う
Now, we try again with adjusted titles:\\
\foreach \n in {xxx,ggg,AAA,\"Agypten} {\begin{tcolorbox}[adjusted title=\n,colframe=blue!75!black]
Some content.\end{tcolorbox}}
}
%P.6,幅指定
{\tcbset{enhanced,width=5cm,colframe=red!50!white,coltitle=black, colbacktitle=yellow!50!white}
\begin{tcolorbox}[title=\mbox{This is a title which is unbreakable and far too long}] This is a tcolorbox.
\end{tcolorbox}
%P.6,幅指定で打ち切る
\begin{tcolorbox}[title=\mbox{This is a title which is unbreakable and far too long}, clip title]
This is a tcolorbox.
\end{tcolorbox}
}
%P.6,tcolorboxの内外に波線・点線を引く
{\begin{tcolorbox}[enhanced,title=Rounded corners,fonttitle=\bfseries,boxsep=5pt, arc=8pt,
borderline={0.5pt}{0pt}{red},
borderline={0.5pt}{5pt}{blue,dotted},
borderline={0.5pt}{-5pt}{green,dashed} ]
This is a tcolorbox.
\end{tcolorbox}
\bigskip
\begin{tcolorbox}[enhanced,title=Sharp corners,fonttitle=\bfseries,boxsep=5pt,
arc=0pt,outer arc=0pt,
borderline={0.5pt}{0pt}{red}, borderline={0.5pt}{5pt}{blue,dotted}, borderline={0.5pt}{-5pt}{green,dashed,sharp corners} ]
This is a tcolorbox.
\end{tcolorbox}}
{%P.6,枠を複数色の線で
\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm,boxsep=1.5mm,colback=yellow!20!white,
colframe=blue,
borderline={1mm}{1mm}{white},
borderline={1mm}{2mm}{red}
]
\lipsum[1]
\end{tcolorbox}
%P.7,青白点線で縁取り
\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm, frame hidden,colback=blue!10!white, borderline={1mm}{0mm}{blue,dotted} ]
\lipsum[2]
\end{tcolorbox}
%P.7,赤・橙・黄で左右
\begin{tcolorbox}[enhanced,skin=enhancedmiddle,
frame hidden,interior hidden,top=0mm,bottom=0mm,boxsep=0mm, borderline={0.75mm}{0mm}{red}, borderline={0.75mm}{0.75mm}{red!50!yellow}, borderline={0.75mm}{1.5mm}{yellow}, ]
\lipsum[3]
\end{tcolorbox}
}
{%P.7,緑tcolorboxに青い縁取り
\newtcolorbox{mygreenbox}[2][]{%
enhanced,width=\linewidth-6pt,
enlarge top by=3pt,enlarge bottom by=3pt,
enlarge left by=3pt,enlarge right by=3pt, title={#2},frame hidden,boxrule=0pt,top=1mm,bottom=1mm, colframe=green!30!black, colbacktitle=green!50!yellow, coltitle=black, colback=green!25!white, borderline={0.5pt}{-0.5pt}{green!75!blue}, borderline={1pt}{-3pt}{green!50!blue},#1}
\begin{mygreenbox}{My title} \lipsum[4]
\end{mygreenbox}
}
{%P.7,boundingタイトル
\tcbset{enhanced,nobeforeafter,width=4cm,fonttitle=\bfseries}
\begin{tcolorbox}[show bounding box,title=Normal]
This is a tcolorbox.
\end{tcolorbox}%
\begin{tcolorbox}[show bounding box=blue,title=Shadow,drop fuzzy shadow] This is a tcolorbox.
\end{tcolorbox}%
\begin{tcolorbox}[show bounding box=green,title=Enlarged,drop fuzzy shadow,
enlarge by=2mm] This is a tcolorbox. \end{tcolorbox}
}
{%P.7,影付きtcolorbox
\tcbset{enhanced,colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[title=My own shadow, shadow={2mm}{-1mm}{0mm}{black!50!white}]
This is a tcolorbox.
\end{tcolorbox}
\par\bigskip \begin{tcolorbox}[title=Another shadow,
shadow={-1mm}{-2mm}{0mm}{fill=blue, opacity=0.5}]
This is a tcolorbox.
\end{tcolorbox}
\par\bigskip \begin{tcolorbox}[title=Double shadow,
shadow={-1.5mm}{-1.5mm}{0mm}{fill=blue, opacity=0.25},
shadow={1.5mm}{-1.5mm}{0mm}{fill=red, opacity=0.25}]
This is a tcolorbox. \end{tcolorbox}
\par\bigskip \begin{tcolorbox}[title=Far shadow,
shadow={5.5mm}{-3.5mm}{2mm}{fill=black, opacity=0.25}]
This is a tcolorbox.
\end{tcolorbox}
\par\bigskip\bigskip \begin{tcolorbox}[title=Halo shadow,
shadow={0mm}{0mm}{-1.5mm}{fill=yellow!75!red,opacity=0.5}]
This is a tcolorbox.
\end{tcolorbox}
}
{
\tcbset{enhanced,colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[title=My own shadow, fuzzy shadow={2mm}{-1mm}{0mm}{0.1mm}%
{black!50!white}]
This is a tcolorbox.
\end{tcolorbox}
\par\bigskip \begin{tcolorbox}[title=Another shadow,
fuzzy shadow={-1mm}{-2mm}{0mm}{0.2mm}{fill=black}]
This is a tcolorbox.
\end{tcolorbox}
\par\bigskip \begin{tcolorbox}[title=Double shadow,
fuzzy shadow={-1.5mm}{-1.5mm}{0mm}{0.1mm} {blue},
fuzzy shadow={1.5mm}{-1.5mm}{0mm}{0.1mm} {red}]
This is a tcolorbox. \end{tcolorbox}
\par\bigskip \begin{tcolorbox}[title=Far shadow,
fuzzy shadow={5.5mm}{-3.5mm}{0mm}{0.3mm} {black}]
This is a tcolorbox.
\end{tcolorbox}
\par\bigskip\bigskip \begin{tcolorbox}[title=Glow shadow,
fuzzy shadow={0mm}{0mm}{-1.5mm}{0.15mm} {yellow!75!red}]
This is a tcolorbox.
\end{tcolorbox}
}
{\begin{tcolorbox}[blank,enhanced jigsaw,boxsep=2pt,arc=2pt, fuzzy halo=2mm with red!50!white,
fuzzy halo=1mm with white]
\lipsum[1]
\end{tcolorbox}
}
{%P.8,半透明
\tcbset{enhanced,colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[title=Transparent box, tikz={opacity=0.5,transparency group}]
This is a tcolorbox.
\end{tcolorbox}
}
{%P.8,回転
\tcbset{enhanced,colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[title=Rotated box,rotate=30] This is a tcolorbox.
\end{tcolorbox}
}
{%P.8,拡大・縮小
\tcbset{enhanced,colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries}
\begin{tcolorbox}[title=Scaled box,scale=0.5] This is a tcolorbox.
\end{tcolorbox}
\begin{tcolorbox}[title=Scaled box,scale=1.25] This is a tcolorbox.
\end{tcolorbox}
}
{
\tcbset{standard,equal height group=standard, colback=lightgreen,colframe=darkgreen,colbacklower=limegreen!75!lightgreen, colbacktitle=limegreen!75!darkgreen,width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm}
%
\begin{tcolorbox}
This is my content.
\end{tcolorbox}\hfill
\begin{tcolorbox} This is my content. \tcblower
More content.
\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title]
This is my content. \end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title]
This is my content. \tcblower
More content.
\end{tcolorbox}
}
{%P.9,数式もOK
\tcbset{skin=enhanced,fonttitle=\bfseries,boxrule=1mm,
frame style={draw=firebrick,fill=salmon},drop fuzzy shadow,
interior style={draw=firebrick,top color=salmon!10,bottom color=salmon!20}, segmentation style={draw=firebrick,solid,decorate,
decoration={coil,aspect=0,segment length=10.1mm}}}
\begin{tcolorbox}
\[\int_1^2 \frac{1}{x}~dx = \ln(2).\]
\end{tcolorbox}
}
{\newtcboxfit{\mybox}[1]{blank,width=4cm,height=7cm,top=4pt}%P.9,表の幅・高さ指定,下の線を分離
\begin{tabular}{|c|c|c|}\hline
A & B & C\\\hline
\mybox{A}{\lipsum*[1]}&\mybox{B}{\lipsum*[2]}&\mybox{C}{\lipsum*[3]}\\\hline
\end{tabular}}
{
\tcbset{textmarker/.style={%
skin=enhancedmiddle jigsaw,breakable,parbox=false, boxrule=0mm,leftrule=5mm,rightrule=5mm,boxsep=0mm,arc=0mm,outer arc=0mm, left=3mm,right=3mm,top=1mm,bottom=1mm,toptitle=1mm,bottomtitle=1mm,oversize}}
\newtcolorbox{yellow}{textmarker,colback=yellow!5!white,colframe=yellow} \newtcolorbox{orange}{textmarker,colback=darkorange!5!white,
colframe=darkorange!75!yellow} \newtcolorbox{red}{textmarker,colback=red!5!white,colframe=red}
\newtcolorbox{blue}{textmarker,colback=deepskyblue!5!white,colframe=deepskyblue}
\newtcolorbox{green}{textmarker,colback=chartreuse!5!white,colframe=chartreuse} \newtcolorbox{rainbow}{textmarker,interior hidden,
frame style={top color=blue,bottom color=red,middle color=green}}
\begin{yellow}%
\lipsum[1-3]%
\end{yellow}%
\begin{orange}%
\lipsum[4]%
\end{orange}%
\begin{red}%
\lipsum[5]%
\end{red}%
\begin{green}%
\lipsum[6]%
\end{green}%
\begin{blue}%
\lipsum[7]%
\end{blue}%
\begin{rainbow}%
\lipsum[8]%
\end{rainbow}%
}
{%P.10,角斜め切り
\tikzset{colframe/.style={fill,top color=red!75!black,bottom color=red!75!black,
middle color=red},
colint/.style={fill=yellow!50!white}, coltria/.style={fill=red!15!white}}
\newtcolorbox{freebox}[1][]{freelance,breakable,leftrule=5mm,left=2mm, watermark color=red!50!yellow!75!white,
watermark text on=unbroken is unbroken box,
watermark text on=first is first part,
watermark text on=middle is middle part,
watermark text on=last is last part,
% code for unbroken boxes:
frame code={\path[colframe] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--cycle; }, interior code={\path[colint] (interior.south west)--(interior.north west)
--([xshift=-4.8mm]interior.north east)--([yshift=-4.8mm]interior.north east) --([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east) --cycle; },
% code for the first part of a break sequence:
extend freelancefirst={%
frame code={\path[colframe] (frame.south west)--(frame.north west) --([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east) --(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm) -- +(60:2mm)-- cycle; },
interior code={\path[colint] (interior.south west|-frame.south) --(interior.north west)--([xshift=-4.8mm]interior.north east) --([yshift=-4.8mm]interior.north east)--(interior.south east|-frame.south) --cycle; },
},%
% code for the middle part of a break sequence:
extend freelancemiddle={%
frame code={\path[colframe] (frame.south west)--(frame.north west) --(frame.north east)--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm) -- cycle;
},
interior code={\path[colint] (interior.south west|-frame.south) --(interior.north west|-frame.north)--(interior.north east|-frame.north) --(interior.south east|-frame.south)--cycle; },
},
% code for the last part of a break sequence:
extend freelancelast={%
frame code={\path[colframe] (frame.south west)--(frame.north west) --(frame.north east)--([yshift=5mm]frame.south east) --([xshift=-5mm]frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm) -- +(300:2mm) -- cycle;
},
interior code={\path[colint] (interior.south west)
--(interior.north west|-frame.north)--(interior.north east|-frame.north) --([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east) --cycle; },
}, #1}
\begin{freebox}
\lipsum[1]
\end{freebox}
\begin{freebox}
\lipsum[1-12]
\end{freebox}
}
{
%P.12,3行組
\begin{tcolorbox}[skin=bicolor,title=the title, frame style={top color=firebrick,
bottom color=firebrick!15!white,draw=black},
interior style={left color=salmon,right color=salmon!50!white}, segmentation style={right color=salmon,left color=salmon!50!white}]
the upper part. \tcblower
the lower part.
\end{tcolorbox}
}
{
\tcbset{beamer,equal height group=beamer, colback=lightgreen,colframe=darkgreen, width=(\linewidth-6mm)/4,nobeforeafter, left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm}
(style, no value)
it also changes the geometry and some style !options.
%
\begin{tcolorbox}
This is my content.
\end{tcolorbox}\hfill
\begin{tcolorbox} This is my content. \tcblower
More content.
\end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title]
This is my content. \end{tcolorbox}\hfill \begin{tcolorbox}[adjusted title=My title]
This is my content. \tcblower
More content.
\end{tcolorbox}
}
{
%P.12,beamer
\newtcolorbox{myblock}[2][]{
beamer,breakable,colback=lightblue,colframe=darkblue,#1,title=#2}
\begin{myblock}{Beamerish \texttt{block}: \texttt{myblock}}
\lipsum[1]
\end{myblock}
}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
%----------------------------------------------------------
\section{\LaTeX-Examples}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black}
This is a \LaTeX\ example:
\begin{equation}
\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.
\end{equation}
\end{tcblisting}
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side text,
title=Side by side,fonttitle=\bfseries}
This is a \LaTeX\ example:
\begin{equation}
\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.
\end{equation}
\end{tcblisting}
{}
%----------------------------------------------------------
\section{Theorems}
\newtcbtheorem[auto counter,number within=section]{theo}%
{Theorem}{fonttitle=\bfseries\upshape, fontupper=\slshape,
arc=0mm, colback=blue!5!white,colframe=blue!75!black}{theorem}
\begin{theo}{Summation of Numbers}{summation}
For all natural number $n$ it holds:
\begin{equation}
\tcbhighmath{\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.}
\end{equation}
\end{theo}
We have given Theorem \ref{theorem:summation} on page \pageref{theorem:summation}.
%----------------------------------------------------------
\section{Watermarks}
\begin{tcolorbox}[enhanced,watermark graphics=Basilica_5.png,
watermark opacity=0.3,watermark zoom=0.9,
colback=green!5!white,colframe=green!75!black,
fonttitle=\bfseries, title=Box with a watermark picture]
Here, you see my nice box with a picture as a watermark.
This picture is automatically resized to fit the dimensions
of my box. Instead of a picure, some text could be used or
arbitrary graphical code. See the documentation for more options.
\end{tcolorbox}
%----------------------------------------------------------
\section{Boxes in boxes}
\begin{tcolorbox}[colback=yellow!10!white,colframe=yellow!50!black,
every box/.style={fonttitle=\bfseries},title=Box]
\begin{tcolorbox}[enhanced,colback=red!10!white,colframe=red!50!black,
colbacktitle=red!85!black,
title=Box inside box,drop fuzzy shadow]
\begin{tcolorbox}[beamer,colframe=blue!50!black,title=Box inside box inside box]
An now for something completely different: Boxes!\par\medskip
\newtcbox{\mybox}{nobeforeafter,tcbox raise base,colframe=green!50!black,colback=green!10!white,arc=0pt}
\mybox{This} \mybox{is} \mybox{another} \mybox{box.}
\end{tcolorbox}
\end{tcolorbox}
\end{tcolorbox}
%----------------------------------------------------------
\section{Breakable Boxes}
\begin{tcolorbox}[enhanced jigsaw,breakable,pad at break=1mm,
colback=blue!5!white,colframe=blue!75!black,title=Breakable box,
watermark color=white,watermark text=\Roman{tcbbreakpart}]
\lipsum[1-12]
\end{tcolorbox}
%----------------------------------------------------------
\clearpage
\section{Fit Boxes}
\begin{tcolorbox}[enhanced,fit to height=10cm,
colback=green!25!black!10!white,colframe=green!75!black,title=Fit box (10cm),
drop fuzzy shadow,watermark color=white,watermark text=Fit]
\lipsum[1-4]
\end{tcolorbox}
\begin{tcolorbox}[enhanced,fit to height=5cm,
colback=green!25!black!10!white,colframe=green!75!black,title=Fit box (5cm),
drop fuzzy shadow,watermark color=white,watermark text=Fit]
\lipsum[1-4]
\end{tcolorbox}
\begin{tcolorbox}[frogbox,ribbon,title=My title] This is a \textbf{tcolorbox}.\par
Here, we apply a second overlay.
\end{tcolorbox}
\end{document}