TeX - LaTeX Asked on July 8, 2021
Defining a new environment with a tcolorbox with some options strangely leads to a compilation failure that disappears if I remove [hbox]
documentclass{article}
usepackage{tcolorbox}
newenvironment{myenv}
{begin{tcolorbox}[hbox]}
{end{tcolorbox}}
begin{document}
begin{myenv}
blah
end{myenv}
end{document}
I can’t define tcbset{capture=hbox}
because it’s the only option that’s protected from tcbset
In some cases in environments, you need to use the macro form tcolorbox
and endtcolorbox
, instead of the standard begin...end
approach.
documentclass{article}
usepackage{tcolorbox}
newenvironment{myenv}
{tcolorbox[hbox]}
{endtcolorbox}
begin{document}
begin{myenv}
blah
end{myenv}
end{document}
Correct answer by Steven B. Segletes on July 8, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP