I'm having a few issues with vertically aligning table elements. There seems to be too much space either above or below the text or image. Is this to do with the fbox
environment? I want both the image and text to be centered vertically in each table cell.
\documentclass[a4paper,11pt]{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
\usepackage{array}
\newcommand{\mybox}[1]{
\begin{center}
\fbox{
\parbox{0.8\linewidth}{
\begin{center}
\begin{tabular}{ c m{4.5in} }
\includegraphics[height=0.3in]{./myfig} & {#1}
\end{tabular}
\end{center}
}
}
\end{center}
}
\begin{document}
\mybox{hello}
\mybox{hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello}
\end{document}
Edit: Following Gonzalo Medina's suggestion, I get:
and there is no difference between
center
and centering
.