In the following MWE (built from https://tex.stackexchange.com/a/170767/69378) I have demonstrated that title text in an overlayed tcolorbox
node gets repeated across page breaks.
I have checked the manual against each of the arguments being configured, and tried commenting out ones I thought might be the culprit, but I am always left with this repeated title. Normally this is a fine feature, but I want to be able to selectively turn this off, when the tcolorbox
is small and repeating this title just increases clutter.
What is forcing this repeat?
\documentclass{article}
\usepackage[left=60pt,top=60pt,right=60pt,bottom=60pt]{geometry}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{kantlipsum}
\usepackage{enumitem}
\usepackage[many]{tcolorbox}
\setitemize{nolistsep,labelsep=1ex,leftmargin=*}
%% colors---
\definecolor{lightgray}{gray}{0.8}
%%items--
\newlist{items}{description}{1}
\setlist[items]{align=right,font=\normalfont, leftmargin=1.8in,style=nextline,labelsep=1em,}
%% leftrulebox---
\tcbuselibrary{skins,breakable}
\newtcolorbox{leftrulebox}[1][]{
colback=white,
boxrule=10pt
left=0.5ex,
top=0pt,
arc=0pt,
outer arc=0pt,
enlarge left by=1.8cm,
enlarge right by=-\dimexpr1.8cm+\parindent\relax,
right=\dimexpr1.8cm+\parindent\relax,
leftrule=1pt,
rightrule=0pt,
toprule=0pt,
bottomrule=0pt,
breakable,
nobeforeafter,
enhanced jigsaw,
overlay={
\node[anchor=north east,inner ysep=0pt,align=right,text width=1.8cm]
at ([yshift=-0.55ex]frame.north west) {\hfill#1};
},
before=\vskip2\itemsep\noindent
}
\begin{document}
\section*{Sample}
\begin{leftrulebox}[Text Title]
\kant[1]
\kant[2]
\kant[3]
\kant[4]
\kant[5]
\end{leftrulebox}
\end{document}
**UPDATE: MWE 2 for intermitent solution **
\documentclass{article}
\usepackage[left=60pt,top=60pt,right=60pt,bottom=60pt]{geometry}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{kantlipsum}
\usepackage{enumitem}
\usepackage[many]{tcolorbox}
\setitemize{nolistsep,labelsep=1ex,leftmargin=*}
%% colors---
\definecolor{lightgray}{gray}{0.8}
%%items--
\newlist{items}{description}{1}
\setlist[items]{align=right,font=\normalfont, leftmargin=1.8in,style=nextline,labelsep=1em,}
%% leftrulebox---
\tcbuselibrary{skins,breakable}
\newtcolorbox{leftrulebox}[1][]{
colback=white,
boxrule=10pt
left=0.5ex,
top=0pt,
arc=0pt,
outer arc=0pt,
enlarge left by=1.8cm,
enlarge right by=-\dimexpr1.8cm+\parindent\relax,
right=\dimexpr1.8cm+\parindent\relax,
leftrule=1pt,
rightrule=0pt,
toprule=0pt,
bottomrule=0pt,
breakable,
nobeforeafter,
enhanced jigsaw,
%overlay={
% \node[anchor=north east,inner ysep=0pt,align=right,text width=2.6cm]
% at ([yshift=0.5ex]frame.north west) {\hfill#1};%-0.55 hold yshift
%},
extras first={
overlay={%
\node[anchor=north east,inner ysep=0pt,align=right,text width=2.6cm]
at ([yshift=-0.5ex]frame.north west) {\hfill#1};
},
},
extras middle and last={%
overlay={%
\node[anchor=north east,inner ysep=0pt,align=right,text width=2.6cm]
at ([yshift=-0.5ex]frame.north west) {\hfill};
},
},
%before=\vskip2\itemsep\noindent
before=\vskip\itemsep\noindent
}
\begin{document}
\section*{Sample}
\begin{leftrulebox}[Text Title 1]
\kant[1]
\end{leftrulebox}
\begin{leftrulebox}[Text Title 2]
\kant[2]
\kant[3]
\kant[4]
\kant[5]
\end{leftrulebox}
\begin{leftrulebox}[Text Title 3]
\kant[3]
\kant[4]
\kant[5]
\end{leftrulebox}
\end{document}