I want to display two figures side by side but captions seem to overlap no matter the minipage width. Is there anyway to reduce caption size locally? Or make it respect margins?
Here is my code:
\documentclass[12pt,a4paper,openright,oneside]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tikz}
\newcommand{\exedout}{
\begin{tikzpicture}
\path node (LL) {}
++ (0.8\textwidth, 0.4\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}
}
\begin{document}
\begin{figure}
\begin{minipage}{0.45\textwidth}
\exedout
\caption{Caption number one with enough text to overlap with caption number two bla... bla...bla... bla...bla... bla...}
\end{minipage}%
\begin{minipage}{0.45\textwidth}
\exedout
\caption{Caption number two with enough text to overlap with caption number two bla... bla...bla... bla...bla... bla...}
\end{minipage}
\end{figure}
\end{document}
Which outputs:
How can I fix this?
PD: How do I use the example images such as 'example-image-a' and so on that i have seen numerous times on this site?
example-image-a
: If you have themwe
package installed on your system, you should simply be able to use it like any other image name, just do\includegraphic{example-image}