I currently have two minted environments in each their minipage environment, so that they can be situated next to each other:
\begin{figure}[!h]
\centering
\begin{minipage}{0.45\linewidth}
\begin{python}
from pycsp_import import *
@process
def producer(cout):
for i in [1,2,3,4,5]:
cout(i)
retire(cout)
@process
def worker(cin):
while True:
print cin()
c = Channel()
Parallel(
producer(-c),
worker(+c)
)
\end{python}
\end{minipage}
\qquad
\begin{minipage}{0.45\linewidth}
\begin{python}
1
2
3
4
Exception
.
\end{python}
\end{minipage}
\end{figure}
Is there a way to get rid of the need of the .
. Can I somehow tell minted that there should be 19 lines, so that the two python environments are the same height?
Best Answer
If you want to do this you have to change the compilation by
pygmentize
. The required option isstripnl
. For more details see: Available lexersTo set the option to the run you have to change the internal definition:
However this influence all compilation by
pygmentize
. To avoid this you can declare a new option.