
メインの図に小さなサブ図を含めるために、スケール スコープを使用しようとしました。ただし、スケール スコープ外のノードを参照しようとすると、ポイントされたノードは、スケールされていない古いノードの位置になります... これが図です。
それを避ける方法を知っていますか?
ありがとう !
PS: これが私のWMEです。
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows}
\usetikzlibrary{mindmap,backgrounds,positioning}
\usetikzlibrary{automata,positioning,fit,backgrounds}
\usetikzlibrary{positioning,arrows,matrix,calc}
\begin{document}
\begin{figure}[H]
\centering
\begin{tikzpicture}
\begin{scope}[transform canvas={scale=1},overlay]
\node[fill=green] (a) {A};
\node[fill=green,right=of a] (b) {B};
\end{scope}
\node[draw,below=5mm of b] (c) {C};
\draw[<->] (c) -- (b);
\end{tikzpicture}%
\hspace{3cm}%
\begin{tikzpicture}
\begin{scope}[transform canvas={scale=0.2},overlay]
\node[fill=green] (a) {A};
\node[fill=green,right=of a] (b) {B};
\end{scope}
\node[draw,below=5mm of b] (c) {C};
\draw[<->] (c) -- (b);
\end{tikzpicture}%
\end{figure}
\end{document}
答え1
おそらくこれが欲しいですか?
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{tikz}
\usetikzlibrary{positioning,babel}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\node[fill=green] (a) {A};
\node[fill=green,right=of a] (b) {B};
\node[draw,below=5mm of b] (c) {C};
\draw[<->] (c) -- (b);
\end{tikzpicture}
\hspace{3cm}
\begin{tikzpicture}
\begin{scope}[scale=0.2, every node/.append style={transform shape}]
\node [fill=green] (a) {A};
\node [fill=green,right=of a] (b) {B};
\end{scope}
\node [draw,below=5mm of b] (c) {C};
\draw [<->] (c) -- (b);
\end{tikzpicture}
\end{figure}
\end{document}