latex – Vertically centering a title page

latex – Vertically centering a title page

There are two small bugs in your code.

First, if you want the vspace to work at the beginning or end of a page, you should use the starred version (vspace*).

This would work, but maketitle is a pretty complicated macro, and if used like in your example, it just puts the title at the second page. You can use the titlepage environment, which gives you much more command over how the title page looks like — including the spacing. For example, you could use the following code:

documentclass{article}
setlength{pdfpagewidth}{88.184mm}
setlength{pdfpageheight}{113.854mm}

usepackage[margin=0.5cm, paperwidth=88.184mm, paperheight=113.854mm]{geometry}

begin{document}
  begin{titlepage}
    vspace*{fill}
    begin{center}
      {Huge [[title]]}\[0.5cm]
      {Large [[author}\[0.4cm]
      [[date]]
    end{center}
    vspace*{fill}
  end{titlepage}

  [[text]]
end{document}
null  % Empty line
nointerlineskip  % No skip for prev line
vfill
letsnewpage newpage
letnewpage relax
maketitle
let newpage snewpage
vfill 
break % page break

latex – Vertically centering a title page

If you want to make everything work even with maketitle put your vspace*{fill} inside the first and the last attribute, exp:

 title{**vspace*{fill}**[[title]]}

 date{[[date]]}

 author{[[author]]**vspace*{fill}**[[}

 begin{document}

    maketitle

    newpage

   [[text]]

end{document}

Leave a Reply

Your email address will not be published.