I have an if statement below that toggles whether something is visible or not. I'm using this inside a tcolorbox as solutions to an example question.
What I'm hoping to do is be able to change the \ShowSoltrue to \ShowSolFalse and have the height of the tcolourbox unaffected. That is, I want it to be blank but the same height as if it were full.
Is there a way to achieve this?
\documentclass[12pt]{report}
\usepackage[most]{tcolorbox}
\usepackage {lipsum}
\newtcolorbox{examplebox}[1][]{}
\newif\ifShowSol
\newcommand{\showsol}[1]{\ifShowSol #1 \fi}
\ShowSoltrue
\begin{document}
\begin{examplebox}
\textbf{Example 1.1}\\
\showsol{\lipsum[1-1]}
\end{examplebox}
\end{document}
Here is what currently happens when toggled to false - the box shrinks in height.
\documentclass[12pt]{report}
\usepackage[most]{tcolorbox}
\usepackage {lipsum}
\newtcolorbox{examplebox}[1][]{}
\newif\ifShowSol
\newcommand{\showsol}[1]{\ifShowSol #1 \fi}
\ShowSolfalse
\begin{document}
\begin{examplebox}
\textbf{Example 1.1}\\
\showsol{\lipsum[1-1]}
\end{examplebox}
\end{document}