# linenumbers of minted are not shown in beamer if i use infolines

linenumbers of minted are not shown in beamer if i use infolines as an outertheme

example:

\documentclass{beamer}
\usepackage{minted}

\usetheme{Warsaw}
\useoutertheme{infolines}

\begin{document}
\begin{frame}[fragile]{Hello}
\begin{minted}[linenos]{c}
#include <stdio.h>

int main() {
printf("hello\n");
}
\end{minted}
\end{frame}
\end{document}


any suggestions?

-
Welcome to TeX.SE! Great question, and thanks for providing a complete MWE, it really helps folks trying to debug :) –  cmhughes Dec 1 '12 at 17:38

This is caused because the numbers are set in the margin, but with the infolines theme, the margin is too small. It does

\setbeamersize{text margin left=1em,text margin right=1em}


Reverting the margins back to the defaults of 1cm is one way to fix the problem, and may or may not be satisfactory to you:

\documentclass{beamer}
\usepackage{minted}

\usetheme{Warsaw}
\useoutertheme{infolines}
\setbeamersize{text margin left=1cm,text margin right=1cm}

\begin{document}
\begin{frame}[fragile]{Hello}
\begin{minted}[linenos]{c}
#include <stdio.h>

int main() {
printf("hello\n");
}
\end{minted}
\end{frame}
\end{document}

-
thanks! exactly what i was looking for. –  obl Dec 1 '12 at 17:46