My TeX level isn't the greatest, I am trying hard to improve but I am always struggling.
I would like to change the color of text inside a tcolorbox and that this color formatting survives a pagebreak. This doesn't seem to be possible according to what I found here : Maintaining text colour change in a breakable tcolorbox but it seems to be possible under XeTeX using fontspec. I have one last problem before I finally manage to solve this problem I have add for more than a year and many hours of swearing, this doesn't seem to apply to text put in math mode.
Here is a MWE based on what the link above :
\documentclass{article}
\usepackage{mathspec}
\setmainfont{Palatino}
\usepackage{blindtext}
\usepackage[breakable]{tcolorbox}
\begin{document}
\begin{tcolorbox}[breakable]
\blindtext[3]
\addfontfeatures{Color=blue}
\blindtext[3]
\addfontfeatures{Color=red}
\blindtext
\addfontfeatures{Color=brown}
\blindtext
$$F=ma$$
\blindtext[3]
\addfontfeatures{Color=blue}
\blindtext[3]
\addfontfeatures{Color=red}
\blindtext
\addfontfeatures{Color=brown}
\blindtext
\end{tcolorbox}
\end{document}
Is it possible to get the $$F=ma$$
in brown ?
Of course, any solution using the xcolor package won't work because of the incompatibility with tcolorbox, so I really need a font-associated solution. I had a look at the mathspec package but couldn't find the solution in the documentation. I somehow feel it shouldn't be that hard though.
Thanks in advance !
$$...$$
- that's deprecatedtcolorbox
be incompatible withxcolor
? It is automatically loaded when you suetcolorbox
. There is no way to usetcolorbox
withoutxcolor
{extras={colupper=red}}
is lost once the pages breaks.