0

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!

  • There is no \begin{document} in your code. – F. Pantigny May 14 at 16:23
  • Oh yes, I forgot to write that down in the MWE. I added it now. – starsnpixel May 14 at 16:31
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

| improve this answer | |
  • Works perfectly, thank you very much! – starsnpixel May 14 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.

| improve this answer | |
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}
| improve this answer | |

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.