3

I fond this example on this site:

\documentclass{article}

\usepackage{graphicx, tabularx}
\usepackage[nopar]{lipsum}

\newenvironment{centerentry}[2][]
  {\renewcommand{\tabularxcolumn}[1]{m{##1}}
   \noindent
   \tabularx{\linewidth}{ @{} m{\imagecolwidth} X @{} }
     \includegraphics[width=\linewidth,#1]{#2} &
  }{%
   \endtabularx%
  }
\newlength{\imagecolwidth}
\setlength{\imagecolwidth}{2em}

\sloppy% Just for this example

\begin{document}

\section{A section}

\begin{centerentry}{symbols/symbol_q.PNG}
  \lipsum[1]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\begin{centerentry}[height=5em]{symbols/symbol_q.PNG}
  \lipsum[2]
\end{centerentry}

\end{document}

If I use this construct:

\begin{centerentry}{symbols/Mouse.PNG} Text: \includegraphics[height=8ex,valign=c]{images/Copy.PNG}
\end{centerentry}

I get:

! Package xkeyval Error: valign' undefined in familiesGin'.

Someone ideas what went wrong?

7

\includegraphics does not by default have a valign key.

If you use the adjustbox package with option export then that package adds valign

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.