0

I'd like to custom place a figure beside some text. I tried two approaches. First, I placed the text with tabbings in one minipage and the figure in a second minipage...and both minipages into a figure environment. The problem is that that line pitches are obviously closer together inside this environment than outside. I did not find a solution for this.

Second, I just wrote the text with tabbings where I wanted it, and inserted the figure afterwards and tried to move it such that it comes to rest where I want it. This works and the line pitches are all the same, but the overall text/figure (the whole thing) is shifted upwards - when commenting out the figure you see that it's significant - the following pages are not shifted upwards and appear normal. I post the MWE for this second approach.

Some solution to both approaches is appreciated - if there's a simple command in the first case that forces all line pitches to be the same everywhere.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\setlength{\parindent}{0pt}
\usepackage[a4paper,bottom=3.1cm]{geometry}
\usepackage{setspace}
\setstretch{1.44}

\begin{document}
\begin{tabbing}
\hspace*{3.2cm}\= \kill
xxxx \> xxxx \\
\> xxxx \\
xxxx \> xxxx \\
xxxx \> xxxx \\
xxxx \> xxxx \\
xxxx \> xxxx \\
xxxx \> xxxx
\end{tabbing}

\begin{figure}
\centering
\hspace*{11.2cm}
\vspace*{-7cm}
\includegraphics[width=0.22\linewidth]{SeaGull}
%\caption{}
%\label{fig:yyyy}
\end{figure}

\end{document}

EDIT: The ultimate goal is to have a text with custom placed figure that has the overal frame-appearance of a simple text page. The lines and figure height do not have to coincide, in which case I would just adjust the includegraphics[height=...]{} setting.

  • 1
    What is the ultimate goal here? Do you want this entire text-and-figure construction to float, or should the figure just be placed as part of the flowing text? Do you have the same number of lines of text than you have height of the figure? – Werner Mar 8 '16 at 15:33
  • As you've commented out the caption and label, does that mean you do not want/need those? Because if that is the case, just remove the figure environment altogether. If you don't need floating, and you don't need a caption, there is no reason whatsoever to use the figure environment. – Torbjørn T. Apr 12 '17 at 10:05
1

The problem was solved using \usepackage{float} and \begin{figure}[H]. The only things that were necessary were to play with the commands \vspace{} and \hspace{} to align the figure as wished.

| improve this answer | |
  • 3
    With this approach you violated the basic philosophy of (La)TeX: let figure and table floats in text (on the way, that complete document wold be beautiful). The use of [H] should be avoided as much as it is possible (i.e.: newer ...) – Zarko May 8 '16 at 1:06

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.