4

How can i have the same border with tikzenter image description here

  • 1
    Welcome to TeX.SX! Which border are you referring to? The border around the orange colored boxes or the double line along the left and bottom margin of the page or something entirely different? – leandriis Apr 18 '21 at 10:16
  • @NABIL para tikz libraries decorations.pathmorphing and shadows will surely be a part of it. Then you will need to look for random steps and drop shadow effects from the tikz manual. – mxnc baud Apr 18 '21 at 12:07

1 Answers1

5

I don't know how complicated you want the solution to be but here is a sarting point, it might be enough for your use else many enhancements are possible

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{%
decorations.pathmorphing,shadows
}
\usepackage{multicol}
\begin{document}
\section{Propriétés Algébriques}
\tikz\node[decoration={random steps,segment length=1cm},decorate,
ultra thick,
draw=orange,fill=orange!20,
inner ysep=5mm,
drop shadow,
anchor=north west,text width=\linewidth]{%
Soient $a$ et $b$ deux réels...
\dotfill

\dotfill \begin{multicols}{2} \begin{enumerate} \item hello \item$\exp\left(a+b\right)=\exp a\times\exp b$ \item world \item$\exp\left(a-b\right)=\dfrac{\exp a}{\exp b}$ \end{enumerate} \end{multicols} \dotfill }; \end{document}

enter image description here

A very quick solution using tcolorboxpackage :

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{%
decorations.pathmorphing,shadows}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\begin{document}
\tcbset{colback=white,colframe=white,coltitle=black,fonttitle=\bfseries}
\begin{tcolorbox}[enhanced,title=My title,interior titled code={
\filldraw[decoration={random steps,segment length=1cm},decorate,draw=orange,ultra thick, fill=orange!20]
(interior.south west)rectangle(interior.north east);}]
This is a \textbf{tcolorbox}.
\tcblower
This is the lower part.
\end{tcolorbox}
\end{document}

enter image description here

mxnc baud
  • 501
  • Interesting! :) could you take your solution and apply it to the tcolorbox package...? – cmhughes Apr 18 '21 at 12:12
  • @cmhughes thank you showing interest. I figured out that you were talking about some tcolorbox style integration of my answer ? I have quickly modified an example from tcolorboxdocumentation and got this : – mxnc baud Apr 18 '21 at 12:59
  • @cmhughes I added to the answer... – mxnc baud Apr 18 '21 at 13:10
  • Looks good. I was thinking you could define a new tcolorbox in the preamble and then use it more simply in the document... – cmhughes Apr 18 '21 at 13:39
  • demonstration of what I was describing: https://tex.stackexchange.com/a/272177/6621 – cmhughes Apr 18 '21 at 14:19
  • @cmhughes Ok I know what you meant now. For sure one could do it but it was the very first time that I used the tcolorboxpackage :) I am still not very familiar with its settings :) – mxnc baud Apr 18 '21 at 19:42