# How can I include something with overlay specifications in a non-beamer class document?

I've a tikzpicture, in a extra tex file, with beamer overlay specifications. I'd like to include the tikzpicture in the tex file for my slides using beamer, and in the tex file for paper, using article.

Here is a minimal not working example of what I'd like to achieve:

picture.tex:

\begin{tikzpicture}
\node<1-> (1) at (-1,0) {A};
\node<2-> (2) at ( 1,0) {B};
\end{tikzpicture}


slides.tex:

\documentclass{beamer}

\usepackage{tikz}

\begin{document}
\begin{frame}
\input{picture.tex}
\end{frame}
\end{document}


So far so good, everthing is working as expected. No I want to use my picture also in a paper:

paper.tex:

\documentclass{article}

\usepackage{tikz}

\begin{document}
\input{picture.tex}
\end{document}


But this yields:

ERROR: Undefined control sequence.

--- TeX said ---
\tikz@next <#1>#2;->\alt
<#1>{\tikz@@command@path #2;}{\tikz@path@do@at@end }
l.2   \node<1-> (1) at (-1,0) {A};


Use beamerarticle:

\documentclass{article}

\usepackage{beamerarticle}    %% Use it before tikz
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node<1-> (1) at (-1,0) {A};
\node<2-> (2) at ( 1,0) {B};
\end{tikzpicture}
\end{document}