tcbox raise base is wonderful to help align my text and tcbox. However, what if I want tcbox raise base for some text and not for others? Meaning that I am trying to get 0.0.1 and 0.0.3 in the same document.
\documentclass{book}
\usepackage{tcolorbox}% for framed rounded boxes
\tcbset{colframe=black,colback=white,colupper=black,
fonttitle=\bfseries,nobeforeafter,center title,size=small,tcbox raise base}
\begin{document}
\subsection{tcbox raise base works here}
\tcbox{0}, \tcbox{1}, \tcbox{2}, ... ,\tcbox{8}, \tcbox{9} -- numbers
\tcbox{.} -- decimal point
\tcbox{$+$}, \tcbox{$-$}, \tcbox{$\times$}, \tcbox{$\div$} -- operators
\tcbox{$(-)$} -- negative sign
\subsection{tcbox raise base does not work here}
\tcbox{$($} \tcbox{$(-)$} \tcbox{$3$} \tcbox{$.$} \tcbox{$6$} \tcbox{$+$} \tcbox{$5$} \tcbox{$x^2$} \tcbox{$)$} \tcbox{$\div$} \tcbox{$2$}
\end{document}
Best Answer
I suggest you to issue a new
\tcbset
with new settings each time you need to change them.So remove
tcbox raise base
from the first\tcbset
and issuewhen you need that, and
when you don't.
MWE
Output