3

I would like to align text on a cover page in a way often seen in movie credits, with the "key" ragged right and the "value" left:

enter image description here

I use two minipages next to each other to achieve this. However, when I zoom in I see that the vertical alignment of the text is not right:

enter image description here

How can I get this right?

MWE:

\begin{minipage}{0.4\textwidth}
\begin{flushright}

Berichterstatter (1. Referent):\par
Mitberichterstatter (2. Referent):\par \vspace*{0.5cm}

Tag der Einreichung:\par
Tag der mündlichen Prüfung: 

\end{flushright}
\end{minipage}\hspace{0.2cm}
\begin{minipage}{0.4\textwidth}

Prof. Dr. A\par
Prof. Dr. B\par \vspace*{0.5cm}
2. Mai 2013 \par
12. Juli 2013

\end{minipage}
  • 1
    If you think others may encounter the same problem and if you found a solution, don't hesitate to post it as an answer. – jub0bs Apr 28 '13 at 14:30
  • 3
    Would you like to have them exactly on the center of the page? If not, you can use a simple tabular with alignment {rl} so that the first column will have a right alignment and the other left. – Sigur Apr 28 '13 at 14:30
  • @Sigur's idea makes sense. The problem with using two minipages is that, in your input file, related data gets separates into two different environments, which may make vertical alignment tedious. – jub0bs Apr 28 '13 at 14:39
2

I suggest you to use a tabular to do this.

\noindent left\dotfill{right} 
\begin{center}
\begin{tabular}{rl}
Berichterstatter (1. Referent): & Prof. Dr. A \\
Mitberichterstatter (2. Referent): & Prof. Dr. B\\[1em]
Tag der Einreichung: & 2. Mai 2013\\
Tag der mündlichen Prüfung: & 12. Juli 2013 
\end{tabular}
\end{center}
left\dotfill{right} 

enter image description here

ps. the problem is that the vertical which split the columns is not exactly on the center of the page since the whole tabular is being centered.

2

If the split should be in the middle of the page you can use the the tabularx environment:

\noindent left\dotfill{right}

\noindent\begin{tabularx}{\linewidth}{>{\raggedleft\arraybackslash}XX}
    Berichterstatter (1. Referent): & Prof. Dr. A \\
    Mitberichterstatter (2. Referent): & Prof. Dr. B\\[1em]
    Tag der Einreichung: & 2. Mai 2013\\
    Tag der mündlichen Prüfung: & 12. Juli 2013
\end{tabularx}

\noindent left\dotfill{right}

enter image description here

0

When I used the [t] option for the minipage environment, it worked as wished.

I found the solution here: Vertical Alignment of Minipage

  • 1
    The tabular approach is much better, trust me. – egreg Apr 28 '13 at 19:29
  • I do not see why... the [t] option solves it perfectly. – Eekhoorn Apr 28 '13 at 20:13
  • @biologue, you are right, it works. The visual effect is the same but when you change the contents to a complexer one it could be tedious to format it, since there is no relation between the corresponding lines of each minipage. – Sigur Apr 29 '13 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.