垂直对齐文本到旁边的框

Vertical align text to a box next to it

在下面的输出中,我尝试将 Author 与其旁边的框顶部对齐。我尝试了几个不同的盒子等等,但我无法正确对齐。

代码如下:

\mbox{
Author
}
\fbox{\begin{minipage}[c]{12cm}
\medskip
$for(author)$
    $author.name$\$if(author.title)$\emph{$author.title$}\$endif$$if(author.company)$$author.company$$endif$
    \par\medskip
$endfor$
\medskip
\end{minipage}}

您应该将整个构造设置在 tabular 内,然后还使用 [t]op-aligned tabular 用于框架框构造:

\documentclass{article}
\begin{document}

\begin{tabular}{l | l |}
  \cline{2-2}
  Author & \begin{tabular}[t]{@{}p{12cm}@{}}
    Jack Appleseed \
    \emph{Marketing Manager} \
    Unimaginitive Solutions \ \
    John Appleseed \
    \emph{Business Development Manager} \
    Unimaginitive Solutions \
  \end{tabular} \
  \cline{2-2}
\end{tabular}

\end{document}

我假设您可以使用以下 Pandoc 构造(我没有使用过 Pandoc):

\begin{tabular}{l | l |}
  \cline{2-2}
  Author & \begin{tabular}[t]{@{}p{12cm}@{}}
    $for(author)$
      $author.name$ \ $if(author.title)$\emph{$author.title$} \ $endif$ $if(author.company)$ $author.company$ \ $endif$
    $endfor$
  \end{tabular} \
  \cline{2-2}
\end{tabular}