2

In a three-column document (using the multicol environment), I am having trouble to position inline graphics. From my understanding, no floating objects can be used in the multicol environment.

I have several blocks of the type (heading + three indented lines), which are accompanied by a picture that is to be flush with the right column boundary. My attempt was to include the picture in the "heading line" and then to shift it vertically using raisebox.

The goal is to center it vertically with respect to this four-line-block.

Unfortunately, my attempt only increases the space between the heading and the three indented lines. Is there a way to declare the picture "above the text" such that it does not disturb the other lines when moving it?

Minimally working example:

\documentclass[11pt,landscape, a4paper]{article}
\usepackage{multicol}
\usepackage[landscape]{geometry}
\usepackage{graphicx}

\pagestyle{empty}
\setcounter{secnumdepth}{0}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}
\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm}

\begin{document}

\raggedright
\footnotesize
\begin{multicols*}{3}

\begin{center}
     \Large{\textbf{Multicol Document}} \\
\end{center}
\vspace{5pt}
\section{Introduction}
\vspace{1cm}
Heading as normal text \hfill\makebox[0cm][r]{\raisebox{-\height}{\includegraphics[width=1.4cm]{picture.png}}}

\hspace*{0.5cm}\begin{tiny}{some line asdasdasdasdasdasdasdasd asdasdasda}\end{tiny} \\
\hspace*{0.5cm}\begin{tiny}{some line asdasdasdasdasdasdasdasd asdasdasda}\end{tiny} \\
\hspace*{0.5cm}\begin{tiny}{some line asdasdasdasdasdasdasdasd asdasdasda}\end{tiny}

\end{multicols*}
\end{document}
1

to clarify your description what you like to have.

edit: from your comment below i conclude that you looking for the following:

enter image description here

(red lines indicate text area border).

\documentclass[11pt,landscape, a4paper]{article}
\usepackage{multicol}
\usepackage[margin=1cm]{geometry}
\usepackage[export,demo]{adjustbox}
\usepackage{tabularx}

\pagestyle{empty}
\setcounter{secnumdepth}{0}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}

\begin{document}

\raggedright
\footnotesize
\begin{multicols*}{3}

\begin{center}
     \Large\textbf{Multicol Document}
\end{center}

\section{Introduction}
\lipsum[1]

\begin{tabular}{m{\dimexpr\linewidth-4\tabcolsep-1.4cm\relax}r @{}}
Heading as normal text

\tiny
some line asdasdasdasdasdasdasdasd asdasdasda

some line asdasdasdasdasdasdasdasd asdasdasda

some line asdasdasdasdasdasdasdasd asdasdasda

some line asdasdasdasdasdasdasdasd asdasdasda

some line asdasdasdasdasdasdasdasd asdasdasda

some line asdasdasdasdasdasdasdasd asdasdasda
    &
\includegraphics[width=1.4cm, valign=c]{picture}
\end{tabular}\medskip
\lipsum
\end{multicols*}
\end{document}
  • Thanks for pointing out to use a tabular, this is very helpful! And sorry for not being clear enough. Your solution is close, however: The picture is vertically centered to the heading only, and not the whole text block (heading plus lines). This can be seen more clearly by adding more lines (link). I'd like to have it centered to the whole block instead (i.e. vertically center the whole block in the table column). Is that possible by modifying the tabular parameters? – A. Impertro Mar 5 at 18:20
  • @A.Impertro, see edited answer. – Zarko Mar 5 at 18:44

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.