\documentclass[table,x11names,svgnames]{article}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
%------------------------------------------------------
\usepackage[portrait]{geometry}
\geometry{a4paper}
\geometry{hscale=0.9,vscale=0.875,centering}%showframe
%------------------------------------------------------
\usepackage{xcolor}

\usepackage[explicit]{titlesec}

%\ifx\pdftexversion\undefined
\ifpdf
\usepackage[pdftex]{graphicx}
\DeclareGraphicsRule{.jpg}{jpg}{*}{}
\DeclareGraphicsRule{*}{mps}{*}{}
\DeclareGraphicsRule{.eps}{eps}{*}{}
\else
\usepackage[dvips]{graphicx}
\DeclareGraphicsRule{.eps}{eps}{*}{}
\usepackage{pst-all}
\usepackage{pstricks-add}
\fi

%\usepackage[upright]{fourier}
\usepackage{charter}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pifont}
\usepackage[np]{numprint} 

\usepackage{layout}
\usepackage{fancybox}
\usepackage{tabularx}
\usepackage{lastpage}

\usepackage{stmaryrd}
\usepackage{picins}
\usepackage{eurosym}
\usepackage{slashbox}
\usepackage{paralist}
\usepackage{variations}

\usepackage{multicol}
\usepackage{multirow}
\usepackage{alterqcm} 
\usepackage{ulem}
\usepackage{etex}
\usepackage{booktabs,cellspace}
\usepackage{xlop}
\usepackage{comment}
\usepackage[framemethod=default]{mdframed}

%----------------------algo
\usepackage[french,linesnumbered,lined,algoruled]{algorithm2e_perso}
%\usepackage{minted}
%\renewcommand\theFancyVerbLine{\small\arabic{FancyVerbLine}}

%----------------------------xlop
\opset{decimalsepsymbol={,}}
\opset{voperator=bottom}
%\newcommand{\white}{\textcolor{white}}
%\newcommand{\red}{\textcolor{red}}
%\newcommand{\green}{\textcolor{green}}
%\newcommand{\blue}{\textcolor{blue}}
%\newcommand{\yellow}{\textcolor{yellow}}

\setdefaultenum{\bf 1)}{\bf a)}{\it i.}{}

%---------------------------------------------------------taille des crochets
\edef\deactivebraket{%
\noexpand\mathcode`[=\the\mathcode`[
\noexpand\mathcode`]=\the\mathcode`]
}
\def\activebraket{%
\mathcode`[="8000
\mathcode`]="8000
}
{%
\catcode`[=\active
\catcode`]=\active
\gdef[{\expandafter\Bigl\string[}
\gdef]{\expandafter\Bigr\string]}
}

%\activebraket
%\deactivebraket
%----------------------------------------------------------------------------------


%--------------------------------------------------------------------------
%                                       dessintexte{dessin}{échelle}{Texte}
\newlength{\lntxt}
\newcommand{\dessintexte}[3]{
\setlength{\lntxt}{\linewidth}
\setbox 2 =\hbox{\includegraphics[scale=#2]{#1}}
\addtolength{\lntxt}{-\wd 2}
\addtolength{\lntxt}{-50pt}
\begin{minipage}{\wd 2}
\includegraphics[scale=#2]{#1}
\end{minipage}
\hfill
\begin{minipage}{\lntxt}
#3
\end{minipage}
}
%    

%-------------------------- Mise en forme de section
\titleformat{\section}[block]
{\normalfont\sffamily\filleft}
{\shadowbox{\hspace{1cm}\bf Exercice \thesection \hspace{3cm}}}
{.5em}
{\titlerule\hspace{2mm}\bfseries \colorbox{yellow}{#1}}

\titlespacing{\section}
{0mm}{*5}{*2}[0mm]


%--------------------------pas d'indentation
\setlength{\parindent}{0pt}

\graphicspath{{Base/}{Base_brevet/}}

