1

I am trying to center align the following two minipages. Or at least set the margin on both sides from the border of the page? I also included the result from the code below.

Something else to note is that I have all the code below already in another \begin{center} and am using the showframe package.

\begin{titlepage}
    \begin{center}

        SampleText
        \vspace{6cm}

        \large
        \textbf{Title}

        \vspace{0.5cm}

        \vfill

    \begin{center}
        \begin{minipage}{8cm}
            \textbf{{Student:}}\\
                Name Lastname\\
                StdNr: 123456\\
        \end{minipage}
        \begin{minipage}{8cm}
            \textbf{{Supervisors:}}\\
                Name Lastname\\
                Name Lastname\\
        \end{minipage}
    \end{center}


        \thispagestyle{empty}

        \clearpage\mbox{}\clearpage

    \end{center}
\end{titlepage}

enter image description here Edit: Sorry for not statig my problem clearly enough. I want to move the two minipages as seen in the screenshot above, horizontally until there is an equal space to the edges on both sides. Whilst keeping the formating untouched otherwise.

Edit: I edited my screenshot as to what the result should roughly look like: enter image description here

6
  • 2
    (1) welcome, (2) on this site it is preferred to post full but minimal examples, then others can easily test your code without having to guess parts of it. (3) center in which direction, please clarify
    – daleif
    Oct 4 '18 at 9:15
  • 1
    Please clarify what you mean by "center align".
    – Mico
    Oct 4 '18 at 9:18
  • Maybe you want to use \centering inside of those minipages?
    – Skillmon
    Oct 4 '18 at 9:22
  • @daleif I have edited my posting with more info. This is sopposed to be a "Titlepage" and is in a titlepage.tex file of its own.
    – Jax Teller
    Oct 4 '18 at 9:33
  • @JaxTeller please edit your question in such a way that it becomes compilable, meaning it is i complete selfcontained valid LaTeX file you could run through one of the available engines. In the following link you can read how a minimal working example (MWE) should look like.
    – Skillmon
    Oct 4 '18 at 9:45
3

You should be using tabular rather than minipage. The showframe package is just for showing the text block, so to precisely see that the effect is as expected.

\documentclass{book}
\usepackage{showframe}% for debugging

\begin{document}

\begin{titlepage}
\centering

SampleText

\vspace{6cm}

{\large\textbf{Title}\\}

\vfill

\makebox[\textwidth][s]{%
  \hfill
  \begin{tabular}[t]{@{}l@{}}
    \textbf{Student:}\\
    Name Lastname\\
    StdNr: 123456
  \end{tabular}\hfill
  \begin{tabular}[t]{@{}l@{}}
    \textbf{Supervisors:}\\
    Name Lastname\\
    Name Lastname
  \end{tabular}\hfill
}

\vspace*{3pt}

\thispagestyle{empty}

\end{titlepage}

\end{document}

enter image description here

1
  • Perfect, this is exactly what I've tried to achieve. Didn't think of using tabular.
    – Jax Teller
    Oct 4 '18 at 9:55

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.