Typora Page Break for h2
@media print, (overflow-block: paged) or (overflow-block: optional-paged)
{
/* Move top-level headings to a new page on the right-hand side: */
h1
{
page-break-before: right; /* CSS 2 */
break-before: recto; /* CSS 3+,
also works for languages written and paginated right-to-left */
}
/* Override the previous ruleset for the very first heading: */
h1:first-of-type,
section > h1:first-child
{
page-break-before: avoid; /* CSS 2 */
break-before: avoid; /* CSS 3+ */
}
/* Force second-level headings to begin in a new column or
possiblyon a new page if it was in the last of multiple columns otherwise: */
h2
{
break-before: column;
page-break-before: always;
}
/* Headings should not be the last paragraph on a page: */
h1, h2, h3, h4, h5, h6
{
page-break-after: avoid;
}
/* Consecutive headings with deepening level should not be split across pages: */
h1+h2, h2+h3, h3+h4, h4+h5, h5+h6
{
page-break-before: avoid;
}
}