Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.01k stars 957 forks source link

Orphan subsection titles followed by a table #320

Closed ozobi closed 1 year ago

ozobi commented 1 year ago

I get orphan subsection titles at the end of a page if the title is followed by a table. Is there any way to avoid that so the title is moved to the next page with the table?

image

ozobi commented 1 year ago

This code works, although I modified the margins.

\usepackage[nobottomtitles]{titlesec} \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{30pt}{\huge} \titleformat{\section} {\normalfont\Large\bfseries}{\thesection}{1em}{} \titleformat{\subsection} {\normalfont\large\bfseries}{\thesubsection}{1em}{} \titleformat{\subsubsection} {\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{} \titleformat{\paragraph}[runin] {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{} \titleformat{\subparagraph}[runin] {\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{} \titlespacing*{\chapter} {0pt}{40pt}{10pt} \titlespacing*{\section} {0pt}{3.5ex}{.8ex} \titlespacing*{\subsection} {0pt}{3.25ex}{.5ex} \titlespacing*{\subsubsection}{0pt}{3.25ex}{.5ex} \titlespacing*{\paragraph} {0pt}{3.25ex}{1em} \titlespacing*{\subparagraph} {\parindent}{3.25ex}{1em}