0

I wanted to create a custom title page for a document I'm writing using the report class.

I chose to use the titlepage environment. I did not wish to use the standard \maketitle command with its standard options as I don't want a date or an author, but I do want a sort of sub-title/dedication and I felt abusing \author{} for this was a bit of a misdemeanour, even if it does look alright in the output.

I've been trying to vertically centre the text - what I want is for the title to appear slap-bang in the middle of the page, on all axes. Doing this has proven difficult with even the very simplest of title pages. Consider the below:

\documentclass[12pt]{report}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}

\usepackage{showframe}

\begin{document}

\begin{titlepage}
  \vspace*{\fill}
  \begin{center}%
    Title
  \end{center}
  \vspace*{\fill}
\end{titlepage}

\end{document}

Even with various additional \pars, the use of \null\vfil (as in report.cls) and various other tricks, I just can't get 'Title' to actually be in the middle of the page, vertically. And I can't understand why.

I would like to understand how to vertically centre text. Obviously, however, the actual title page I'm trying to produce (shown below) is a bit more complicated than just the one word 'title'.

My actual title page

\documentclass[12pt]{report}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{fontspec}
\newfontfamily{\SA}[Script=Devanagari]{Sanskrit 2003}

\usepackage{showframe}

\begin{document}

\begin{titlepage}
  \vspace*{\fill}
  \begin{center}%
    {\LARGE {\SA ॥~श्रीमद्भगवद्गीता~॥} \par \medskip
      \textit{\'{S}r\={i}madbhagavadg\={i}t\={a}} \par}%
    \vskip 4em%
    {\large {\SA ॥~ॐ श्री परमात्मने नमः~॥} \par \medskip
      \textit{O\d{m} \'{s}r\={i} param\={a}tmane nama\d{h}} \par}%
  \end{center}
  \vspace*{\fill}
\end{titlepage}

\end{document}

Here I think the fact that it's not very well centred is quite readily apparent.

Update

Peter Wilson's solution (https://tex.stackexchange.com/a/628447/16968) is very good, but if we look we can see that the text isn't quite vertically centred. The two green lines and the two blue lines are exactly the same length but you can see that the bottom two lines overlap the text showing that the text is slightly nearer the bottom of the page than the top. This could be corrected manually with explicit lengths, but I can't see why \vspace*{\fill} doesn't work.

enter image description here

Close-up:

enter image description here

Edit: For reference, 5⅔pt seems to be the magic number

1 Answer 1

2

Try

\documentclass[12pt]{report}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}

\usepackage{showframe}

\begin{document}

\begin{titlepage}
  \mbox{}  % added
  \vspace*{\fill}
  \begin{center}%
    Title
  \end{center}
  \vspace*{\fill}
  \mbox{}  % added
\end{titlepage}

\end{document}
4
  • Thank you! This does seem to work more-or-less perfectly (without getting out a ruler) with just the one-line title, but my actual title is slightly (but visibly) nearer the bottom of the page than the top, and I'm not sure why!
    – Au101
    Dec 29, 2021 at 18:40
  • @Au101 I have tried your second MWE but I don't have the fonts you have used so it doesn't compile. Any chance of you just using the Latin alphabet instead? Dec 30, 2021 at 20:55
  • Thanks so much for coming back to it. Sure, go for it, if you want to substitute two versions of the Latin text below, that will probably do as well, alternatively Noto Sans Devanagari, Mangal (windows), DevanagariMT (Mac) or Lohit Devanagari (Linux) should all do just as well if a generic and general answer is possible, but obviously if the only way is to make manual adjustments then any differences in size between fonts will require different adjustments, although I think fontspec's Scale=MatchUppercase may help!
    – Au101
    Dec 30, 2021 at 21:05
  • I'm not going to change your second MWE. You might not have the fonts i would use. Dec 31, 2021 at 18:03

You must log in to answer this question.

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