Add support for listings-no-page-break

Update eisvogel.tex
This commit is contained in:
wollanup 2018-11-02 11:36:31 +01:00 committed by GitHub
commit 5a2416417c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,6 +259,11 @@ $if(listings)$
\usepackage{listings}
\newcommand{\passthrough}[1]{#1}
$endif$
$if(listings-no-page-break)$
\usepackage{etoolbox}
\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
\AfterEndEnvironment{lstlisting}{\end{minipage}\par\addvspace{\topskip}}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$