我怎样才能将下面的逗号与图像垂直居中对齐?
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{amsmath}
\begin{document}
\[
\begin{pmatrix}
\includegraphics{image} & , & \includegraphics{image}
\end{pmatrix}
\]
\end{document}
答案1
借助包valign=c
中的选项adjustbox
,图像和逗号可以垂直居中:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{amsmath}
\usepackage[export]{adjustbox}
\begin{document}
\[
\begin{pmatrix}
\includegraphics[valign=c]{image} & , & \includegraphics[valign=c]{image}
\end{pmatrix}
\]
\end{document}