1

How can I create a windling line like in the picture?

\documentclass[10pt,a4paper]{article}

\usepackage[many]{tcolorbox}
\usepackage[tikz]{bclogo}

\usepackage{mathtools,systeme,amssymb,amsfonts,amsmath,mathabx,fge,skak}              
\usepackage{mathrsfs,eufrak,yfonts,pifont}


\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,locale=algeria]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.2]{Amiri}
\newfontfamily\myfont[Script=Arabic,Scale=1.3]{Amiri}



\newtcolorbox{proof 1}[2][]{
  freelance,before skip=0mm,after skip=0pt,
  colback=white,title={\hspace*{-0.6cm}\bccrayon\ \bfseries\myfont\textcolor{red!90!black}{إثبـــات}},
  bottomrule=0pt,top=-0cm,left=0mm,right=3mm,bottom=-4mm,
  boxrule=0pt,colframe=white,
  overlay unbroken and first={
 \draw[red!40,line width=2.1pt,]
    ([xshift=-1.3mm,yshift=-8mm]frame.north east) -- 
    ([xshift=-1.3mm,yshift=-8mm]frame.north east) -- 
    ([xshift=-1.3mm,yshift=-0mm]frame.south east);
\hfill \textcolor{red!70!black}{$\blacksquare$};}}



\begin{document}
\begin{proof 1}
اكتب هنا\\
اكتب هنا\\
اكتب هنا\\
اكتب هنا\\
اكتب هنا\\
اكتب هنا\\
اكتب هنا\\
اكتب هنا\\
 \end{proof 1}
 \end{document}

enter image description here

Skillmon
  • 60,462

2 Answers2

1

I could not use your code with arabic fonts, so I adapted to european characters. The vertical line can be decorated with decoration library from TikZ, please consult documentation and adapt it to your taste.

About title, I think it's better to use fonttitle and coltitle options instead of including everything inside title option. You can also use before title or after title options to include \bccrayon.

\documentclass[10pt,a4paper]{article}

\usepackage[many]{tcolorbox}
\usepackage[tikz]{bclogo}

\usepackage{mathtools,amssymb,amsfonts,amsmath}              
%\usepackage{mathrsfs,eufrak,yfonts,pifont}

\usetikzlibrary{decorations.pathmorphing}
\usepackage{polyglossia}
%\setdefaultlanguage[calendar=gregorian,locale=algeria]{arabic}
%\setotherlanguage{english}
%\newfontfamily\arabicfont[Script=Arabic,Scale=1]{Amiri}
%\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.2]{Amiri}
%\newfontfamily\myfont[Script=Arabic,Scale=1.3]{Amiri}

\newtcolorbox{proof 1}[2][]{
  enhanced, before skip=0mm, after skip=0pt,
  colback=white, coltitle=red!90!black,
  fonttitle=\bfseries,
  bottomrule=0pt,top=-0cm,left=0mm,right=3mm,bottom=-4mm,
  boxrule=0pt,colframe=white,
  title=#2,
  after title=\hfill\bccrayon,
  overlay unbroken and first={
 \draw[red!40,line width=2.1pt,solid, decorate, line width=1mm, decoration={coil, aspect=0}]
    ([xshift=-1.3mm,yshift=-8mm]frame.north east) -- 
    ([xshift=-1.3mm,yshift=-0mm]frame.south east);
\hfill \textcolor{red!70!black}{$\blacksquare$};},
    #1}

\begin{document}
\begin{proof 1}{Test}
\vspace{5cm}
\end{proof 1}
\end{document}

enter image description here

Ignasi
  • 136,588
1

In this answer, I only focus on producing something that resembles the waves. I cannot even copy your code because my old editor cannot cope with the special characters, sorry. The complete sines are borrowed from here.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations}
\pgfdeclaredecoration{complete sines}{initial}
{
    \state{initial}[
        width=+0pt,
        next state=sine,
        persistent precomputation={\pgfmathsetmacro\matchinglength{
            \pgfdecoratedinputsegmentlength / int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)}
            \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
        }] {}
    \state{sine}[width=\pgfdecorationsegmentlength]{
        \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
}
    \state{final}{}
}

\begin{document}
\tikzset{fancy sines/.style={decoration={
            complete sines,
            segment length=3mm,
            amplitude=1mm
        },decorate,to path={
      (\tikztostart) -- (\tikztotarget) \tikztonodes
    },
    execute at begin to={\foreach \X in {1,...,5}
    {\draw[decorate,#1]
    ([xshift=\X*\pgflinewidth/sqrt(1.9),yshift=-\X*\pgflinewidth/sqrt(1.9)]\tikztostart) 
    -- ([xshift=\X*\pgflinewidth/sqrt(1.9),yshift=-\X*\pgflinewidth/sqrt(1.9)]\tikztotarget);}}}
}
\begin{tikzpicture}    
\draw[red,fancy sines=red] (0,0) to (0,-3);
\end{tikzpicture}
\end{document}

enter image description here