# add a horizontal rule below the title with length start end thickness

I'd like to add a segment rule with a certain thickness below the tile. It does not cover the full page or the full title length and I can control its thickness.

I am using \maketitle to do the title

I tried with titlesec package but that is only for sections as \titlespacing{} doesn't take the \title command.

• Could you post a minimal, yet complete, code? – Bernard Jun 14 at 11:26

Like this?

\documentclass{book}
\usepackage{tikz}

\begin{document}

\begin{titlepage}
\begin{center}
\huge \bfseries My Title
\begin{tikzpicture}
\path (0,0)--(\textwidth,0);
\tikzset{shift={(0,0)}}
\draw [line width=0.5mm] (4, 0) -- (\textwidth,0);%<--- (4,0) is starting point of the line.
\end{tikzpicture}

\vspace{0.75cm}
\large \bfseries My Subtitle
\end{center}
\end{titlepage}

\chapter{First}
\end{document}


• any way I can do this without the titlepage environment? Also I'd need to control the start point of the rule (it's not centered). – Courvoisier Jun 14 at 12:25
• Again with titlepage environment, I have edited my answer to control the start point using TiKz environment. – ferahfeza Jun 14 at 13:08