tcolorbox
with \tcbuselibrary{raster}
can distribute boxes to fill the hole page.
After that I want my tikz image to fill the hole box. The width of the box content is given by \linewidth
but how about the height of the available space in the box?
If the height of the box is calculated by tcolorbox
.
How can I pass the value /tcb/text height
to tikzscale
that is then able to generate my plot?
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikzscale}
\usepackage{tcolorbox}
\tcbuselibrary{raster}
\begin{filecontents}{tikzimage.tikz}
\begin{tikzpicture}
\begin{axis}[xlabel=time,ylabel=value]
\addplot{x^2};
\end{axis}
\end{tikzpicture}
\end{filecontents}
\begin{document}
\begin{tcbraster}[%
raster columns=2,
raster rows=2,
raster height=\textheight,
]
\begin{tcolorbox}\end{tcolorbox}
\begin{tcolorbox}\end{tcolorbox}
\begin{tcolorbox}\end{tcolorbox}
\begin{tcolorbox}[title={box 1\\line two}]
\includegraphics[%
width=\linewidth,
height=4cm, % how to get the height of the actual box here?
]{tikzimage.tikz}
\end{tcolorbox}
\end{tcbraster}
\end{document}