I would like to center a horizontal line on my page and I would like the width of this line to be half \textwidth
. Here is what I tried but it doesn't work :
\documentclass[10pt,a4paper]{article}
\begin{document}
Hello everyone !
\begin{center}
\hrule width 0.5\textwidth
\end{center}
\end{document}
Thank you for your help !
\rule{0.5\textwidth}{0.5pt}
?\rule{0.5\textwidth}{0.4pt}
is a better equivalent to\hrule
.0.4pt
is the exact equivalent, according to the TeXbook.