I am trying to use a piece of highlighted code using the minted package inside a tabu table:
\documentclass{article}
\usepackage{minted}
\usepackage{longtable}
\usepackage{tabu}
\begin{document}
\begin{tabu*}{X[5,l]X[5,l]}
\begin{minted}{matlab}
function out = op(x, y)
out = x + y;
end
\end{minted}
& \\
\end{tabu*}
\end{document}
With the above MWE I tried to place a minted environment inside a tabu cell analogously to what was done with the Verbatim environment explained within the tabu package documentation in section 1.3 "Inserting Verbatim material (fancyvrb)". However, by compiling the above MWE I get the following error message:
Enter file name:
! Emergency stop.
<read *>
l.15 \end{tabu*}
^^J
*** (cannot \read from terminal in nonstop modes)
If I try to compile the document in scroll mode (-interaction=scrollmode with XeLaTeX from MiKTeX), I just get a command prompt with Enter file name:.
How can the minted environment be used within a tabu table?
mintedis very different fromVerbatim, because it has to write its contents in a file, then call an external program and input the resulting file. – egreg Sep 03 '13 at 12:44minteduses these temporary files. What makes me curious is that if I just press myEnterkey twice inscrollmodethe output is generated as expected without an additional error. – DigNative Sep 03 '13 at 12:51tabudoes on cell entries. – egreg Sep 03 '13 at 12:58mintedinside atabutable on the web. – DigNative Sep 03 '13 at 13:04tabu: the author has long promised a new version, stating it will have a number of incompatibilities with the current one. My advice is to contact the author. – egreg Sep 03 '13 at 13:06matlab-prettifierpackage; see this answer. – jub0bs Apr 28 '14 at 17:12:)However, you might have to wait a few days for all the CTAN mirrors to catch up before being able to install the package directly through your package manager. – jub0bs Apr 28 '14 at 17:20