According to tcolorbox
user manual, compilation time can benefit much from using spartan style
. But it is not clear to me how to apply a style to the a concrete box, or to the whole document. Illustrative examples might help in doing so.
1 Answer
Just say \tcbset{spartan}
to get all boxes using spartan
or use it locally for particular boxes or in a \newtcolorbox
definition (not shown here)
The spartan
option is a skin
actually, so \tcbuselibrary{skins}
is necessary or \usepackage[skins]{tcolorbox}
or \usepackage[most]{tcolorbox}
.
In fact spartan
is a wrapper for skin=spartan
.
\documentclass{article}
\usepackage[most]{tcolorbox}
\tcbset{spartan}
\begin{document}
\begin{tcolorbox}
Foo
\end{tcolorbox}
\begin{tcolorbox}[enhanced]
Foo
\end{tcolorbox}
\end{document}
-
What's the purpose of
[most]
? It only worked for me when this was added. Aug 6, 2017 at 7:42 -
@nightcod3r: It loads most of the extra
tcolorbox
libraries, especially theskin
library -- which is needed forspartan
. It's documented in thetcolorbox
manual– user31729Aug 6, 2017 at 7:50 -
I meant the
skins
library, notskin
– user31729Aug 6, 2017 at 7:56