0

enter image description here

How can I make these types of lines?

  • 1
    First give your own attempt as a mwe with the text in a French bable tex body showing your preferred page settings so they can be experimented with for placement – user170109 Mar 26 at 21:35
  • any news? you receive excellent answer. it will be nice from you if you would accept it (by clicking on the check mark at the top left side of answer). – Zarko Apr 25 at 7:57
10

Your question is very similar to this one: how to get corners of the box in latex?

\documentclass{book}
\usepackage{setspace}
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[1][]{%
  enhanced,
  opacityback=0, 
  top=10pt,
  bottom=8pt,
  code={\doublespacing},% from https://tex.stackexchange.com/a/211919/101651
  parbox=false,% from https://tex.stackexchange.com/a/228299/101651
  frame hidden,% from https://tex.stackexchange.com/a/247509/101651
  % from https://tex.stackexchange.com/a/431760/101651:
  overlay unbroken and first ={%
    \draw[thick, double] ([xshift=20pt]frame.north west) -| ([yshift=-20pt]frame.north west);
    \draw[thick, double] ([xshift=-20pt]frame.south east) -| ([yshift=20pt]frame.south east);
  }
}
\begin{document}\pagecolor{yellow!40}% from https://tex.stackexchange.com/a/25141/101651
\begin{mybox}
    Next time please add a minimal working example, that is a complete but as short as possible \LaTeX\ document which shows what you tried so far.

    Something to show indentation. Something to show indentation. Something to show indentation. Something to show indentation.
\end{mybox}
\end{document}

enter image description here

Edit: If you want the back color only in the box, leave out \pagecolor{yellow!40} and opacityback=0, and add colback=yellow!40.

I've also added sharp corners because rounded corners are the default in a tcolorbox.

\documentclass{book}
\usepackage{setspace}
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[1][]{%
  enhanced,
  top=10pt,
  bottom=8pt,
  code={\doublespacing},% from https://tex.stackexchange.com/a/211919/101651
  parbox=false,% from https://tex.stackexchange.com/a/228299/101651
  frame hidden,% from https://tex.stackexchange.com/a/247509/101651
  sharp corners,
  colback=yellow!40,
  % from https://tex.stackexchange.com/a/431760/101651:
  overlay unbroken and first ={%
    \draw[thick, double] ([xshift=20pt]frame.north west) -| ([yshift=-20pt]frame.north west);
    \draw[thick, double] ([xshift=-20pt]frame.south east) -| ([yshift=20pt]frame.south east);
  }
}
\begin{document}
\begin{mybox}
    Next time please add a minimal working example, that is a complete but as short as possible \LaTeX\ document which shows what you tried so far.

    Something to show indentation. Something to show indentation. Something to show indentation. Something to show indentation.
\end{mybox}
\end{document}

enter image description here

  • how to have a background color only within the "mybox "environnement delimited by its corners? – pzorba75 Mar 27 at 5:15
  • @pzorba75 Just leave out \pagecolor{yellow!40} and opacityback=0, and add colback=<the-color-you-like>. See my edit. – CarLaTeX Mar 27 at 5:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.