I have a text in a tcolorbox
for some part of it I want to give some explanations. Please see MWE below. I have some questions (please feel free to answer anyone of them, not all):
- How can I insert a right curly bracket for some lines of the text as shown in the picture?
- How can I align vertically in middle of
tcolorbox
explanation 3? - Can I align arrows (tikz made) relatively to
tcolorbox
as we can do incurrent.page
?
\documentclass[12pt]{article}
\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{ulem,varwidth}
\usepackage{tikz}
\begin{document}
\begin{tcolorbox}[enhanced,
before skip=2mm,after skip=2mm,
colback=black!5,colframe=black,boxrule=0.5mm,
attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight},
varwidth boxed title*=-3cm,sidebyside,lefthand width=11cm,
boxed title style={frame code={
\path[fill=tcbcolback!30!black]
([yshift=-1mm,xshift=-1mm]frame.north west)
arc[start angle=0,end angle=180,radius=1mm]
([yshift=-1mm,xshift=1mm]frame.north east)
arc[start angle=180,end angle=0,radius=1mm];
\path[left color=tcbcolback!10!black!40,right color=tcbcolback!10!black!40,
middle color=tcbcolback!90!black]
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
-- (frame.south east) -- (frame.south west)
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
[sharp corners]-- cycle;
},interior engine=empty,
},
fonttitle=\bfseries,adjusted title={Title 1:},fonttitle=\bfseries,colback=gray!20,colbacktitle=gray!50,coltitle=black,parbox=false,right=4mm]
\begin{tcolorbox}[width=10cm]
This is explanation 1 for the first sentence of the text below.
\end{tcolorbox}
\begin{tikzpicture}[xshift=5cm]
\draw[line width=2pt,->] (0,0) (4,0) -- (4,1);
\end{tikzpicture}
\uline{This is the first sentence of text and we have for this sentence explanation 1.} Here we have some text which expands in several lines and we would like to include these lines into a right big curly bracket, but the first and last sentence we don't want to be included in this bracket. Is it that possible? \uline{This is the last sentence of the text and we have for this sentence explanation 2}.
\begin{tikzpicture}
\draw[line width=2pt,->] (0,0) (4,0) -- (4,-1);
\end{tikzpicture}
\begin{tikzpicture}[overlay,remember picture]
\draw[line width=2pt,->] (0,0) (6.5,3) -- (7.2,3);
\end{tikzpicture}
\begin{tcolorbox}[width=10cm]
This is explanation 2 for the last sentence of the above text.
\end{tcolorbox}
\tcblower
\begin{tcolorbox}[width=5cm]
\uline{\textbf{Explanation 3}}
This is explanation 3 which gives informaion about the text that is included in the right curly bracket
\end{tcolorbox}
\end{tcolorbox}
\end{document}