Code: Select all
\titleformat{\section}[display]
{\Huge \bfseries}
{}
{0.4\textheight}
{\thesection.}
Code: Select all
\titleformat{\section}[display]
{\Huge \bfseries}
{}
{0.4\textheight}
{\thesection.}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
You just need to learn how to read manuals. Your code does not exactly do what you plan. The heading is neither properly centered nor on its own page.eelkefolmer wrote:[…] I wish someone would write some better documentation for titlesec.
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\titleformat{\section}
{\clearpage\null\vfil\bfseries\Huge}
{\filright\thesection}
{1em}
{\filright\Huge}
[\vfil\newpage]
\begin{document}
\section{Foo}
The quick brown for jumps over the lazy dog.
\section{Bar}
The quick brown for jumps over the lazy dog.
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p