
使用時視點角度的變化會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
您可以將 tikz 圖片置於小型頁面的中心。
\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}