I want to avoid to recompile large tikz graphics and therefore I compile them as a standalone pdf file. This file contains some OCG layers which I want to use in the main file, but the OCG layer are ignored in the main file.
OCG file (ocg-pdf.pdf):
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{ocgx}
\begin{document}
\begin{tikzpicture}
\begin{scope}[ocg={name=Layer1,ref=l1,status=visible}]
\filldraw[color=red] (0,0) rectangle (1,1);
\end{scope}
\begin{scope}[ocg={name=Layer2,ref=l2,status=visible}]
\filldraw[color=blue] (2,2) rectangle (3,3);
\end{scope}
\end{tikzpicture}
\end{document}
Main file:
\documentclass{scrartcl}
\usepackage{graphicx}
\begin{document}
\includegraphics{ocg-pdf}
\end{document}
Has anyone an idea?
\includegraphics? (Sorry, I have no time to test myself at the moment.) – Paul Gessler Oct 27 '14 at 14:49