# Beamer \pause in LaTeX minted

How can I \pause in the middle of a minted source code in Beamer?

\documentclass[12pt]{beamer}

\usepackage{minted}

...

\newminted{csharp}{bgcolor=gray!25,fontsize=\footnotesize,mathescape}

...

\begin{frame}[fragile]
\begin{csharpcode}
public class Objet
{
public int Attr1 { get; set; };

% I want to \pause here

public int Attr2 { get; set; };
}
\end{csharpcode}
\end{frame}


I want to show the audience just a part of the code in a first frame and the following in a second frame.

It's useful because if I show everything they will not be able to focus on what I am talking about in the first place.

## migrated from stackoverflow.comNov 10 '13 at 16:06

This question came from our site for professional and enthusiast programmers.

• I'm not sure this is possible; why not breaking the code into two parts? – egreg Nov 10 '13 at 17:18

Put the code in an external file and use inputminted with different start and end lines. Use the standard frame selection tokens for beamer.

Use two environments:

\documentclass[12pt]{beamer}
\usepackage{minted}
\newminted{csharp}{bgcolor=gray!25,fontsize=\footnotesize,mathescape}
\begin{document}

\begin{frame}[fragile]
\begin{csharpcode}
public class Objet
{
public int Attr1 { get; set; };

\end{csharpcode}
\pause\vspace{-2pt}
\begin{csharpcode}

public int Attr2 { get; set; };
}
\end{csharpcode}
\end{frame}
\end{document}