0

Situation: Currently, I implemented a theorem environment that has a gray line on the left hand side (the implementation should not be too relevant for now). For an example see below. I am quite happy with the result, but would like to optimise the page break behaviour.

Hope: I would like a "fading transition" of the line if it is broken (as a visual indicator that the environment continues). So the line might get more transparent or might transition into a dashed line.

In general I would be interested into such "transitions" for boxes and frames. I don't have any preferences on the package that is used for generating the lines/boxes/frames and would be happy about any solution that works nicely with theorem environments.

Example Picture

3
  • 1
    Lines which break across pages are actually a big deal. Unlike paragraphs which use \vsplit, these are two completely separate lines. The code has to detect the end of the page, split the text. add the lines and move to the next page. See tex.stackexchange.com/questions/304722/… Apr 23, 2021 at 15:17
  • @JohnKormylo : Given the fact that I have never seen something like this before, I suspected it might be really difficult, but I don't see why it should in general be impossible. Apr 23, 2021 at 16:21
  • It is possible. Just a lot of work. It may be easier to do it from scratch than use a package. Apr 23, 2021 at 17:45

1 Answer 1

1

Like this?

enter image description here

\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{mathtools}
\usepackage{lipsum}

\newtcbtheorem[auto counter]{PeterTheorem}{Theorem}%
{theorem style=plain, enhanced, breakable, 
empty,
coltitle=black, 
fonttitle=\upshape\scshape,
boxrule=0.0pt,
overlay unbroken={\fill[gray](frame.north west)rectangle ([xshift=1.5mm]frame.south west);},
overlay first={\fill[top color=gray, bottom color=white](frame.north west)rectangle ([xshift=1.5mm]frame.south west);},
overlay last={\fill[top color=white, bottom color=gray](frame.north west)rectangle ([xshift=1.5mm]frame.south west);},
overlay middle={\fill[top color=white, bottom color=white, middle color=gray](frame.north west)rectangle ([xshift=1.5mm]frame.south west);},
}{theo}


\begin{document}

\lipsum[1-4]

\begin{PeterTheorem}{}{theo1-3}%
Consider the n.n.f. Insing model on $Z^d,\ d\geq 1$. There exists acritical inverse temperature $\beta_c=\beta_c(d) \in[0,\infty]$, such that the Ising undergoes a \emph{sharp} ferromagnetic phase transistion at $\beta_c$:
\begin{equation*}
(\sigma_0)^+_{\beta;\Lambda_n}
\begin{cases}\leq e^{-cn} & $for$\ \beta<\beta_c\ $with$\ c=c(\beta)>0\\
\geq \sqrt{1-(\beta_c/\beta)^2} & $for$\ \beta\geq \beta_c \end{cases}
\end{equation*}
uniformly in $n\geq0$, where $\Lambda_n:=Z^d\cap[-n,n]^d$ denotes the box of size $n$ around the origin. Moreover, for\ $d\geq2$, the phase transition is \emph{non-trivial}, meaning that $0<\beta_c<\infty$.
\end{PeterTheorem}

\end{document}
2
  • Thanks a lot! I would prefer to have the gradient a bit sharper (so just over the last ~ 1cm) and perhaps a transition into dashing would be preferable to a gradient, but maybe I can work my work there from here! Apr 26, 2021 at 11:57
  • Curiously enough, on my setup the rectangle has a thin boundary. Apr 26, 2021 at 12:03

You must log in to answer this question.

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