3

I'd like to create something similar to what is give below: text on either side of a vertically centred image:

 figure

1

If you do not remember adjustbox, another solutions could be put the image in a table (tabularwith a singe cell only), or a \parbox, or a minipage. If you want a fine control of the vertical align (i.e, not exactly in the vertical center) may be worth use a \vbox:

enter image description here

\documentclass{article}
\usepackage{graphicx}
\parskip2em
\begin{document}
Left text% 
\begin{tabular}{c}
\includegraphics[width=2cm]{example-image}\\
\end{tabular}% 
Right text\par
Left text 
\parbox{2cm}{\includegraphics[width=\linewidth]{example-image}}
Right text\par
Left text \vbox to .83cm{\hbox{\includegraphics[width=2cm]{example-image}}}
Right text\par
Left text \vbox to 1.2cm{\hbox{\includegraphics[width=2cm]{example-image}}}
Right text
\end{document}
3

Use adjustbox and it's valign=c option:

enter image description here

\documentclass{article}

\usepackage[export]{adjustbox}

\begin{document}

Left text 
\includegraphics[height=50pt,valign=c]{example-image}
Right text

\end{document}
  • Thank you LaTeX is very interesting and automated by coding. @Werner. – Biki Teron Apr 29 '17 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.