Tagged Questions
9
votes
2answers
100 views
How can I define a new minted environment with optional arguments?
I have the following mwe:
% arara: pdflatex: { shell: true }
% arara: pdflatex: { shell: true }
\documentclass{article}
\usepackage{minted}
\usepackage{listings}
\usepackage{caption}
...
14
votes
2answers
133 views
Repeating environment contents twice
I'm writing a document where I have many code blocks like so:
\begin{align}
d = \sqrt{ (x'-x)^2 }
\end{align}
\begin{minted}{latex}
d = \sqrt{ (x'-x)^2 }
\end{minted}
So the first line renders ...
2
votes
1answer
280 views
Prevent caption to appear on separate page
I'm using a custom listing environment which does not float taken from
Code spanning over two pages with minted, inside listing with caption.
The caption is done with the caption package.
The ...
3
votes
1answer
524 views
New environment with minted
I want to create a new environment to transform this:
\begin{listing}
\caption{some caption}
\label{code:label}
\begin{minted}[options]{language}
My code here
\end{minted}
\end{listing}
...
2
votes
1answer
490 views
Defining a command for a minted environment
How can I define a newcommand macro or an environment for minted?
What is causing the problem that the following does not work?
\newcommand{\CppSourceCode}{
\begin{minted}[linenos=true, mathescape, ...
6
votes
1answer
695 views
Using minted to define a new environment
Can I define a newenvironment that has inside it a minted environment?
eg and environment that would be a quickhand for the following code:
\begin{figure}[htp]
\centering
...