From 070cbd1a7e46296b277ce83857c27d4865ff0872 Mon Sep 17 00:00:00 2001 From: Bruno Pagani Date: Thu, 30 Jul 2020 00:38:33 +0200 Subject: [PATCH] =?UTF-8?q?Figures=C2=A0:=20possibilit=C3=A9=20de=20g?= =?UTF-8?q?=C3=A9n=C3=A9rer=20une=20table=20des=20cr=C3=A9dits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- headers_figs.sty | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/headers_figs.sty b/headers_figs.sty index b214bb7..9ec41eb 100644 --- a/headers_figs.sty +++ b/headers_figs.sty @@ -47,3 +47,19 @@ ]{caption} \usepackage{subcaption} % Sous-figures & légendes associées \captionsetup[subfigure]{margin=5pt} + +% Table des crédits +\addtotoclist[]{loc} +\DeclareRobustCommand{\credits}[1]{% + \addcontentsline{loc}{credits}{% + \ifnum\value{subfigure}>0 + \protect\numberline{\thefigure.\thesubfigure} + \else + \protect\numberline{\thefigure} + \fi + #1% + }% +} +\newcommand*{\listofcredits}{\listoftoc[Crédits des figures]{loc}} +\setuptoc{loc}{chapteratlist,totoc} +\DeclareTOCStyleEntry[level=1,indent=1.5em,numwidth=2.3em,dynnumwidth,pagenumberformat={\addfontfeatures{Numbers=Monospaced}}]{tocline}{credits}