\RequirePackage{tcolorbox} \tcbuselibrary{skins,breakable} \tcbset{enhanced,enhanced jigsaw} \newtcolorbox{cnltxcode}[1][]{ boxrule = 1pt , colback = cnltxbg , colframe = cnltx , arc = 5pt , beforeafter skip = .5\baselineskip ,% #1% } \newcounter{examplefile} \NewDocumentCommand{\Beispieldatei}{m m}{ \begin{cnltxcode}[ step and label={examplefile}{example:#1} , sidebyside align=top seam,sidebyside, righthand width=\linewidth/4, sidebyside gap=0pt, lower separated=false, title=Beispiel~\theexamplefile\ \enquote{\texttt{#2}}~% \href{Beispiele/#1.tex}{ \color{white} [\TeX]}~% \href{Beispiele/#1.pdf}{ \color{white} [PDF]} ] \lstinputlisting[style=cnltx,lastline=10]{Beispiele/#1.tex} \tcblower \fbox{\href{Beispiele/#1.pdf}{\includegraphics[width=.8\linewidth]{Beispiele/#1.pdf}}}% \end{cnltxcode} }