# Powerdot breaks with both minted and verbments [duplicate]

I am sure I am not the only one trying to put some computer code onto my slides. When it comes to LaTeX presentation class my choice as a long time PostScript/PSTricks user is of course Powerdot. When it comes to syntax highlighting I really like minted not at least because I am heavy Python user. Recently I also discovered verbments which is maintained by a guy from my late mother's hometown so I gave it a try. I really like verbments and maintainer's explanation for what problems he was trying to solve with verbments sound very plausible. However both verbments and minted break Powerdot. This is MWE with verbments and Powerdot.

\documentclass[style=husky]{powerdot}
%\pdsetup{
%palette=red
%}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[dvips]{hyperref}
\hypersetup{colorlinks}
\usepackage{color}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{darkblue}{rgb}{0,0,0.5}
\hypersetup{colorlinks,
linkcolor=darkblue,
filecolor=darkgreen,
urlcolor=darkred,
citecolor=darkred}
%\usepackage[all]{hypcap}
\usepackage{psfrag}
\usepackage{graphicx}
\usepackage{fancybox}
\usepackage{fancyvrb}
%\usepackage{minted}
\usepackage{verbments}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\newtheorem{definition}{Definition}

\title{Association Rule Learning}

\author{Predrag Puno\v{s}evac\\
Auton Lab}
\date{\today}
\begin{document}

\maketitle

\begin{slide} {Use Cases}

Some text
\begin{pyglist}[language=python]
import numpy as np
def boring(args = None):
pass
\end{pyglist}

\end{slide}


Running latex (it is well known that Powerdot doesn't work with pdflatex command)

latex --shell-escape filename.tex


I get the following error

Runaway argument?
import numpy as np def boring(args = None): pass \end {pyglist}
! Paragraph ended before \FV@BeginScanning was complete.
<to be read again>
\par
l.48 \end{slide}


Which looks very similar to the way minted breaks Beamer

Are there any suggestions how to work around this issue? I have managed to import the code essentially by tex-ing it separately and including it into Powerdot as a eps image. However quality leaves much to be desired.

• @Gonzalo Median I just came across your answer. I am still investigating if there are any drawbacks. So far it looks like it is working. Jul 14, 2015 at 3:38
• @Gonzalo Median I just checked several borderline cases and it looks solid. Thanks a bunch! Jul 14, 2015 at 3:44

## 1 Answer

It looks like method=direct for slides containing the computer code material (see Section 6.4 Verbatim on slides of the powerdot documentation) solves my problem. I really got a clue from Gonzalo Medina and his answer to a similar question.