I am writing in lyx and inserted a new section. i wonder how could i align the section header to the center rather than to the left. I put
\usepackage{titlesec}
\titleformat{\section}{\centering}
in the preamble but it does not work. Any comments would be appeciated. Thank you.
\large\bfseriesafter\centeringin the format arguments. – Fran May 09 '21 at 21:17