2

I aim to center section titles of an article while still aligning the reference title left. I've tried to define something like \titleformat*{\sectionc}{\centering\large\bfseries} and \titleformat*{\section}{\large\bfseries}. It doesn't work. Could anyone help? Many thanks!

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{titlesec}
\titleformat*{\section}{\centering\large\bfseries}
\usepackage[authordate,autocite=inline,backend=biber, natbib]{biblatex-chicago} 
\bibliography{ee.bib}
\begin{document}
\section{Mass}
\cite{goossens1994latex}
\printbibliography[heading=bibintoc]
\end{document}
@book{goossens1994latex,
  title={The LATEX companion},
  author={Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
  volume={1},
  year={1994},
  publisher={Addison-Wesley Reading}
}
2
  • Off-topic: You may want to replace \bibliography{ee.bib} with \addbibresource{ee.bib}.
    – Mico
    Jan 3, 2022 at 17:22
  • 1
    Good advice. Glad to substitute \bibliography with \addbibresource. Thanks again! link
    – W. Zhu
    Jan 3, 2022 at 17:41

1 Answer 1

1

You may achieve your formatting objective by inserting the instruction

\titleformat*{\section}{\raggedright\large\bfseries}

immediately before the \printbibliography statement.

1
  • 1
    Thanks a lot!! I quite appreciate the solution for its brevity.
    – W. Zhu
    Jan 3, 2022 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .