表格内的文字和图形

表格内的文字和图形

我有一张有两列的表格,在左列我想要有 5 行,在第二列中有一张覆盖整个左列的图像。

到目前为止,这是我尝试过的,但没有效果

\documentclass[letterpaper,11pt]{article}
\usepackage{graphicx}
\begin{document}
    \begin{tabular*}{7in}{l@{\extracolsep{\fill}}l}
        & {\centering \includegraphics[trim=8cm 20cm 8cm 8cm,clip=true,scale=0.1]{name.jpg}}\\
        \textsc{\textbf{\LARGE NAME HERE}} & \\
        \textsc{\small{ADDRESS}} &\\
        \textsc{\small{Languages}} & \\
        \small{Phone} & \\
        \small{Email} & \\
        \small{DOB: 15/05/1991}\\
        \end{tabular*}
\end{document}

答案1

tabular通过添加新命令来使用两个嵌套的s:\newcommand{\cell}[1]{\begin{tabular}{@{}l@{}}#1\end{tabular}}

\documentclass[letterpaper,11pt]{article}
\usepackage{graphicx}

\newcommand{\cell}[1]{\begin{tabular}{@{}l@{}}#1\end{tabular}}

\begin{document}
\begin{tabular*}{4in}{l@{\extracolsep{\fill}}l}
  \cell{{\LARGE\bfseries NAME HERE} \\
        {\small\scshape Address}    \\
        {\small\scshape Languages}  \\
        {\small Phone}              \\
        {\small Email}              \\
        {\small DOB: 15/05/1991}}            
  & \cell{\includegraphics[scale=0.3]{example-image-A}}
\end{tabular*}

\end{document} 

在此处输入图片描述

答案2

您正在寻找的multirow手机:

\documentclass[letterpaper,11pt]{article}
\usepackage[demo]{graphicx}
\usepackage{array, multirow} % <-- added

\begin{document}
    \begin{tabular*}{5in}{>{\small}l @{\extracolsep{\fill}} c}
        &   \multirow{6}{*}{\includegraphics[trim=8cm 20cm 8cm 8cm, % <-- image is in multi row cell
                                             clip=true,scale=0.1]{name}}\\
\textsc{\textbf{\LARGE NAME HERE}} & \\
\textsc{ADDRESS}    &   \\
\textsc{Languages}  &   \\
Phone               &   \\
Email               &   \\
DOB: 15/05/1991     &   \\
    \end{tabular*}
\end{document}     

在此处输入图片描述

相关内容