%%
%% Copyright (c) 2022-2024 by Friedemann Bartels
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version.  The latest version of this license is in:
%%
%%    http://www.latex-project.org/lppl.txt
%%
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2008/05/04 or later.
%%

\documentclass[bleed=3mm,grid,graphpaper]{pagelayout}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{microtype}
\usepackage{sectsty}
\usepackage{tgheros}
\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\sfdefault}

\margin=5mm
\bottommargin=23mm
\topmargin=10mm
\pagewidth=10cm
\pageheight=10cm
\gutter=4mm

\def\topsectionstyle{\sectionfont{\ \vskip\dimexpr12pt+1.34pt\relax}}
\def\inlinesectionstyle{\sectionfont{\vskip 0pt}}

\newtemplate{two col}{
  \setgrid{{{1}{1}}}
  \placeholder{}
  \placeholder{}
}

\begin{document}

  \page{
    \setgrid{{{1}{1}}}
    \text[breakable]{
      \topsectionstyle
      \tableofcontents
      \newpage
      \section{Intro}
      \lipsum[1]
      \inlinesectionstyle
      \section{Main}
      \lipsum[2]
      \newpage
      \topsectionstyle
      \section{Outlook}
      \lipsum[3]
      \par
      \lipsum[4]
    }
    \usetext
  }

  \template{two col}{
    \usetext
    \usetext
  }

  \template{two col}{
    \usetext
    \usetext
  }

  \template{two col}{
    \graphic{1x2}
    \usetext
  }

  \template{two col}{
    \usetext
    \usetext
  }

\end{document}
