Im stuck with a color issue inside a tcolorbox. I have two versions of a document : one for students, the other one for me.
The student version have blanks, which are filled in mine. In fact, those blanks are written but in white in the students version. My problem is the following : all those blanks are in a tcolorbox, which sometimes breaks page, and when this happen, the white color is lost and the text becomes visible. I've had a look at the documentation - which is so huge ! - but couldn't find any help.
Edit : a quick sample up to date
\documentclass{article}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[most]{tcolorbox}
\usepackage{ifthen}
\usepackage{enumitem}
\usepackage{array}
\newcounter{current}
\setcounter{current}{1}
\newcommand{\module}[1]{\lvert#1\rvert}
\newcommand{\exemples}[1]{
\begin{tcolorbox}[breakable,colframe=gray!10,colback=gray!10]
\textbf{Exemples \thechapter.\thecurrent}
\begin{enumerate}[label=(\arabic*),wide]
#1
\end{enumerate}
\end{tcolorbox}
\stepcounter{current}
}
\newcommand{\hide}[1]{
\ifthenelse{\equal{\edition}{E}}{
\color{gray!10}
%here is the fontspec code I should include
#1
\color{black}
}
{
}
}
\begin{document}
\sffamily
\exemples{
\item Résoudre l'équation $z^2+(4+7i)\cdot z-31-i=0$
\def\edition{E}
\hide{On a : $\begin{array}[t]{ccl}\Delta&=&(4+7i)^2-4\cdot1\cdot(-31-i)\\
&=&16-49+56i+124+4i\\
&=&91+60i \\
\end{array}$
On doit donc chercher les $w$ tels que $w^2=\Delta$. On pose $w=a+b\cdot i$. On a alors le système d'équations suivant :
\begin{center}
\begin{tabular}{cl}
&$\left\{\begin{array}{l}
\module{w}^2=\module{\Delta} \\
w^2=\Delta \\
\end{array}\right.$\\
$\Leftrightarrow$ &$\left\{\begin{array}{l}
a^2+b^2=\sqrt{91^2+60^2} \\
(a^2-b^2)+2abi=91+60i \\
\end{array}\right.$\\
$\Leftrightarrow$ &$\left\{\begin{array}{l}
a^2+b^2=109 \\
(a^2-b^2)=91 \\
2ab=60 \\
\end{array}\right.$\\
$\Leftrightarrow$ &$\left\{\begin{array}{l}
2a^2=200 \\
2b^2=18 \\
2ab=60 \\
\end{array}\right.$\\
\end{tabular}
\end{center}
qui donne les deux solutions $w_0=10+3i$ et $w_1=-10-3i$.
Ceci fournit les deux solutions de notre équation de départ
$$z_0=\frac{-(4+7i)+10+3i}2=3-2i$$ et
$$z_1=\frac{-(4+7i)-10-3i}2=-7-5i$$}
\item Résoudre l'équation $2iz^2+(1+5i)\cdot z-1+13i=0$
\def\edition{E}
\hide{On a : $\begin{array}[t]{ccl}\Delta&=&(1+5i)^2-4\cdot2i \cdot(-1+13i)\\
&=&1-25+10i+8i+104\\
&=&80+18i \\
\end{array}$
On doit donc chercher les $w$ tels que $w^2=\Delta$. On pose $w=a+b\cdot i$. On a alors le système d'équations suivant :
\begin{center}
\begin{tabular}{cl}
&$\left\{\begin{array}{l}
\module{w}^2=\module{\Delta} \\
w^2=\Delta \\
\end{array}\right.$\\
$\Leftrightarrow$ &$\left\{\begin{array}{l}
a^2+b^2=\sqrt{80^2+18^2} \\
(a^2-b^2)+2abi=80+18i \\
\end{array}\right.$\\
$\Leftrightarrow$ &$\left\{\begin{array}{l}
a^2+b^2=82 \\
(a^2-b^2)=80 \\
2ab=18 \\
\end{array}\right.$\\
$\Leftrightarrow$ &$\left\{\begin{array}{l}
2a^2=2 \\
2b^2=162 \\
2ab=18 \\
\end{array}\right.$\\
\end{tabular}
\end{center}
qui donne les deux solutions $w_0=9+i$ et $w_1=-9-i$.
Ceci fournit les deux solutions de notre équation de départ
$$z_0=\frac{-(1+5i)+9+i}{4i}=-1-2i$$ et
$$z_1=\frac{-(1+5i)-9-i}{4i}=\frac{-3+5i}2$$
}
}
\end{document}
A quick sample of what I am doing :
\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage{ifthen}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage[most]{tcolorbox}
\newcommand{\exemple}[1]{
\begin{tcolorbox}[breakable,colframe=gray!10,colback=gray!10]
\textbf{Exemple}
#1
\end{tcolorbox}
}
\begin{document}
\exemple{
\color{gray!10}
\lipsum
}
\end{document}
The result is that the first page is empty - which is expected - but the second comes in black ;-(
Any advice ? Thanks a lot in advance !
tcolorboxmanual. – leandriis Apr 05 '18 at 17:39