I want to make a tcolorbox with minted Python code similar to this answer, including the size/aspect-ratio of the box, but with an additional requirement. I would like the rendered tcolorbox to take up the entire PDF document, notwithstanding some white space near the rounded corners. Or rather, I would like the tcolorbox to be of a similar size as if it were going to be placed in a document, but have all the white space around it tightened at or close to its border. Using that linked answer as an example, I would like the output be a PDF that contains this:
I seem to have eliminated the margins and the top whitespace with the geometry package by setting
margin=0mm, but I am not sure how to remove the rest of the whitespace. I tried
bottom=0mm but that did not work.
But there is still whitespace below.
With these isolated little code snippets I intend to put them into different slides and documents using the
\includegraphcs command from
graphicx. This in part to avoid perplexing behaviour that I suspect is coming from so many disparate packages being included in the preamble, but it would also allow me to reuse and share little snippets of code for document preparation.
I am using Texmaker with PdfLaTeX, if that matters. Is there a way to do this?