1

None of my efforts to vertically center the second column are working.

First trying the tabular environment:

\documentclass[]{book}
\usepackage[paperheight=3.0in,paperwidth=4.0in,margin=0.65in,
             heightrounded,showframe]{geometry}

\usepackage{tabularx, array} \usepackage{multirow} \usepackage{graphicx}

\def\myBioLoss{Biodiversity_Loss_CutTree.png} \def\myPollution{Pollute_Smokestack.png}

\begin{document} \begin{center} \begin{tabular}{l m{2cm}} \multicolumn{2}{l}{Ecological Ceiling} \ \includegraphics[width=.10\textwidth]{\myBioLoss} & Biodiversity \ \includegraphics[width=.10\textwidth]{\myPollution} & Pollution \ \end{tabular} \end{center}

\end{document}

But I get [![Not vertically centered][1]][1]
[1]: https://i.stack.imgur.com/s6tUE.png

I've tried adjustbox from: Centering a column vertically with longtable and pictures in rows which compiled but did not center.

I've tried tabularx and \def\tabularxcolumn#1{m{#1}} from Vertically center text in tabularx table, which compiled with the environment: \begin{tabularx}{\textwidth}{l m{2cm}} but did not center.

I've tried tabular* from Right-centered columns in tabular*, but this also compiled but did not center.

Lastly, this is for beamer: Problem with centering Images in a column (beamer) which does not help me.

Yes, I need the book class.

1 Answers1

2

One way is to use of the adjusbox packages which enable moving images baselines position, adding margins etc. For inserting image it offer \adjustimage which can replace includegraphics:

\documentclass{book}
\usepackage[paperheight=3.0in,paperwidth=4.0in,margin=0.65in,
            heightrounded,showframe]{geometry}

\usepackage{array, multirow, tabularx} \usepackage[export]{adjustbox} % it also load graphicx package \def\myBioLoss{Biodiversity_Loss_CutTree.png} \def\myPollution{Pollute_Smokestack.png}

\begin{document} \begin{center} \adjustboxset{width=.1\textwidth,valign=c, margin=0pt 3pt 0pt 3pt} \begin{tabular}{l m{2cm}} \multicolumn{2}{l}{Ecological Ceiling} \ \adjustimage{}{example-image-duck}%{\myBioLoss} & Biodiversity \ \adjustimage{}{example-image-duck}%{\myPollution} & Pollution \ \end{tabular} \end{center}

\end{document}

enter image description here

Zarko
  • 296,517