Criteria for good code formatting:
- Syntax highlighting
- Line numbers
- Code inside should tolerate additional markup (e.g. highlighting salient points)
- Copy/pasting the code from a PDF should Just Work™
With that last point, I would like for whitespace to be preserved so copy/pasting code from the PDF doesn't result in a completely indent-less file.
listingsandminted. Your last point still is a desideratum, cf. https://tex.stackexchange.com/questions/472099/how-to-configure-tcblisting-with-minted-to-allow-copy-paste-from-listing-with-wh/472112#472112 – DG' Aug 01 '23 at 20:21atrilortexworksviever cannot the take the code without the line numbers, but inokularyou can select only the framed code without problems. – Fran Aug 01 '23 at 21:01piton(but, as with other packages, copy&paste will note "just work"). – F. Pantigny Aug 03 '23 at 07:47