I am currently trying to write a document where I have breakable tcolorboxes with a vertical gradient, as in the code below. However, I am facing an issue where the color gradient resets each time there is a page break, is there a way of fixing this?

The below code illustrates my approach to the creation of the colorboxes and also what goes wrong.

\documentclass[a4paper, 11pt]{article}
\newtcbtheorem[number within=section]{Test}{Test Box}
{enhanced,interior style={white,opacity=0.8},frame style={top color=red!75!black,
bottom color=blue!75!black},sharpish corners,breakable,fonttitle=\bfseries}{th}
\begin{Test}{I am a test box}{}


The following image shows the problem which occurs when there is a page break. color page break

  • 2
    you could set different gradients for the first and the last part, e.g. frame style={top color=red!75!black,bottom color=red!50!blue!75!black}, extras last={frame style={top color=red!50!blue!75!black,bottom color=blue!75!black},}, Feb 13 at 22:28


You must log in to answer this question.

Browse other questions tagged .