0

Hello, it's me again :D

I have problem with figures captions.

enter image description here

I'd like to make my two figures nearby and the captions so that they do not overlap. But it all fell apart.


\documentclass[a4paper, 12pt, twoside]{mwrep}
\linespread{1,3}

\usepackage[cp1250]{inputenc}
\usepackage{polski}
\usepackage{indentfirst}
\usepackage{graphicx}
\usepackage[font=small,labelfont=bf,labelsep=period,justification=centerlast]{caption}\usepackage{floatrow}



\begin{document}[h]
\begin{figure}

\ffigbox[\FBwidth]
\caption{Text}\label{...}

\includegraphics[width=0.4\textwidth]{2}
\end{figure}
\end{document}
2
  • It should be

    \begin{document}
    \begin{figure}[h]
    

    instead of

    \begin{document}[h]
    \begin{figure}
    
  • It should be

    \ffigbox[\FBwidth]
      {\caption{Text}\label{...}}
      {\includegraphics[width=0.4\textwidth]{2}}
    

    instead of

    \ffigbox[\FBwidth]
    \caption{Text}\label{...}
    
    \includegraphics[width=0.4\textwidth]{2}
    

    Notice the extra set of brackets {} around caption and includegraphics

  • +1, however for float placement is better to use [ht] than [h] :-) – Zarko Jan 13 at 16:09
  • @Zarko I agree =) However, the author used h so I kept his original version (even if I personally disagree) – N3buchadnezzar Jan 13 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.