2017-09-02 12 views
0

私はTikzを初めて使用しているので、小さなtikzpicturesがページ全体に拡大する理由を理解できません。 私はこのような人物の周りに自分のテキストを浮かべたいので、それらが拡大するのを防ぐ方法を知ることは非常に便利です。テキストを囲むようにtikz画像を拡大できないようにする

ここに私の問題のコードと写真があります。長いキャプションが原因ではないことがわかりますが、私の最初のアイデアは何ですか?

result of the code below

\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の境界に合わせて任意の提案を持っていますか?

ありがとうございました。

答えて

1

これがデフォルトの動作です。あなたはは、TikZフィギュアの周りにテキストをラップするwrapfigureパッケージを使用することができます。

\begin{wrapfigure}{r}{0.4\textwidth}

enter image description here

\begin{wrapfigure}{r}{0.4\textwidth} 
    \tdplotsetmaincoords{60}{25} 
    \begin{tikzpicture}[tdplot_main_coords, scale=1] 
     ... 
    \end{tikzpicture} 
    \caption{far to long caption for this kind of sensless figure created just for demonstrationg tikzpicture expand their width} 
\end{wrapfigure} 

、最初の引数は、2番目の引数はこのwrapfigureのサイズ位置(右用r)です(ここではページ幅の40%がチックフィギュアに合っています)。

+0

はい。ありがとうございました。 wrapfig packege '\ usepackage {wrapfig}'を使用した後でうまく動作します。 –

関連する問題