Graphics 在两行中垂直居中放置文本和图像

Graphics 在两行中垂直居中放置文本和图像,graphics,latex,vertical-alignment,xelatex,Graphics,Latex,Vertical Alignment,Xelatex,我需要在居中图像旁边放置两行文字 我已经尝试了中提供的代码,它对一行代码非常有效,但无法让它在多行代码中工作 \newcommand{\vcenteredinclude}[1]{\begingroup \setbox0=\hbox{\includegraphics[scale=0.3]{#1}}% \parbox{\wd0}{\box0}\endgroup} \par{\hspace{3cm}\LARGE \centering {text}{\\more text under text

我需要在居中图像旁边放置两行文字

我已经尝试了中提供的代码,它对一行代码非常有效,但无法让它在多行代码中工作

\newcommand{\vcenteredinclude}[1]{\begingroup
\setbox0=\hbox{\includegraphics[scale=0.3]{#1}}%
\parbox{\wd0}{\box0}\endgroup}

\par{\hspace{3cm}\LARGE \centering
    {text}{\\more text under text} \hspace{2cm}\smallskip       \vcenteredinclude{myimage}\par}

你能帮忙吗?

更简单的方法是使用数组IMHO。数组包通过添加几个额外的列说明符和一个,
m
类似于
p
(段落),扩展了tabular,但段落在单元格中居中。因此,只需将文本放在一个“m”段中,将图像放在另一个“m”段中即可。 生成的代码很简单

\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\begin{document}
\begin{tabular}{m{5cm}m{5cm}}
 mona lisa mona lisa mona lisa mona lisa mona lisa mona lisa 
   &\includegraphics[width=\linewidth]{monalisa}
\end{tabular}
\end{document}

可以使用以下方法调整图像和文本之间的宽度:


\setlength{\tabcolsep}{2cm}

尊敬的审阅者,这是一个纯tex问题,与编程无关。我认为最好将其迁移到tex.stackexchange.com