[Tex/LaTex] How to control the horizontal space between minipages

minipagespacing

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}

Too much space between the text and image

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 two A eg A\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 a minipage. Also since your document is using twocolumn you want to use table* to get a page-width float.

enter image description here

\documentclass[twocolumn,12pt]{article}
\usepackage[normalem]{ulem}
\usepackage{longtable}
\usepackage{multicol}
\usepackage{colortbl}
\usepackage{hyperref}
\usepackage[demo]{graphicx}
\usepackage{midpage}
\usepackage{float}

\begin{document}

\begin{table*}[htp]
\begin{minipage}[b]{\dimexpr\linewidth-5.5cm\relax}
\large\textbf{Peter Parker,}\\
\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{minipage}\hfill
\includegraphics[width=5cm]{../spiderman.jpg}

\end{table*}

\noindent X\dotfill X

\end{document}
Related Question