I tried to extend this class with breakable tcolorboxes. For some reason this does not work at all.
Here is my .cls file where I marked my change:
\ProvidesClass{cornell}
\LoadClass[a4paper]{article}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,skins,xparse}
\usepackage{parcolumns} % Used to create two columns
\usepackage{bookmark} % Add bookmarks to the resulting PDF
\usepackage[margin=2cm]{geometry} % Change geometry of pages
\usepackage{hyperref} % Default hyperref setup
\hypersetup{
colorlinks = true, % Colour links instead of ugly boxes
urlcolor = blue, % Colour for external hyperlinks
linkcolor = blue, % Colour of internal links
citecolor = red % Colour of citations
}
\date{}
\renewcommand{\maketitle}{%
\vspace{-3em}
\pdfbookmark[0]{\@title}{title}
\begin{tcolorbox}[width=\textwidth,lowerbox=invisible]
\Huge\sffamily \@title
\end{tcolorbox}
\vspace{2em}
}
\DeclareDocumentCommand\preread{ m m }
{
\pdfbookmark[1]{Introduction}{intro}
\begin{tcolorbox}[width=\textwidth]
#1
\tcblower
#2
\end{tcolorbox}
}
\DeclareDocumentCommand\note{ o m }
{
\IfNoValueT{#1} {
\vspace{-1.5em}
}{}
\begin{parcolumns}[colwidths={1=.33\textwidth},nofirstindent]{2}
\colchunk{
\IfNoValueF{#1} {
\pdfbookmark[1]{#1}{note}
\begin{tcolorbox}[lowerbox=invisible,box align=top]
#1
\end{tcolorbox}
}{}
}
\colchunk{
\begin{tcolorbox}[enhanced,lowerbox=invisible,box align=top,breakable] % <<< HERE I ADDED BREAKABLE
#2
\end{tcolorbox}
}
\end{parcolumns}
}
\DeclareDocumentCommand\summary{ m }
{
\vfill
\pdfbookmark[1]{Summary}{summary}
\begin{tcolorbox}[
enhanced,
floatplacement=!b,
float,
colframe=black,
colupper=black,
opacitybacktitle=1,
opacitytext=1,
segmentation style={black!55,solid,opacity=0,line width=3pt},
title=Summary,
fonttitle=\large\bfseries\sffamily]
#1
\end{tcolorbox}
}
And here is a sample file:
\documentclass{cornell}
\usepackage{lipsum}
\title{A topic we're taking notes on}
\begin{document}
\maketitle
\preread
{Questions}
{
\begin{enumerate}
\item{What's the first question this section will answer?}
\item{What's the second question?}
\end{enumerate}
}
\note[Some key term]
{
\begin{itemize}
\item{A cool thing}
\item{Another cool thing}
\item{Not all things are cool}
\end{itemize}
}
\note[Another term]
{
\lipsum[4]
}
\note{\lipsum[5]}
\note{\lipsum[6-7]}
\summary{A fabulous summary.}
\note{\lipsum[6]}
\note{\lipsum[9-12]}
\note{\lipsum[10-20]}
\end{document}
When compiling this the results are really awkward.
Here should be a break across the two pages:
Here are actually breaks within a single page:
Does anyone know how to solve this issue?