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?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP