0

For example, the overlay of the exercises found in Exo7's pdfs are situated in front of a jagged line usually, I would like to know how to get the text to be exactly in front of the line I'm creating. enter image description here

I did a TikzPicture already of the line I want to put, but I can't seem to get the text in front of my line.

  • Welcome! You can build on this post, or use a tcolorbox. In the first case, please note that there is now the tikzmark library which comes with its own, better version of \tikzmark. –  Mar 19 '20 at 12:47

1 Answers1

2

This is a solution with tcolorbox:

\documentclass[a4paper]{article}

\usepackage{lipsum}
\usepackage{geometry}
\usepackage[most]{tcolorbox}
\usetikzlibrary{decorations.pathmorphing}

\newtcolorbox{exercices}[1][]{
    breakable,
    enhanced,
    empty,
    coltitle=black,
    fonttitle=\bfseries,
    title=Miniexercices,
    extras={%
        borderline west={0.25mm}{0.5mm}{gray,decoration={zigzag, amplitude=.5mm},decorate}},
    #1
}

\begin{document}

\lipsum[1]

\begin{exercices}
Solve following problems:
\begin{enumerate}
\item Problem
\item Problem
\item Problem
\end{enumerate}
\end{exercices}

\lipsum[2]
\end{document}

enter image description here

Ignasi
  • 136,588
  • Voted positive your answer. If the zig zag was a little bit thicker aesthetically, in my humble opinion, it would appear more beautiful. – Sebastiano Mar 21 '20 at 23:00