How do I insert an image from text in two columns so that the text go around the picture?
[Tex/LaTex] Inserting text in the image between two columns
floatsgraphics
Related Solutions
Here subfig
package is used because I assume you want two figures in one page as said in the title. For two-column style, you need figure*
environment which explains why your second figure doesn't work properly.
Code
\documentclass[twocolumn]{article}
\usepackage{lipsum}
%\usepackage{stfloats}
\usepackage{subfig}
\begin{document}
\lipsum[1-5]
\begin{figure*}[t] % --- method 1, one figure environment. These can be arranged
\centering % horizonally (side by side) if ,say, 0.4\textwidth is used and \hfill is replaced by \quad instead.
\subfloat[figure 1]{\rule{0.8\textwidth}{0.3\textwidth}}\hfill
\subfloat[figure 2]{\rule{0.8\textwidth}{0.3\textwidth}}
\caption{A nice figure}
\end{figure*}
\begin{figure*}[t] % -- method 2, two figure environments
\centering
\subfloat{\rule{0.8\textwidth}{0.3\textwidth}}
\caption{A nice figure}
\end{figure*}
\begin{figure*}[t]
\centering
\subfloat{\rule{0.8\textwidth}{0.3\textwidth}}
\caption{A nice figure}
\end{figure*}
\lipsum[1-10]
\end{document}
EDIT: The OP wants so add some text between the figures, thus multicol
is recommnded to use in such case. Not article
class with [twocolumn].
\documentclass[]{article}
\usepackage{geometry}
\usepackage{multicol}
\usepackage{subfig}
\begin{document}
\begin{figure*}[t]
\centering
\subfloat{\rule{0.8\textwidth}{0.3\textwidth}}
\caption{A nice figure}
\end{figure*}
\begin{multicols}{2}
This is a sententence written between two figures.
This is a sententence written between two figures.
This is a sententence written between two figures.
This is a sententence written between two figures.
\end{multicols}
\begin{figure*}[h]
\centering
\subfloat{\rule{0.8\textwidth}{0.3\textwidth}}
\caption{A nice figure}
\end{figure*}
\end{document}
With the help of the strip
environment from the cuted
package you can achieve the following:
\documentclass[a4paper,11pt,twocolumn, openany]{scrbook}
\usepackage[a4paper, top=1.4in, left=1.8in, right=0.8in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{kpfonts,baskervald}
\usepackage[english]{babel}
\usepackage{scrhack}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{cuted}
\begin{document}
\chapter{Chapter Title}
\begin{strip}
\begin{wrapfigure}{l}{0.5\textwidth}
\begin{center}
\includegraphics[width=0.48\textwidth]{example-image}
\end{center}
\caption{A gull}
\end{wrapfigure}
\lipsum[1-2]
\noindent\rule{\linewidth}{1.5pt}
\end{strip}
\section*{Overview}
\lipsum[20-22]
\end{document}
Best Answer
As Werner mentioned, the
wrapfig
package can do this sort of thing; a little example (you can replace the black rectangle with an image or a\parbox
containing text, for example):The exact instructions on how to produce this type of layout can be found in the file multiple-span.txt.
I don't know a package allowing to easily create circular cutouts (
shapepar
could be an option but I've never used it), but using the\parshape
primitive is possible (with some effort) to manually produce a circular cutout and then use, for example,TikZ
to place some material; a little example: