I'm working on a reference table for printf format strings:
\documentclass[a4paper]{article}
\usepackage{tabularx}
\usepackage{minted}
\usepackage{fontspec}
\setmonofont{ubuntu Mono}
\usepackage[a4paper, total={6in, 8in}]{geometry}
%opening
\title{\texttt{printf} Format String Reference}
\date{}
\begin{document}
\maketitle
\section*{Format specifiers}
\begin{tabularx}{\textwidth}{ |X|X|X| }
\hline
\texttt{\%s} & \mintinline{c}{printf("Hello \%s", "World");} & \texttt{Hello World} \\
\hline
\texttt{\%d} & \mintinline{c}{printf("\%d cats", 5);} & \texttt{5 cats} \\
\hline
\end{tabularx}
\end{document}
I'm compiling with lualatex -shell-escape -synctex=1 -interaction=nonstopmode "printf".tex, the error I get is:
l.20 \end{tabularx}
! Package minted Error: Missing Pygments output; \inputminted was
probably given a file that does not exist--otherwise, you may need
the outputdir package option, or may be using an incompatible build tool.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
If I move the \mintinline out of the tabularx block, it works fine. If I change the package declaration for minted to \usepackage[cache=false]{minted}, it works (slowly) but the table doesn't resize properly and the end of the code sample overlaps the next column:


tabularxhas severe restrictions about verbatim material in it. On the other hand atabularxwithXXXcan be easily realized withtabular. – egreg Oct 08 '15 at 20:36