Graphics, Figures & TablesTwocolumns and really centered images with text-wrap

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Natan
Posts: 9
Joined: Fri Oct 23, 2020 2:53 pm

Twocolumns and really centered images with text-wrap

Post by Natan »

Hey,
for a newspaper (also using newspaper package) I would like to center an image in the top or bottom of the page. It should be centered in a way that it overlaps with both columns and the text should wrap around it.

You can see something similar here:
https://creativepro.com/the-dual-text-wrap-dilemma/
but for my purpose it doesn't have to wrap perfectly around the image but wrapping around a rectangle and the image is placed within that rectangle would be enough.

I can't really give you a great minimal working example, since I don't really know where to start, but I can give you a starting point (showing some possibilities when working with images and multicols):

Code: Select all

\documentclass[a4paper]{article}
\usepackage{multicol}
\usepackage[demo]{graphicx}
\usepackage{kantlipsum}
\newenvironment{Figure}
  {\par\medskip\noindent\minipage{\linewidth}}
  {\endminipage\par\medskip}
\begin{document}

\begin{multicols}{2}
\kant[1]
\begin{Figure}
 \centering
 \includegraphics[width=\linewidth]{foo}
\end{Figure}

\kant[2-3]
\begin{figure*}
 \centering
 \includegraphics[width=\linewidth]{foo}
\end{figure*}
\kant[4-5]
\end{multicols}

\end{document}
(I apologize for the ugly drawing)
Attachments
Shows a very basic graphical example
Shows a very basic graphical example
idea.png (104.92 KiB) Viewed 3120 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
JBClaypool
Posts: 10
Joined: Fri Jul 31, 2020 6:11 pm

Twocolumns and really centered images with text-wrap

Post by JBClaypool »

Are you looking for something like this?

Code: Select all

\documentclass{article}
\usepackage{multicol}% for multiple columns
\usepackage{wrapfig}
\usepackage{calc}% for computations
\usepackage{graphicx}
\begin{document}
	\pagestyle{empty}
	\begin{multicols}{2}
		Wikipedia is a multilingual, Web-based, encyclopedia project. The name is a portmanteau of the words wiki and encyclopedia. Wikipedia is written collaboratively by volunteers, allowing most of \begin{wrapfigure}[11]{r}[.5\width+.5\columnsep]{5cm}%\itshape
			\vspace*{-10pt}	\centering \includegraphics[width=5cm]{test.png} 
		\end{wrapfigure}
		its articles to be edited by almost anyone with access to the Web site.
		Its main servers are in Tampa, Florida, with additional servers in Amsterdam and Seoul. Wikipedia was launched as an English language project on January 15, 2001, as a complement to the expert-written and now defunct Nupedia, and is now operated by the non-profit Wikimedia Foundation. It was created by Larry Sanger and Jimmy Wales; Sanger resigned from both Nupedia and Wikipedia on March 1, 2002. Wales has described Wikipedia as "Imagine a world in which every single person on the planet is given free access to the sum of all human knowledge. That's what we're doing."
		Wikipedia has more than six million articles in many languages, including more than 1.5 million articles in the \begin{wrapfigure}[11]{l}[.5\width+.8\columnsep]{5cm}\end{wrapfigure}

		\noindent English-language version and more than half a million in the German-language version. There are 250 language editions of Wikipedia, and 19 of them have more than 50,000 articles. The German-language edition has been distributed on DVD-ROM, and there have been proposals for an English DVD or print edition. Since its inception, Wikipedia has steadily risen in popularity, and has spawned several sister projects. 
		According to Alexa, Wikipedia ranks among the top fifteen most visited sites, and many of its pages have been mirrored or forked by other sites, such as Answers.com.
	\end{multicols}
\end{document}
Attachments
test.png
test.png (46.63 KiB) Viewed 2867 times
Post Reply