“这个啊,不说了,我试了半天都不能把图的顶部和文字对齐!” “学姐你看看,我甚至还试过用 “这么说吧,凡是需繁复手动的操作,世界上某处肯定有哪一位懒惰而又聪明的好人,努力把它自动化,这个道理放到 LaTeX 上也是(不然 CTAN 也不会有那么多千奇百怪的宏包)。比如说, “另外如果不是要顶部对齐而是居中对齐的话,用\begin{tabular}{lll}
\includegraphics[width=.3\linewidth]{IMG_1934}
&
Pictures
&
\includegraphics[width=.3\linewidth]{Photo_4}
\end{tabular}\raisebox
来手动调整了,可是要逐个尝试适合的数值,太麻烦了:”\begin{tabular}{lll}
\raisebox{-3.5cm}{\includegraphics[width=.3\linewidth]{IMG_1934}}
&
Pictures
&
\raisebox{-2cm}{\includegraphics[width=.3\linewidth]{Photo_4}}
\end{tabular}adjustbox
宏包在这里就很好用:”\usepackage{adjustbox}
...
\begin{tabular}{lll}
\adjustbox{valign=t}{\includegraphics[width=.3\linewidth]{IMG_1934}}
&
Pictures
&
\adjustbox{valign=t}{\includegraphics[width=.3\linewidth]{Photo_4}}
\end{tabular}array
或 tabularx
里的 m
来定义表格就可以了:”\begin{tabular}{m{3cm} m{1.5cm} m{3cm}}
\includegraphics[width=\linewidth]{IMG_1934}
&
Pictures
&
\includegraphics[width=\linewidth]{Photo_4}
\end{tabular}
\end{preview}
发表评论 取消回复