1

We facing issues in tcolorbox that placed continue icon odd pages alone, now issues is that last line of odd pages and symbol base to base needed more vertical space (two line space needed approx.) but bottom spaces no needed for even pages, please leave as it is. I tried following options which affects both the pages "bottomrule at break=0pt,bottomsep at break=0pt".

Please find my tex coding as follows:

\documentclass{book}
\RequirePackage{amsmath,amssymb,lipsum}
\RequirePackage[breakable,hooks]{tcolorbox}

\tcbuselibrary{breakable,skins}

\makeatletter
\newtcolorbox{Boxone}[2][]{%
enhanced,
breakable,
arc=0pt,outer arc=0pt,boxrule=0.5pt,boxsep=0pt,top=14pt,left=12pt,right=12pt,bottom=10.3pt,middle=0pt,
toptitle=6pt,bottomtitle=0pt,
colback=gray, colbacktitle=gray,
colframe=red, coltitle=black, titlerule=0pt,titlerule style={gray,line width=0pt},
attach boxed title to top left,
boxed title style={arc=0pt,outer arc=0pt,boxrule=0.5pt,boxsep=0pt,top=6pt,left=6pt,right=6pt,bottom=6pt,colframe=red,colback=red},
title={\MakeUppercase{#2}},pad at break=12pt,bottomrule at break=0pt,bottomsep at break=0pt,toprule at break=0pt,
%title after break={$\blacktriangleright$},
enlargepage=50pt,}%



%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\tcb@split@first{%
  \setcounter{tcbbreakpart}{1}%
  \ifx\kvtcb@float\@empty%
    \iftcb@vfillbeforefirst%
      \let\tcb@before@first=\vfill%
    \else%
    \let\tcb@before@first=\@empty%
    \fi%
    \let\tcb@before@middle=\@empty%
    \let\tcb@before@last=\@empty%
    \long\def\tcb@after@first{\par\vskip-\baselineskip\nobreak\noindent\raisebox{12pt}[0pt][0pt]{\ifodd\c@page{\vbox to 0pt{\hfill$\blacktriangleright$\kern5.5pt}}\else\fi}\parskip\z@\par\pagebreak\nointerlineskip{\topskip\z@\null}\tcb@enlbreak@next}%
    \long\def\tcb@after@middle{\par\vskip-\baselineskip\nobreak\noindent\raisebox{12pt}[0pt][0pt]{\ifodd\c@page{\vbox to 0pt{\hfill$\blacktriangleright$\kern5.5pt}}\else\fi}\par\vfill\eject\tcb@enlbreak@next}%
        \let\tcb@after@last=\par%
  \else%
    \edef\tcb@before@first{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]\noexpand\kvtcb@everyfloat}%
    \let\tcb@before@middle=\tcb@before@first%
    \let\tcb@before@last=\tcb@before@first%
    \let\tcb@after@first=\tcb@float@env@end%
    \let\tcb@after@middle=\tcb@float@env@end%
    \let\tcb@after@last=\tcb@float@env@end%
  \fi%
  %
  \edef\kvtcb@skin@@first{\kvtcb@skin@first}%
  \edef\kvtcb@skin@@middle{\kvtcb@skin@middle}%
  \edef\kvtcb@skin@@last{\kvtcb@skin@last}%
  %
  \let\tcb@h@breaksep@first=\kvtcb@bottomsep%
  \tcbdimto\tcb@h@breaksep@middle{\kvtcb@bottomsep+\kvtcb@topsep}%
  \let\tcb@h@breaksep@last=\kvtcb@topsep%
  \tcbdimto\tcb@h@padding@first{\kvtcb@bbtop@stand+\kvtcb@bbbottom@break+\kvtcb@top@rule@stand+\kvtcb@bottom@rule@break+\tcb@h@breaksep@first+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  \tcbdimto\tcb@h@padding@middle{\kvtcb@bbtop@break+\kvtcb@bbbottom@break+\kvtcb@top@rule@break+\kvtcb@bottom@rule@break+\tcb@h@breaksep@middle+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  \tcbdimto\tcb@h@padding@last{\kvtcb@bbtop@break+\kvtcb@bbbottom@stand+\kvtcb@top@rule@break+\kvtcb@bottom@rule@stand+\tcb@h@breaksep@last+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  %
  \tcb@split@setstate@first%
  %
  \splittopskip=0pt%
  \splitmaxdepth=0pt%
  \edef\tcb@thevfuzz{\the\vfuzz}%
  \edef\tcb@thevbadness{\the\vbadness}%
  %
  \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}%
  \tcb@swap{\tcb@totallowerbox}{\tcb@lowerbox}%
  %
  \let\tcb@split@next=\relax%
  \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@first-\tcb@h@padtitle}%
  \ifdim\tcb@split@dim<\tcb@h@upper\relax%
    %
    %
    \iftcb@break@allowed%
      \tcb@split@upper@box@and@assemble%
      \ifnum\tcb@upper@box@badness=1000000\relax%
        \tcb@split@break@to@start%
      \else%
        \ifdim\wd\tcb@totalupperbox=0pt\relax%
          \iftcb@lowerspace%
            \tcb@sdraw@U%
            \let\tcb@split@next=\tcb@split@SL%
          \else%
            \tcb@split@force@standalone%
            \tcb@drawcolorbox@standalone%
          \fi%
        \else%
          \ifdim\dimexpr\tcb@h@upper=0pt\relax%
            \tcb@split@break@to@start%
          \else%
            \tcb@sdraw@U%
            \let\tcb@split@next=\tcb@split@USL%
          \fi%
        \fi%
      \fi%
    \else%
      \tcb@split@upper@box%
      \ifdim\wd\tcb@totalupperbox=0pt\relax%
        \iftcb@lowerspace%
          \tcb@sdraw@U%
          \let\tcb@split@next=\tcb@split@SL%
        \else%
          \tcb@split@force@standalone%
          \tcb@drawcolorbox@standalone%
        \fi%
      \else%
        \tcb@sdraw@U%
        \let\tcb@split@next=\tcb@split@USL%
      \fi%
    \fi%
  \else%
    \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}%
    \iftcb@lowerspace%
      \tcbdimto\tcb@split@dim{\tcb@split@dim-\tcb@h@upper-\tcb@h@segment}%
      \ifdim\tcb@split@dim<\kvtcb@breakminlines\baselineskip\relax%
        \tcb@sdraw@U%
        \let\tcb@split@next=\tcb@split@SL%
      \else
        \tcb@split@lower@box@and@assemble%
        \ifnum\tcb@lower@box@badness=1000000\relax%
          \tcb@sdraw@U%
          \let\tcb@split@next=\tcb@split@SL%
        \else%
          \ifdim\wd\tcb@totallowerbox=0pt\relax%
            \tcb@split@force@standalone%
            \tcb@drawcolorbox@standalone%
          \else%
            \tcb@sdraw@USL%
            \let\tcb@split@next=\tcb@split@L%
          \fi%
        \fi%
      \fi%
    \else%
      \tcb@split@force@standalone%
      \tcb@drawcolorbox@standalone%
    \fi%
  \fi%
  \tcb@split@next%
}
%%%%%%%%%%%%%%%%%%%%%%%

\makeatother

\begin{document}
\begin{Boxone}{Example 1.4}
\lipsum[1-40]
\end{Boxone}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.