0

I am trying to overcome an issue that I am having. I want the colorboxes to fit onto a page without over running the footer or page and starting again on the next page. Is there a way that I can do this.

Thank you in advance for your suggestions and solutions

\documentclass{report}
\usepackage[dvipsnames,table,xcdraw]{xcolor}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}

\usepackage{setspace}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{eurosym}
\usepackage{amstext}
\usepackage{hyperref}
\usepackage{grffile} %Stops the file name of figures appearing
\usepackage{color}
\usepackage{mathabx}
\usepackage{float}
\usepackage{pdfpages}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\DeclareRobustCommand{\officialeuro}{%
  \ifmmode\expandafter\text\fi
  {\fontencoding{U}\fontfamily{eurosym}\selectfont e}}

\usepackage{url}
\usepackage{background}
\usepackage{lastpage}

\usepackage[most]{tcolorbox}


\title{Business Plan}
\author{}
\onehalfspacing
\usepackage{algorithmic}
 \renewcommand{\familydefault}{\sfdefault}
\textheight=23cm \textwidth=16cm \topmargin=-2cm \oddsidemargin=0cm
\parindent=0mm
\pretolerance=2000 \tolerance=3000

\usepackage{glossaries}

\makenoidxglossaries %glossaries

\backgroundsetup{
  scale=1,
  color=black,
  opacity=1,
  angle=0,
  position=current page.south,
  vshift=60pt,
  contents={%
  \small\sffamily%
  \begin{minipage}{.8\textwidth}
  \parbox[b]{.6\textwidth}{%
    Page \thepage\ of   \pageref{LastPage}}\hfill
  \parbox[b]{.4\textwidth}{%
    \raggedleft xxxx \\ xxx, xxx}\      \textcolor{red}{\rule{\textwidth}{1.5pt}}\      \url{www.xxx.co.uk}
  \end{minipage}\hspace{.02\textwidth}%
  \begin{minipage}{.18\textwidth}
  \includegraphics[width=\linewidth,height=70pt,keepaspectratio]{iPhone app}
  \end{minipage}%
  }
}

\tcbset{rawlings/.style={width=\textwidth,colback={white},colbacktitle=SkyBlue,coltitle=black,colupper=black}}

\newtcolorbox[auto counter,list inside=rawlings]{rawlingsbox}[1][]{rawlings,#1}%

\begin{document}

\begin{rawlingsbox}[width=\textwidth,colback={white},colbacktitle=red,coltitle=white,colupper=black,title={\textbf{Executive Summary}},title={\textbf{Conclusions}}]
a\\
a\\
a\\
a\\
a\\
a\\
a\\
aa\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
aa\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
aa\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
a\\
\end{rawlingsbox}


\end{document}
2
  • tcolorbox library breakable and then option breakable.
    – TeXnician
    Apr 21, 2017 at 10:15
  • 1
    You could use \usepackage{blindtext} and \blindtext[8] for example to show a huge box, that should be broken instead of a bunch of `a\` ;-)
    – user31729
    Apr 21, 2017 at 10:24

1 Answer 1

2

You just have to add the required breakable option as in

\tcbset{rawlings/.style={breakable,width=\textwidth,colback={white},colbacktitle=SkyBlue,coltitle=black,colupper=black}}

break

Update: For your title after break add title after break as in

\begin{rawlingsbox}[width=\textwidth,colback={white},colbacktitle=red,coltitle=white,colupper=black,title={\textbf{Conclusions}},title after break={\textbf{Conclusions}}]

updated image

You should really read the documentation at least once to get an imagination what is possible with tcb.

3
  • Thank you very much that is great, Is there a way to still keep the heading for the box on the break away box? :) Apr 21, 2017 at 10:23
  • 1
    @DanielRawlings title after break=.
    – TeXnician
    Apr 21, 2017 at 10:26
  • 1
    @DanielRawlings: There is title after break option
    – user31729
    Apr 21, 2017 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .