
の視点の角度を変えると、tikz-3dplot
を使用しているときにさまざまなページが変わりますstandalone
。そのサイズを均一に保つにはどうすればよいですか?
背景として長方形を追加してもうまくいかなかったので、より合理的な解決策は、回転不変のオブジェクトを追加することです。不透明度がゼロの球体で、どちらの角度からでも (どの角度からでも) サイズが変わらないようにします。しかし、そのような球体を描画することはできませんでした (ボール コマンドは 3D 用ではないですよね)。
\documentclass[tikz,border=2pt]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{60}{50}
\begin{tikzpicture} [tdplot_main_coords]
\draw[-latex] (-1,-1,-1) -- (1,1,1);
\end{tikzpicture}
% now arrow seen from other angle, but the page shrinks
\tdplotsetmaincoords{30}{90}
\begin{tikzpicture} [tdplot_main_coords]
\draw[-latex] (-1,-1,-1) -- (1,1,1);
\end{tikzpicture}
\end{document}
答え1
ミニページで tikzpicture を中央に配置できます。
\documentclass[multi={minipage},border=2pt]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\begin{document}
\begin{minipage}[c][3.47cm][c]{3.47cm}% sqrt(12)
\centering
\tdplotsetmaincoords{60}{50}
\begin{tikzpicture} [tdplot_main_coords]
\draw[-latex] (-1,-1,-1) -- (1,1,1);
\end{tikzpicture}
\end{minipage}
\begin{minipage}[c][3.47cm][c]{3.47cm}
\centering
% now arrow seen from other angle, but the page shrinks
\tdplotsetmaincoords{30}{90}
\begin{tikzpicture} [tdplot_main_coords]
\draw[-latex] (-1,-1,-1) -- (1,1,1);
\end{tikzpicture}
\end{minipage}
\end{document}