我在这个网站上发现了这个例子:
\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}
如果我使用这个结构:
\begin{centerentry}{symbols/Mouse.PNG} Text: \includegraphics[height=8ex,valign=c]{images/Copy.PNG}
\end{centerentry}
我得到:
!软件包 xkeyval 错误:valign' undefined in families
Gin'。
有人知道哪里出了问题吗?
答案1
\includegraphics
默认情况下没有valign
密钥。
如果你使用adjustbox
带有选项的包export
,那么该包将添加valign