4

I need to add a picture to to a latex document and apply multicol environments to it so it may not float. If I just use \includegraphics it can be used with multicol but I cannot use a caption for it. If I put \begin{figure} and \end{fingure} around \includegraphics it cannot be used in minipage and multicol space.

How can I add a not floating figure with a caption?

Minimus Heximus
  • 715
  • 6
  • 19
  • \captionof{figure}{Your caption} works even without floating/figure environment You need the caption package –  Oct 27 '15 at 15:24
  • What's your question? This answer might help if it's to do with putting a float where you want it: http://tex.stackexchange.com/a/8633/28808 – Chris H Oct 27 '15 at 15:25
  • @ChristianHupfer where should I add it. How I connect it to a figure? – Minimus Heximus Oct 27 '15 at 15:29

1 Answers1

6

Use\captionof{figure}{your normal caption} text for a non-floating graphics (or for a table: \captionof{table}{caption text})

\documentclass{article}

\usepackage{caption}
\usepackage[demo]{graphicx}
\usepackage{multicol}
\usepackage{blindtext}
\begin{document}

\begin{multicols}{2}
  \blindtext
  \begin{center}
  \includegraphics[scale=0.1]{bild_erwin_schroedinger}
  \captionof{figure}{Erwin}
  \end{center}
\blindtext
  \begin{center}
  \includegraphics[scale=0.4]{a_1.jpg}
  \captionof{figure}{A famous duck}
  \end{center}
  \blindtext
\end{multicols}

\end{document}

enter image description here