0

I'm using minipage to define three images side by side.

However, the captions of those images are overlapping instead of breaking lines according to each minipage.

enter image description here

Following is the code:

\begin{figure}[!ht]
\begin{minipage}{0.32\textwidth}
    \includegraphics[width=\textwidth]{images/briefing-structure.png}
    \caption{Overview of each part that compose the briefings structure.}
    \label{fig:briefings_structure}
\end{minipage}%
\hfill
\begin{minipage}{0.32\textwidth}
    \includegraphics[width=\textwidth]{images/briefing-informationdesign.png}
    \caption{Overview of the briefings and the elements of Design Information and Grids \cite{Tondreau2011}}
    \label{fig:information_design}
\end{minipage}%
\hfill
\begin{minipage}{0.32\textwidth}
    \includegraphics[width=\textwidth]{images/briefing-gestalt.png}
    \caption{Overview of the briefings and the elements of gestalt theory \cite{Lupton2015}}
    \label{fig:briefings_gestalt}
\end{minipage}%
\end{figure}    

Does anybody know what can be done?

UPDATE:

The document is composed by many files, but here is part of the header of the main tex file:

\documentclass[en,twoside,onehalfspacing,qual]{risethesis}
\usepackage{bibentry}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{caption}
\usepackage{lipsum}

\usepackage{float}

\usepackage{textcomp}
\usepackage{pgfplots}
\pgfplotsset{width=10cm,compat=1.9}

\restylefloat*{figure}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\captionsetup[table]{position=top,justification=centering,width=.85\textwidth,labelfont=bf,font=small}
%for code un-comment it
%\captionsetup[lstlisting]{position=top,justification=centering,width=.85\textwidth,labelfont=bf,font=small}
\captionsetup[figure]{position=bottom,justification=centering,width=.85\textwidth,labelfont=bf,font=small}

%% Change the following pdf author attribute name to your name.
\usepackage[linkcolor=black,
            citecolor=blue,
            urlcolor=black,
            colorlinks,
            pdfpagelabels,
            pdftitle={Rise Thesis Template (ABNT)},
            pdfauthor={Rise Thesis Template (ABNT)}]{hyperref}

2 Answers 2

2

Please always post a full document that reproduces the problem, which here is caused by some code that you have not posted. by default you get:

enter image description here

\documentclass{article}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[!ht]
\begin{minipage}{0.32\textwidth}
    \includegraphics[width=\textwidth]{images/briefing-structure.png}
    \caption{Overview of each part that compose the briefings structure.}
    \label{fig:briefings_structure}
\end{minipage}%
\hfill
\begin{minipage}{0.32\textwidth}
    \includegraphics[width=\textwidth]{images/briefing-informationdesign.png}
    \caption{Overview of the briefings and the elements of Design Information and Grids \cite{Tondreau2011}}
    \label{fig:information_design}
\end{minipage}%
\hfill
\begin{minipage}{0.32\textwidth}
    \includegraphics[width=\textwidth]{images/briefing-gestalt.png}
    \caption{Overview of the briefings and the elements of gestalt theory \cite{Lupton2015}}
    \label{fig:briefings_gestalt}
\end{minipage}%
\end{figure}
\end{document}
2
  • the document os composed by many files, I update the post with part of the header of the main tex file. Hope it is enough.
    – Bruno
    Commented Dec 2, 2016 at 19:34
  • 1
    @Bruno no sorry it is not enough, you have the file causing the problem so you should be able to easily make a complete test document. Just start with the one I posted and add stuff until it breaks, or start from a copy of yours and delete stuff until it is small enough to post. Commented Dec 2, 2016 at 19:43
1

Figured out that the problem was in the following line:

\captionsetup[figure]{position=bottom,justification=centering,width=.85\textwidth,labelfont=bf,font=small}

It has changed the setup of captions. After commenting that line, everything worked just fine.

1
  • To be more specific, the problematic part is just width=.85\textwidth since this sets the width of caption to 85% of the \textwidth when entering a figure environment. If you want a margin for your captions, better use margin=... or something like calcwidth=.85\linewidth.
    – user2574
    Commented Dec 2, 2016 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .