TransWikia.com

What is RecustomVerbatimEnvironment?

TeX - LaTeX Asked on July 13, 2021

I was looking for a way to center source code listings with minted, and came across the following snippet:

  documentclass{article}

  usepackage{minted}
  RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{}

  begin{document}
  begin{figure}
  centering
  begin{minted}{rust}
      fn main() {
          println!("Hello World");
      }
  end{minted}
  caption{Source Code}
  label{lst:source-code}
  end{figure}
  end{document}

This works, but the RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{} line, which is required, baffles me. What does this do and why does this make the listing environment below centered?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP