如何将文章的章节标题居中而不将其参考标题居中

如何将文章的章节标题居中而不将其参考标题居中

我希望将文章的章节标题居中,同时仍将参考标题左对齐。我尝试定义类似 \titleformat*{\sectionc}{\centering\large\bfseries} 和 \titleformat*{\section}{\large\bfseries} 的内容。但不起作用。有人能帮忙吗?非常感谢!

\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}
}

答案1

您可以通过插入指令来实现格式化目标

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

在声明之前立即\printbibliography

相关内容