1

On my thesis' front page, I have some title and logos which are centered horizontally. Furthermore, my own and my supervisors' names are displayed in a tabular environment which is also centered, followed by a date, again centered. However, the table is centered on the page based on half of its total width, not based the separator in between the two columns. As a result of an imbalance in the two columns' widths due to one supervisor's long name, the column separator is visibly off from the page's center.

I admit, this description may be confusing so here's a little example: enter image description here

I think it would look a lot better if the separator of the two columns would be at the center of the page. Do you know a way to adjust this?

My code so far (I also tried \centering instead of \begin{center} but it stayed the same):

\documentclass[a4paper, 12pt]{book}
\begin{document}
\begin{center}
    {\LARGE\bfseries Title\\}
    \vspace{3mm}
    \begin{tabular}{rl}
        Submitted by: & short name\\
        \vspace{2mm}
        Academic Supervisors: & here comes a loooooooooong name \\& some other name\\
        \vspace{2mm}
    \end{tabular}
    \vspace{1cm}
    Location, date
    \vfill
\end{center}
\end{document}

Thank you in advance for any help!

2
  • There is no \begin{document} in your code. Commented May 14, 2020 at 16:23
  • Oh yes, I forgot to write that down in the MWE. I added it now. Commented May 14, 2020 at 16:31

3 Answers 3

2

It is easy to do withtabularx:

\documentclass[a4paper, 12pt]{book}
\usepackage{tabularx}

\begin{document}
\thispagestyle{empty}
\begin{center}
    {\LARGE\bfseries Title\\}
    \vspace{3mm}

    \begin{tabularx}{\linewidth}{ >{\raggedleft}X >{\raggedright\arraybackslash}X}
        Submitted by: & short name\\[2mm]
        Academic Supervisors: & here comes a loooooooooong name \\
        & some other name\\[2mm]
    \end{tabularx}
    \vspace*{1cm}

    Location, date
    \vfill

\end{center}

\end{document} 

enter image description here

1
  • Works perfectly, thank you very much! Commented May 14, 2020 at 16:42
0

Use something like

\hspace*{23mm}\begin{tabular}{rl}

if necessary changing the 23mm to give a better adjustment. This shifts the tabular to the right.

0

One can set the width of a column by inserting a \makebox with a given (large) width. In this case, \dimen0 is set to the largest width that will fit.

\documentclass[a4paper, 12pt]{book}
\begin{document}
\begin{center}
    {\LARGE\bfseries Title\\}
    \vspace{3mm}
    \begin{tabular}{rl}
      \setlength{\dimen0}{\dimexpr 0.5\textwidth - 2\tabcolsep}%
        \makebox[\dimen0][r]{Submitted by:} & \makebox[\dimen0][l]{short name}\\
        \vspace{2mm}
        Academic Supervisors: & here comes a loooooooooong name \\& some other name\\
        \vspace{2mm}
    \end{tabular}
    \vspace{1cm}
    Location, date
    \vfill
\end{center}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .