[Tex/LaTex] vertical alignment of minipages in two columns in a longtable

longtableminipagetablesvertical alignment

I began to learn latex and I use it to prepare a CV. I made good experiences by organizing my CV with a longtable, in order to define the widths and the alignments of the different text
blocks.

In my example the longtable consists of only one row and two columns. Further more, each cell holds a minipage, themselves holding another tabular.

The minipages in both columns somehow influence each other.
The more lines I am inserting in the right table, the farther down the left minipage is moving.
Of course I want the minipages in both columns longtable to be
fixed at the very top. This only happens when using tabular in the minipage. Using normal text, the minipages remain at the top.

\documentclass[11pt]{article}

\RequirePackage[quiet]{fontspec}
    \newfontfamily\body[]{HelveticaNeue-Light}
    \newfontfamily\thinfont[]{HelveticaNeue-Light}
    \newfontfamily\bold[]{HelveticaNeue-Medium}
    \newfontfamily\headingfont[]{Helvetica Neue}
    \newfontfamily\ultralight[]{HelveticaNeue-UltraLight}
    \setmainfont[Mapping=tex-text, Color=textcolor]{HelveticaNeue-Light}

\usepackage{geometry}
 \geometry{
     a4paper,
     total={210mm,297mm},
     left=0mm,
     right=0mm,
     top=0mm,
     bottom=20mm,
     }

\usepackage{longtable}
\usepackage{lipsum}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{soul}


\usepackage{colortbl}
    \definecolor{Gray}{gray}{0.4}
    \definecolor{mygreen}{RGB}{102,204,0}
    \definecolor{myblue}{RGB}{64,64,64}
    \definecolor{mybluetwo}{RGB}{222,231,241}
    \definecolor{myred}{RGB}{144,53,41}

%outer longtable
    \newcolumntype{A}{>{}p{0.15\paperwidth}}
    \newcolumntype{B}{>{}p{0.70\paperwidth}}    

\begin{document}
\pagenumbering{gobble}
%Headline
    \noindent\fcolorbox{myblue}{myblue}{%
    \begin{minipage}[c][4cm]{\paperwidth}
    \sodef\spaceout{}{0.25em}{0.9em}{1pt}
        \begin{center}
            \begin{tabular}{c}
            %\Huge\textcolor{mygreen}{{\makebox[\linewidth][c]{\ultralight\spaceout{Firstname}\bold\spaceout{ name}}}}\\
            \Huge\textcolor{mygreen}{\ultralight firstname \bold name}\\
            \textcolor{mygreen}{* * *} \\
            \Large\textcolor{mygreen}{\ultralight curriculum vitae}\\
            \end{tabular}
        \end{center}
    \end{minipage}}%

\begin{longtable}{|A|B|}
    \fbox{
    \begin{minipage}[t][6cm]{0.14\paperwidth}
        \begin{tabular}{|p{0.12\paperwidth}|}
            Left Table\\
            left Table\\
        \end{tabular}
    \end{minipage}}
    &
    \fbox{
    \begin{minipage}[t][16cm]{0.69\paperwidth}
        \begin{tabular}{|p{0.66\paperwidth}|}
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
        \end{tabular}
    \end{minipage}}
    \\
    \end{longtable}
\end{document}

Best Answer

You need to add the [t] positioning specifier not only to the minipage environments, but to both tabular environments as well.

enter image description here

%% preamble stuff omitted
\begin{longtable}{|A|B|}
    \fbox{
    \begin{minipage}[t][6cm]{0.14\paperwidth}
        \begin{tabular}[t]{|p{0.12\paperwidth}|} % <--- "[t]" is new
            Left Table\\
            left Table\\
        \end{tabular}
    \end{minipage}}
    &
    \fbox{
    \begin{minipage}[t][16cm]{0.69\paperwidth}
        \begin{tabular}[t]{|p{0.66\paperwidth}|} % <--- "[t]" is new
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
            Right Table\\
        \end{tabular}
    \end{minipage}}
    \\
\end{longtable}
Related Question