我有这个数字:
我希望它们处于相同的高度,即它们的中心位于相同的 y 坐标。这就是我所拥有的:
\begin{figure}[h]
\centering
\includegraphics[scale=0.4]{images/circle_equation}
\hspace{2cm}
\includegraphics[scale=6]{images/circle_sdf}
\caption{An SDF can be either a mathematical expression or be approximated as a voxel grid.}
\label{fg:SDFRepresentations}
\end{figure}
我尝试过以不同的方式使用 vspace,但它只会移动标题,而不会移动方程式图像。
答案1
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage[export]{adjustbox}
\begin{document}
\begin{figure}[!htbp]
\centering
\includegraphics[width=.3\linewidth,valign=c]{example-image}
\includegraphics[width=.2\linewidth,valign=c]{example-image-duck-portrait}
\caption{title}
\end{figure}
\begin{figure}[!htbp]
\centering
$\sqrt{(p-c)^2}-R$
\includegraphics[width=.2\linewidth,valign=c]{example-image-duck-portrait}
\caption{title}
\end{figure}
\begin{figure}[!htbp]
\centering
\resizebox{!}{1cm}{$\sqrt{(p-c)^2}-R$}
\includegraphics[width=.2\linewidth,valign=c]{example-image-duck-portrait}
\caption{title}
\end{figure}
\end{document}