
Tengo el MWE con transiciones "visibles"; hay elementos que son visibles en <1> y elementos que son visibles en <2>.
Obtengo el resultado deseado hasta que intento alterar los subtítulos; en el momento en que intento agregar el título de la Figura B en <2> (comentado en el MWE), obtengo como un millón de errores, comenzando con:
\spacefactor incorrecto. \end{marco}
TENGA EN CUENTA QUE QUIERO AGREGAR DIFERENTES TÍTULOS PARA LAS FIGURAS A Y B.
Este es el MWE:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}
\usepackage[labelformat=empty,font=scriptsize,skip=0pt,
justification=raggedright,singlelinecheck=false]{caption}
\usepackage{threeparttable}
\begin{document}
\begin{frame}
\begin{figure}
\begin{measuredfigure}
\begin{tikzpicture}[remember picture, every node/.style={inner sep=0,outer sep=0,align=left}]
\node (node1) at (0,0) {\includegraphics[width=6.8cm]{example-image}};
\visible<1>{
\node[right=6.9cm of node1.south west, anchor=south west] (node2) {\includegraphics[width=3.75cm]{example-image-a}};
}
\visible<2>{
\node[right=6.9cm of node1.south west, anchor=south west] (node2) {\includegraphics[width=3.75cm]{example-image-b}};
}
\end{tikzpicture}
\visible<1>{
\captionof{figure}{\hspace{6.9cm}caption of figure A}
}
%\visible<2>{%WORKS UNTIL I TRY TO ADD THIS CAPTION
% \captionof{figure}{\hspace{6.9cm}caption of figure B}
%}
\end{measuredfigure}
\end{figure}
\end{frame}
\end{document}
Que produce:
Tenga en cuenta la ausencia del título bajo B... ¿Cómo puedo hacer que funcione? ¡¡Gracias!!
Respuesta1
Editar: Pruebe el siguiente MWE:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{frame}
\begin{figure}
\begin{tikzpicture}[
node distance =0mm and 5mm,
every node/.style={anchor=west, align=center}
]
\node (a) {\includegraphics[width=6.8cm]{example-image}};
\visible<1>{
\node (b) [above right=of a.south east] {\includegraphics[width=3.75cm]{example-image-a}};
\node[below=of b] {caption of figure A};
}
\visible<2>{
\node (b) [above right=of a.south east] {\includegraphics[width=3.75cm]{example-image-b}};
\node[below=of b] {caption of figure B};
}
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}
En el caso de un título de varias líneas, es sensato definir un estilo separado para los nodos con título. Por ejemplo:
capt/.style = {text width=#1, align=left}
y que en su lugar \node[below=of b] {caption of figure B};
usar
\node[capt=3.75cm, below=of b] {caption of figure B};