# Remove space before bibliography title

I have a question very similar to How to remove the huge space in the Bibliography title? but the solution didn't work for me, probably because I'm using different setting for my documents.

Here is my header and bibliography insert :

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[UKenglish]{babel}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2cm,bottom=2cm]{geometry}
\usepackage{color}
\usepackage{graphicx}
\usepackage{soul}
\usepackage[normalem]{ulem}
\usepackage{titletoc}
\usepackage{tocloft}
\usepackage{titlesec}
\usepackage{gensymb}

\begin{document}

Text here.

\clearpage
\renewcommand{\bibname}{\begin{center} \ul{References} \end{center}}

\bibliographystyle{myunsrt}
\bibliography{my_biblio.bib}

\end{document}


With this code, I have a big space before the Bibliography title, which makes me lose a lot of space in my report, and I would like to get rid of it.

Don't use the center environment, it introduce extra space. Also it is not a good idea to redefine \bibname in this way -- the command is also used for the headers.

If you really want an underlined, centered title (which looks imho rather ugly) it would be better to redefine the thebibliography environment:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[UKenglish]{babel}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2cm,bottom=2cm]{geometry}
\usepackage{color}
\usepackage{graphicx}
\usepackage{soul}
\usepackage[normalem]{ulem}
\usepackage{titletoc}
\usepackage{tocloft}
\usepackage{titlesec}
\usepackage{gensymb}
\usepackage{xpatch}

\xpatchcmd\thebibliography{\chapter*{\bibname}}
\begin{document}

Text here.
\cite{doody}
\clearpage

\bibliographystyle{unsrt}
\bibliography{biblatex-examples.bib}

\end{document}


If you want to use a section command you can use this patch instead:

\xpatchcmd\thebibliography{\chapter*{\bibname}}