minted icon indicating copy to clipboard operation
minted copied to clipboard

Adding a “boxedminted” environment?

Open eg9 opened this issue 7 years ago • 2 comments

A question in TeX.StackExchange made me wonder if you deem interesting to add a boxedminted environment that uses BVerbatim instead of Verbatim and would be useful to move around a minted block.

\newenvironment{boxedminted}[2][]
 {\VerbatimEnvironment
  \RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{}%
  \begin{minted}[#1]{#2}}
 {\end{minted}}

I did a few experiments and it seems to work well, but you surely have material for more extensive testing.

eg9 avatar Sep 14 '18 13:09 eg9

There is another question on Tex.SE where the same code has been suggested in order to center a listing on a page. A user found out that linenumbers did not work. I also noticed that autogobble did not work and that the offical minted docs say not to mess with BVerbatim.

Do linenumbers and autogobble work with your boxedminted?

lucc avatar Jul 28 '19 08:07 lucc

see also #133

h-2 avatar Sep 11 '19 13:09 h-2