1
\documentclass{article}
\title{Title}
\author{Name}
\date{}
\begin{document}
    \begin{titlepage}
      \maketitle
    \end{titlepage}
\end{document}

enter image description here

Hi, how can I write a title in a centre?

chrisma
  • 1,239
  • Maybe the second answer for this question could work? – chrisma Aug 04 '18 at 12:12
  • 3
    Horizontally one typically uses the center environment or \centering for multiple lines, or \makebox for a single line. Vertically, it depends on exactly what you mean by the center. \vspace*{\fill} before and after locates the center of the remaining space relative to everything else on the page. Tikz and tikzpagenodes can locate the center of the page or the center of the text area in an absolute sense. – John Kormylo Aug 04 '18 at 12:52
  • 1
    Could you please clarify your question? In your non-answer you talk about the chapter name. In your code example you use article class (which does not have chapters) and a title page? I'm confused what you are trying to do. – samcarter_is_at_topanswers.xyz Aug 05 '18 at 13:31
  • You might be interested in the following: Vertically Center title page : Article – leandriis Aug 05 '18 at 13:31
  • I mean to say that the chapter name may fix at center point where i draw a yellow line. – Junaid Qadir Aug 05 '18 at 13:19

1 Answers1

0

If you want to use chapter you should change the type of class from \documentclass{article} to \documentclass{report} you could use the \usepackage{sectsty} to put the chapter title in the center.

\documentclass{report}

\usepackage{sectsty}
\chapterfont{\huge\centering}
\chaptertitlefont{\centering}

\begin{document}
\chapter{Related Work}
\end{document}