3

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

 figure

2 Answers 2

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}
1
  • Thank you LaTeX is very interesting and automated by coding. @Werner.
    – Biki Teron
    Commented Apr 29, 2017 at 5:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .