Tengo el MWE como se muestra a continuación:
\documentclass[a4paper,11pt,twoside]{report}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{bchart}
\usepackage{float}
\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\lstset{
%frame=tb,
language=C++,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
%basicstyle={\small\ttfamily},
basicstyle=\ttfamily\footnotesize\bfseries,
numbers=none,
numberstyle=\tiny\color{gray},
%keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
%stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
\begin{document}
\begin{figure}[H]
\centering
\begin{minipage}{.45\linewidth}
\begin{lstlisting}
array stat_1[144] : w32 -> w8 = symbolic
(query [(Eq falseq
(Eq 0
N0:(ReadLSB w64 56 stat_1)))
(Eq false
(Eq 0 N1:(URem w64 8 N0)))]
(Eq false
(Eq 0 N2:(Read w8 56 stat_1))))
\end{lstlisting}
\end{minipage}
\end{figure}
\begin{figure}[H]
\centering
\begin{minipage}{.45\linewidth}
\begin{lstlisting}
array stat_1[144] : w32 -> w8 = symbolic
(query [(Eq falseq
(Eq 0
N0:(ReadLSB w64 56 stat_1)))
(Eq false
(Eq 0 N1:(URem w64 8 N0)))
(Eq false
(Eq 0 (URem w64 N0 N1)))]
(Eq false
(Eq 0 N2:(Read w8 56 stat_1))))
\end{lstlisting}
\end{minipage}
\end{figure}
\end{document}
Quiero producir algo que muestre que la primera figura se convierte en la segunda, por ejemplo, algo como Figura1 ---> Figura2 (algo así como el estilo de máquina de estado de nodos/flechas de tikz, pero quiero poder insertar figuras/listados dentro) ¿cómo? ¿Puedo lograr algo así? Espero haber sido claro gracias!
Respuesta1
Simplemente puede usar tikz
y tener lstlisting
como contenido del nodo. (Elimine el figure
entorno, pero conserve el minipage
.)
\documentclass[a4paper,11pt,twoside]{report}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{bchart}
\usepackage{float}
\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\lstset{
%frame=tb,
language=C++,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
%basicstyle={\small\ttfamily},
basicstyle=\ttfamily\footnotesize\bfseries,
numbers=none,
numberstyle=\tiny\color{gray},
%keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
%stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\centering
\begin{tikzpicture}
\node(listing1)[draw]{%
\begin{minipage}{.45\linewidth}
\begin{lstlisting}
array stat_1[144] : w32 -> w8 = symbolic
(query [(Eq falseq
(Eq 0
N0:(ReadLSB w64 56 stat_1)))
(Eq false
(Eq 0 N1:(URem w64 8 N0)))]
(Eq false
(Eq 0 N2:(Read w8 56 stat_1))))
\end{lstlisting}
\end{minipage}
}
node(listing2)[draw,right=of listing1]{%
\begin{minipage}{.45\linewidth}
\begin{lstlisting}
array stat_1[144] : w32 -> w8 = symbolic
(query [(Eq falseq
(Eq 0
N0:(ReadLSB w64 56 stat_1)))
(Eq false
(Eq 0 N1:(URem w64 8 N0)))
(Eq false
(Eq 0 (URem w64 N0 N1)))]
(Eq false
(Eq 0 N2:(Read w8 56 stat_1))))
\end{lstlisting}
\end{minipage}
};
\draw[->] (listing1)--(listing2);
\end{tikzpicture}
\end{document}