latex - Vertical align text to a box next to it -


in output below, i'm trying align author top of box next it. i've tried couple of different boxes , whatnot, can't align properly.

output

here's code:

\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}} 

you should set entire construction inside tabular, , use [t]op-aligned tabular framed box construction:

enter image description here

\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} 

i'm assuming can use following pandoc construction (i haven't used 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} 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -