TeX - LaTeX Asked on July 19, 2021
I would like the codepy
box defined below to start either:
1.1]
When tcolorbox contains a verbatim
environment, the box covers the number.
MWE
documentclass{article}
usepackage{enumitem,xcolor,pythontex}
usepackage[skins,breakable,xparse,many]{tcolorbox}
%
DeclareTColorBox{codepy}{ o }{
skin=enhancedmiddle jigsaw, % Rule D/G uniquement
enlarge top initially by = 2.5mm,
% parbox=false,
rightrule=0mm,
leftrule=2mm,
arc=0mm,
outer arc=0mm,
left=3.4mm,
coltitle=white,
titlerule=0mm,
detach title,
attach title to upper={ quad },
IfValueTF={#1}{title={#1}}{},
}
%
setlist{nolistsep,
leftmargin = *}
%
setlistdepth{3}
%
newlist{myEnumerate}{enumerate}{3}
setlist[myEnumerate,1]{label=arabic*),ref=arabic*,labelwidth=2em,leftmargin=!,wide}
setlist[myEnumerate,2]{label=arabic{myEnumeratei}.arabic*],ref=themyEnumeratei.arabic*,labelwidth=2em,align=left,leftmargin=!}
%
usepackage{lipsum}
%%%%
begin{document}
begin{myEnumerate}
item
begin{myEnumerate}
item
begin{codepy}
Test
begin{pyverbatim}
x = 1
end{pyverbatim}
end{codepy}
end{myEnumerate}
end{myEnumerate}
end{document}
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP