4

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

2
  • 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 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 at 12:07
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

6
  • Interesting! :) could you take your solution and apply it to the tcolorbox package...?
    – cmhughes
    Apr 18 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 at 12:59
  • @cmhughes I added to the answer...
    – mxnc baud
    Apr 18 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 at 13:39
  • demonstration of what I was describing: tex.stackexchange.com/a/272177/6621
    – cmhughes
    Apr 18 at 14:19

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.