【发布时间】:2017-09-02 23:37:10
【问题描述】:
我是 Tikz 的新手,无法弄清楚为什么相对较小的 tikzpictures 会将其宽度扩展到整个页面。 由于我希望我的文本围绕这些数字浮动,因此知道如何防止它们扩展将非常有用。
这是我的问题的代码和图片,你可以看到它不是由长标题引起的,这是我的第一个想法。
\section{demo}
\begin{figure}[h]
\tdplotsetmaincoords{60}{25}
\begin{tikzpicture}[tdplot_main_coords, scale=1]
\coordinate (o) at (0,0,0);
\coordinate (x) at (4,0,0);
\coordinate (y) at (0,0,4);
\coordinate (z) at (0,-4,0);
\node[above] at (x) {x};
\node[above] at (y) {y};
\node[above] at (z) {z};
\draw[red, -latex] (o) -- (x);
\draw[green, -latex] (o) -- (y);
\draw[blue, -latex] (o) -- (z);
\end{tikzpicture}
\caption{far to long caption for this kind of sensless figure created just for demonstrationg tikzpicture expand their width}
\end{figure}
\begin{figure}[h]
%[... same code as above ...]
\end{figure}
你们有什么建议可以让 tikzpicture 边界适应内容吗?
谢谢。
【问题讨论】:
标签: latex figure floating tikz