1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
| \documentclass [fleqn,a4paper,openany]{book}
\usepackage [T1]{fontenc}
\usepackage{amssymb}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage[bookmarks=true,bookmarksnumbered=true,breaklinks=true,
hypertexnames=false,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
\makeatletter
\def\contentsline#1#2#3#4{%
\ifx\\#4\\%
\csname l@#1\endcsname{#2}{#3}%
\else
\csname l@#1\endcsname{\hyper@linkstart{link}{#4}{#2}\hyper@linkend}{%
\hyper@linkstart{link}{#4}{#3}\hyper@linkend
}%
\fi
}
\makeatother
\begin{document}
\newcounter{NumeroExerciceNew}
\renewcommand{\theNumeroExerciceNew}{\thechapter .\,\arabic{NumeroExerciceNew}}
\newcounter{NumeroSolutionNew}
\renewcommand{\theNumeroSolutionNew}{\thechapter .\,\arabic{NumeroSolutionNew}}
\newif\ifeleve
%\newcounter{NumeroExerciceNew}
\newcommand\exercicenew[1]{%
\par\medskip%
\stepcounter{NumeroExerciceNew}%
\setlength{\parindent}{0cm}%
\setlength{\hangindent}{0cm}%
\psshadowbox[linewidth=1.5pt,fillcolor=yellow!30,shadowsize=5pt,shadow=true,shadowcolor=red!20,linecolor=red,framearc=0.5]{$ \blacktriangleright $ \textbf{Exercice \thechapter .\,\arabic{NumeroExerciceNew}~: #1\ifeleve\else\label{#1-solu} \hyperref[#1-enon]{$\Rightarrow$ Corrigé}\fi}}%
\addcontentsline{exonew}{exercicenew}{\protect\numberline{\theNumeroExerciceNew}#1}%
\par
}
\newcommand*\seteleve[1]{%
\elevefalse\ifcsname eleve#1\endcsname\csname eleve#1\endcsname\fi
}
\newcommand{\solutionnew}[1]%
{%
%\hypertarget{#1-enon}{
\par%
\stepcounter{NumeroSolutionNew}%
\medskip%
\setlength{\parindent}{0cm}%
\setlength{\hangindent}{0cm}%
\par%
\psshadowbox[linewidth=1.5pt,fillcolor=blue!10,shadowsize=5pt,shadow=true,shadowcolor=blue!10,
linecolor=blue,framearc=0.5]{$ \blacktriangleright $ \textbf{Solution de l'exercice \thechapter .\,\arabic{NumeroSolutionNew}~: #1 %\begin{Prof}
\label{#1-enon} \hyperref[#1-solu]{$\Rightarrow$ \'Enoncé}
%\end{Prof}
}
}
\addcontentsline{solnew}{solutionnew}{\protect\numberline{\theNumeroSolutionNew}#1}
\par%}
}
\section{Exercices~: Réseaux}
\subsection{\'Enoncés}
\exercicenew{Spectrom\`etre \`a r\'eseau}
\exercicenew{S\'eparation angulaire}
\exercicenew{Doublet du sodium}
\exercicenew{\'Ecart de longueur d'onde}
\exercicenew{Monochromateur \`a r\'eseau}
\subsection{Corrigés}
\solutionnew{Spectrom\`etre \`a r\'eseau}
\solutionnew{S\'eparation angulaire}
\solutionnew{Doublet du sodium}
\solutionnew{\'Ecart de longueur d'onde}
\solutionnew{Monochromateur \`a r\'eseau}
\end{document} |
Partager