%------------ les onglets des chapitres ------------------% \newcounter{fdhauteurchapitre} \newcounter{fdpistesection} \newcounter{totalchapters} \newcounter{totalparts} \newcounter{localsectioncount} \newcounter{localchaptercount} \setcounter{totalchapters}{0} \setcounter{totalparts}{0} \newcommand{\setfdhauteurchapitre}{ \setcounter{fdhauteurchapitre}{290-15*\value{totalparts}-25*\value{totalchapters}} } \newcommand{\setfdpistesection}{ \setcounter{fdpistesection}{15*\value{localsectioncount}} } \newcommand{\fancydecorationmargeodd}{% %%% Onglet du chapitre courant A DROITE sur pages impaires \begin{psblock} \grillepage \end{psblock} \begin{psblock} \psset{unit=1mm} \put(175,\thefdhauteurchapitre){% \pscircle[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurchapitre](10,10){10} \psframe[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurchapitre](10,0)(40,20) %\MyPsBox[linestyle=none]{3cm}{2cm}{\raggedleft\fdinfochapitre} \cput[linestyle=none](16.5,10){\parbox{2.5cm}{\raggedleft\bf\fdinfochapitre}} }% \end{psblock} } \newcommand{\fancydecorationmargeeven}{% %%% Onglet du chapitre courant A GAUCHE sur pages paires \begin{psblock} \grillepage \end{psblock} \begin{psblock} \psset{unit=1mm} \put(5,\thefdhauteurchapitre){% \pscircle[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurchapitre](20,10){10} \psframe[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurchapitre](-10,0)(20,20) %\MyPsBox[linestyle=none]{3cm}{2cm}{\raggedright\fdinfochapitre} \cput[linestyle=none](14,10){\parbox{2.5cm}{\raggedright\bf\fdinfochapitre}} }% \end{psblock} } \fancyhead[RE]{\fancydecorationmargeeven} \fancyhead[RO]{\fancydecorationmargeodd} %%%%%% TOC PARTIE \newcommand{\ongletpart}[2]{ \stepcounter{totalparts} \setcounter{localchaptercount}{0}% \setfdhauteurchapitre% \setfdcouleurpartie% \begin{psblockc}% languette \psset{unit=1mm} \put(20,\thefdhauteurchapitre){% %\psframe[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurpartie](0,-3)(45,3) %\pscircle[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurpartie](45,0){3} %\pscircle[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurpartie](140,0){3} %\psframe[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurpartie](140,-3)(190,3) \rput[Bl](0,-1){\psframebox[fillstyle=none,linewidth=.1cm,framesep=.2cm,linestyle=solid,linecolor=\fdcouleurpartie,framearc=1]{\bf Partie~\Roman{totalparts}.~~#1}} %\rput[Bl](0,-1){\bf Partie~\Roman{totalparts}} }% \put(203,\thefdhauteurchapitre){% \rput[Br](0,-1){\bf page #2} } \end{psblockc} } %%%%%% TOC CHAPITRE \newcommand{\ongletchap}[2]{ % \tocongletchap{texte}{} \stepcounter{totalchapters}% \stepcounter{localchaptercount}% \setcounter{localsectioncount}{0}% \setfdhauteurchapitre% \setfdcouleurchapitre% \begin{psblockc}% la piste (traversant) \psset{unit=1mm} \put(50,\thefdhauteurchapitre){% \psline[linestyle=solid,linecolor=\fdcouleurchapitre,linewidth=0.1cm](0,10)(145,10)% %\pscircle[linestyle=solid,fillcolor=white,linewidth=.05cm,linecolor=\fdcouleurchapitre](2,10){2}% %\rput[B](2,9){\arabic{localchaptercount}}% }% \end{psblockc} \begin{psblockc}% le nom (gauche) \psset{unit=1mm} \put(20,\thefdhauteurchapitre){% \psframe[linestyle=solid,fillstyle=none,linecolor=\fdcouleurchapitre,linewidth=.1cm,framearc=1](0,0)(30,20) \cput[linestyle=none](15,10){\parbox{2.6cm}{\centering\bf #1}} }% \end{psblockc} \begin{psblockc}% l'onglet (droite) \psset{unit=1mm} \put(200,\thefdhauteurchapitre){% \pscircle[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurchapitre](5,10){10} \psframe[linestyle=none,fillstyle=solid,fillcolor=\fdcouleurchapitre](5,0)(40,20) \cput[linestyle=none](-2,10){\parbox{1cm}{\raggedleft #2}} }% \end{psblockc} } %%%%%%% TOC SECTION \newcommand{\ongletsection}[2]{% \stepcounter{localsectioncount}% \begin{psblockc} \psset{unit=1mm} \put(20,\thefdhauteurchapitre){% bonne hauteur \put(30,10){% % On roule sur la piste: % en hauteur <-- laisse tomber % yunit=.135cm %\rput(0,-\value{localsectioncount}) % et en largeur {%\psset{xunit=1.42cm} \setfdpistesection \rput(\value{fdpistesection},0){ \pscircle[linestyle=none,fillstyle=solid,linewidth=.05cm,fillcolor=\fdcouleurchapitre](0,0){2}% \rput[Bl]{-16}(.5,-3){\small #1} }}}}% \end{psblockc}} %%%% Table des matieres version onglets \makeatletter \newcommand{\listedesonglets}{\listedesongletspre\listedesongletscorps\listedesongletspost} \newcounter{totalchapterssave} \newcounter{totalpartssave} \newcommand{\listedesongletspre}{% \begin{psblockc} \grillepage%force \end{psblockc} \setcounter{totalchapterssave}{\value{totalchapters}} \setcounter{totalpartssave}{\value{totalparts}}} \newcommand{\listedesongletspost}{% \setcounter{totalchapters}{\value{totalchapterssave}} \setcounter{totalparts}{\value{totalpartssave}}} \newcommand{\listedesongletscorps}{\@starttoc{ong}} %\newcommand{\ongletcaption}[1]{} \newcommand{\tocongletchapitre}[1]{\addcontentsline{ong}{ongletchap}{#1}} \newcommand{\tocongletpart}[1]{\addcontentsline{ong}{ongletpart}{#1}} \newcommand{\tocongletsection}[1]{\addcontentsline{ong}{ongletsect}{#1}} \newcommand{\l@ongletchap}[2]{\ongletchap{#1}{#2}} \newcommand{\l@ongletpart}[2]{\ongletpart{#1}{#2}} \newcommand{\l@ongletsect}[2]{\ongletsection{#1}{#2}} \makeatother %%% Local Variables: %%% mode: latex %%% TeX-master: "../main" %%% End: