11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

latexでminipageを使って図を横に並べる際に間隔を調整

Posted at

latexでminipageを使って図を横に並べようとすると,図が左詰めで出力されます.

キャプションが短い場合はそこまで問題ないのですが,長い場合には隣の図のキャプションとの間隔がほとんど無くなってしまい,とても読みづらいです.

そんな時はminipageのサイズを少し小さめに設定しつつ,minipageの間に\hspaceを入れてあげることで図の間に隙間を作ることができます.

以下サンプルコードです.

\begin{figure}[tbp]
  \begin{minipage}[b]{0.48\columnwidth}
    \centering
    \includegraphics[draft,width=\columnwidth]{hoge.pdf}
    \caption{hoge画像です}
  \end{minipage}
  \hspace{0.04\columnwidth} % ここで隙間作成
  \begin{minipage}[b]{0.48\columnwidth}
    \centering
    \includegraphics[draft, width=\columnwidth]{huga.pdf}
    \caption{huga画像です}
  \end{minipage}
\end{figure}

minipageで2つの図を横に並べています.

それぞれのminipageの幅をカラム幅の48%に設定しつつ,余った4%の幅をhspaceにしています.

この辺りの数字を適当にいじれば好みのスペースを作成できます.

11
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?