0

I have a two-column minipage environment with a figure in the left minipage (represented by a box) and some text in the right, see below.

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}

\parindent=0pt

\begin{document}

\rule{\textwidth}{0.5pt}

\begin{minipage}[t]{0.5\textwidth} \vspace{0pt} \centering \framebox(150,100){} \end{minipage}% % \begin{minipage}[t]{0.5\textwidth} \vspace{0pt} \lipsum[2] \end{minipage}

\end{document}

enter image description here

For some reason some extra vertical space is introduced above the minipage environment and below the rule. Why does this occur, and how can I get rid of the extra vertical space?

DavidH
  • 79
  • In the second case you add positioning option [t] to minipage, meanwhile at first case you use default positioning, which is vertical centered. – Zarko Dec 20 '23 at 19:36
  • 1
    please show the results using example-image which is a test image available for such tests, then people can reproduce to see exactly the issue, it's hard to know where the white space is in an image file we don't have. – David Carlisle Dec 20 '23 at 23:41
  • I wasn't familiar with the example-image, thank you for making me aware. In the process, I discovered that my own image had a white border, making it not appearing aligned with the text. I have edited the post accordingly. – DavidH Dec 21 '23 at 07:43
  • take a look at this post https://tex.stackexchange.com/questions/704868/change-the-place-of-a-figure/704870#704870 – pascal974 Dec 21 '23 at 10:47

0 Answers0