I would like to adjust section headings at some point in the document. However, \titleformat
can only be used in preamble, something like the following fails:
\documentclass{article}
\usepackage{titlesec}
\begin{document}
\titleformat{name=\section}[display]
{\huge} % format
{} % label
{10pt} %sep
{} %before
\section{test}
\end{document}
Is it possible to adjust \titleformat
in the middle of a document?
Edit:
\begin{document}
\titleformat{\section}[display]
{\huge} % format
{} % label
{10pt} %sep
{} %before
\section{test}
\end{document}
works, but then how do I use page=even
in the \titleformat
?
Best Answer
My edit of the question already says that I can use
\titleformat{\section}[display]
instead of\titleformat{name=\section}[display]
outside of the preamble. I still had an issue withpage=odd
andpage=even
, which can only be set with the\titleformat{name=\section}[display]
format.I've circumvented the problem with:
to apply only on odd pages.