I'm trying to place two mini pages next to each other, one with text, one with an image. But my code has them spaced really far apart. How can I bring them together horizontally. I've tried \hspace
between the minipages and that doesn't work. It's apart of a much bigger document. Here is everything I'm working with:
\documentclass[twocolumn,12pt,mysize]{article}
\usepackage[normalem]{ulem}
\usepackage{longtable}
\usepackage{multicol}
\usepackage{colortbl}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{midpage}
\usepackage{float}
\begin{document}
\begin{table}[ht]
\begin{minipage}{.65\textwidth}
\begin{tabular}{*{1}{p{0.65\textwidth}}}
\large\textbf{Peter Parker,}\\
\large\textbf{Spiderman}\\\normalsize
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\\
\end{tabular}
\end{minipage}%
\begin{minipage}{.65\textwidth}
\begin{tabular}{*{1}{p{0.65\textwidth}}}
\includegraphics[width=5cm]{../spiderman.jpg}
\\
\end{tabular}
\end{minipage}%
\end{table}
\begin{document}
Best Answer
A minipage is just a box so it will be positioned the same way as
A
and you can control the space between them the same way as twoA
egA\hspace{1cm}A
will put 1cm between them.Your example has two minipages of width
.65\textwidth
so they can not fit on a line.neither minipage is necessary as
tabular
and\includegraphics
also make boxes so you can just place those side by side without the minipage.Alternatively you can lose the
tablular
and just use aminipage
. Also since your document is usingtwocolumn
you want to usetable*
to get a page-width float.