# Horizontal align minipage doesn't work [duplicate]

I'm trying to align this 2 minipage on the top, but it doesn't work.....Any body help?

\documentclass{article}
\usepackage{tikz}
\usepackage{graphicx}

\begin{document}
\begin{minipage}[t]{0.3\textwidth}
$2+2=4$
\end{minipage}
\begin{minipage}[t]{0.3\textwidth}
\begin{tikzpicture}
\draw (0,0) circle (3cm);
\end{tikzpicture}
\end{minipage}
\end{document}

It gives me this:

I want this:

How can I get this???

## marked as duplicate by marmot, Kurt, Stefan Pinnow, TeXnician, BobyandbobMar 25 '18 at 8:55

• Please have a look here. – marmot Mar 25 '18 at 1:57

problem is position of tikzpicture baseline (which is in the middle of the circle). you should move it accordingly. the simplest way seems to be enclose image in adjustbox. a bit shorter code you obtain if instead two minipages use tabular environment. however use of adjustbox work in combination with minipage:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\centering
\begin{tabular}{|p{0.25\linewidth}|p{0.5\linewidth}|}
$2+2=4$
&
\draw (0,0) circle (3cm);
\end{tikzpicture}}
\end{tabular}
\end{document}

or

\documentclass{article}
\usepackage{tikz}
$2+2=4$