Bus errorとSegmentation faultに困ったら見るブログ

物理学者(ポスドク)による日々の研究生活のメモ書きです ( python/emacs/html/Japascript/シェルスクリプト/TeX/Mac/C言語/Linux/git/tmux/R/ポケモンGO)

【TeX】minipageを使って1行に画像を2つ貼りたい

(元記事 2011/08/01)

 

\begin{figure}[h]
\begin{minipage}{0.5\hsize}
\begin{center}
\includegraphics[width=70mm]{hoge.jpg}
\end{center}
\caption{aaaa}
\end{minipage}
\begin{minipage}{0.5\hsize}
\begin{center}
\includegraphics[width=90mm]{hoge.jpg}
\end{center}
\caption{hoge}
\end{minipage}
\end{figure}


数字の書いてあるところをいじったら表示のさせかたが変わる。

かなり自分用メモなので、今回は画像はなしで

 

-------------

 

少し書き直した

\begin{figure}[h]
\begin{minipage}{0.45\hsize}
\begin{center}
\includegraphics[width=\hsize]{hoge.jpg}
\end{center}
\caption{aaaa}
\label{fig:aaaa}
\end{minipage}
\hfill
\begin{minipage}{0.45\hsize}
\begin{center}
\includegraphics[width=\hsize]{hoge.jpg}
\end{center}
\caption{bbbb}
\label{fig:bbbb}
\end{minipage}
\end{figure}


hfillはminipage同士の間の距離をできる限り広げる
そのために、minipageの大きさを0.5hsizeじゃなくて0.45hsizeにしている

 

------------

 

(追記)

この記事からエンマークじゃなくて、バックスラッシュになってる・・・・