<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%
% Copyright (C) 2012-2024 by Denis Bitouz'e &lt;denis.bitouze@univ-littoral.fr&gt;
% -------------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Denis Bitouz'e.
%
% This work consists of the files yathesis.dtx and yathesis.ins
% and the derived filebase yathesis.cls.
%
%&lt;*internal&gt;
\iffalse
%&lt;/internal&gt;
%&lt;*readme&gt;
-----------------------------------------------------------------------

- `yathesis` --- Yet Another Thesis Class, version 1.0.12
- E-mail: `denis.bitouze@univ-littoral.fr`
- Released under the LaTeX Project Public License v1.3c or later. See
  http://www.latex-project.org/lppl.txt

-----------------------------------------------------------------------

**The `yathesis` bundle provides a LaTeX class file to help to write a thesis
following French rules.**

The class is supplied in `.dtx` format. If you want to unpack the `.dtx`
yourself, running:

    pdftex yathesis.dtx

will extract the class whereas:

    pdflatex yathesis.dtx

will extract it and also typeset the documentation of the code.

Typesetting the documentation of the class requires:

- a number of packages in addition to those needed to use the `yathesis`
   classes.  To compile the documentation without error, you will need, among
   others, my personal (dirty) package `denisbdoc` for documenting the classes
   I've written.
- a complete `pdflatex` run of `these.tex` to be found in the
  `.../doc/latex/yathesis/french/exemples/specimen/a-plat` directory,
  with `yathesis-demo` package load at first place. If `latexmk` is available,
  it is easier to run:

      latexmk -g -norc -r ./latexmkrc  -jobname=these -pdflatex="pdflatex %O '\AddToHook{begindocument/before}{\RequirePackage{yathesis-demo}}\input{%S}'" these.tex

- to compile `yathesis-fr.tex` to be found in the
  `.../doc/latex/yathesis/french/documentation` directory as follows:

      latexmk -norc -r ./latexmkrc yathesis-fr
%&lt;/readme&gt;
%&lt;*ctanomat&gt;
% This is a description file for ctan-o-mat.
% It manages uploads of a package to
% CTAN -- the Comprehensive TeX Archive Network.
%
% The syntax is roughly oriented towards (La)TeX.
% Two form of the macros are used. The simple macros take one argument
% in braces. Here the argument may not contain embedded macros.
%
% The second form uses an environment enclosed in \begin{}/\end{}.
% In the long text fields logo macros can be used.
%
% You should enter your values between the begin and the end of the
% named type.
% -------------------------------------------------------------------------
% This field contains the CTAN id of the package.
% The value is optional.
% The value is restricted to 32 characters.
\pkg{yathesis}
% -------------------------------------------------------------------------
% This field contains the version of the package.
% The value is optional.
% The value is restricted to 32 characters.
\version{1.0.12 2024-03-07}
% -------------------------------------------------------------------------
% This field contains the name of the author(s).
% The value is optional.
% The value is restricted to 128 characters.
\author{Denis BitouzÃ©}
% -------------------------------------------------------------------------
% This field contains the email address of the uploader.
% The value is an email address.
% The value is restricted to 255 characters.
\email{denis.bitouze@univ-littoral.fr}
% -------------------------------------------------------------------------
% This field contains the name of the uploader.
% The value is restricted to 255 characters.
\uploader{Denis BitouzÃ©}
% -------------------------------------------------------------------------
% This field contains the directory on CTAN.
% The value is optional.
% The value is restricted to 255 characters.
\ctanPath{/macros/latex/contrib/yathesis}
% -------------------------------------------------------------------------
% This field contains the license.
% The value is optional.
% The value is restricted to 2048 characters.
% Multiple values are allowed.
\license{lppl1.3c}
% -------------------------------------------------------------------------
% This field contains the URL of the home page.
% The value is optional.
% The value is a URL.
% The value is restricted to 255 characters.
% Multiple values are allowed.
\home{}
% -------------------------------------------------------------------------
% This field contains the URL of the bug tracker.
% The value is optional.
% The value is a URL.
% The value is restricted to 255 characters.
% Multiple values are allowed.
\bugtracker{https://github.com/dbitouze/yathesis/issues/}
% -------------------------------------------------------------------------
% This field contains the support channel.
% The value is optional.
% The value is a URL.
% The value is restricted to 255 characters.
% Multiple values are allowed.
\support{}
% -------------------------------------------------------------------------
% This field contains the version management.
% The value is optional.
% The value is a URL.
% The value is restricted to 255 characters.
% Multiple values are allowed.
\repository{https://github.com/dbitouze/yathesis/}
% -------------------------------------------------------------------------
% This field contains the developer's channel.
% The value is optional.
% The value is a URL.
% The value is restricted to 255 characters.
% Multiple values are allowed.
\development{}
% -------------------------------------------------------------------------
% This field contains the update indicator; true for update.
% The value is optional.
% The value is restricted to 8 characters.
\update{true}
% -------------------------------------------------------------------------
% This field contains the topics id.
% The value is optional.
% The value is restricted to 1024 characters.
% Multiple values are allowed.
\topic{}
% -------------------------------------------------------------------------
% This field contains the text for the mail announcement.
% The value is optional.
% The value is restricted to 8192 characters.
\begin{announcement}
\end{announcement}
% -------------------------------------------------------------------------
% This field contains the one-liner for the package.
% The value is optional.
% The value is restricted to 128 characters.
\summary{A LaTeX class for writing a thesis following French rules}
% -------------------------------------------------------------------------
% This field contains the descriptive abstract for the package.
% The value is optional.
% The value is restricted to 4096 characters.
\begin{description}
The purpose of yathesis is to facilitate the typesetting of theses prepared in France, whatever the disciplines and institutes. It implements most notably recommendations from the Ministry of Higher Education and Research, and this transparently to the user. It has also been designed to (optionally) take advantage of powerful tools available in LaTeX, including packages:

- [`biblatex`](https://www.ctan.org/pkg/biblatex) for the bibliography;
- [`glossaries`](https://www.ctan.org/pkg/glossaries) for the glossary, list of acronyms and symbols list.

The `yathesis` class, based on the book class, aims to be both simple to use and, to some extent, (easily) customizable.

`yathesis` comes with templates and samples in the `doc/latex/yathesis/french/exemples/` directory in the distribution. They can also be tested on Overleaf ([template](www.overleaf.com/latex/templates/template-of-a-thesis-written-with-yathesis-class/nhtmtthnqwtd) and [specimen](www.overleaf.com/latex/examples/sample-of-a-thesis-written-with-yathesis-class/nbcfvfqgnjfq)).

Note: The â€œyaâ€ in the package name stands for â€œyet anotherâ€.
\end{description}
% -------------------------------------------------------------------------
% This field contains the note to the CTAN upload managers.
% The value is optional.
% The value is restricted to 2048 characters.
\begin{note}
\end{note}
% -------------------------------------------------------------------------
% This field contains the archive file.
% The value is the file name of the archive to be uploaded.
% It may have a relative or absolute directory.
\file{../dtx-forge/yathesis.zip}
%&lt;/ctanomat&gt;
%&lt;*changelog&gt;
# [Unreleased]

# [1.0.12] - 2024-03-07

## Changed
- Documentation improved
- Code more robust

# [1.0.11] - 2023-02-24

## Changed
- Some internals for future releases of `etoc` (thanks to Jean-FranÃ§ois Burnol).

## Fixed
- Typos in the documentation (thanks to kitanokuma).

# [1.0.10] - 2022-06-13

## Added
- (Far to perfect) Documentation of the code available as a PDF file.

## Changed
- Complete reworked of the `.dtx` source file in order to provide the documented code as a PDF file.

## Fixed
- Bug gh #91 (https://git.io/JMrK8).
- Bug gh #92 (https://github.com/dbitouze/yathesis/issues/92).

# [1.0.9] - 2021-10-13

## Fixed
- Bug gh #90 (https://git.io/JKO3L).
- Bug gh #87 (https://git.io/JKO3Z).
- Bug gh #86 (https://git.io/JKO3W).

# [1.0.8] - 2021-07-13

## Fixed
- Bug gh #85 (https://git.io/JCTjv).
- Bug gh #84 (https://git.io/JCTpu).
- Bug gh #83 (https://git.io/JYfz8).

## Changed
- The fix of #85 above renders ineffective the `\includeonly` command when the
  option `\localbibs` is used. This is an incompatible change but only for
  a command that is used only temporarily, so we don't increment the major
  version number.
- Again expose `\listoflistings` in the samples.

# [1.0.7] - 2021-03-24

## Removed
- Useless and confusing file in the samples removed (no functional changes).

## Changed
- Don't expose `\listoflistings` in the samples (bug gh #83,
  https://git.io/JYfz8).

# [1.0.6] - 2021-03-23

## Added
- Command allowing, for each chapter, to specify a text inserted between its
  head and its possible automatic local table of contents (issue gh #82,
  https://git.io/JYeVe).

## Changed
- Table listing the members of the committee:
  - with \textwidth as width,
  - with  3 and not 4 columns in case president is not specified.
- Documentation revised.

## Fixed
- Bug gh #81 (https://git.io/JYeVY).

# [1.0.5] - 2021-02-05

## Changed
- The class now relies on the new LaTeX core hooks.
- Documentation revised.

## Fixed
- Setting the main language was not taken into account by some packages
  (e.g. `csquotes`).

# [1.0.4] - 2020-10-14

## Changed
- Documentation revised.
- The class now relies on `datetime2` and not on `datetime`.

## Fixed
- Bug gh #76 (https://git.io/JTTpX).
- Bug gh #77 (https://git.io/JTTpu).
- Bug gh #78 (https://git.io/JTTpQ).

# [1.0.3] - 2020-06-16

## Changed
- Documentation revised.
- Specimens improved.
- Package `titlesec` used instead of `titleps`: possible (hopefully slight) layout discrepancies.

## Fixed
- Bug gh #74 (https://git.io/Jf64U).
- Bug gh #65 (https://git.io/Jf64k), continuation and (hopefully) ending.

# [1.0.2] - 2020-04-13

## Changed

- Specimens now highlight the automatic local tocs and local bibs features of
  the class.
- Verso of the asbtract page now with empty footer.
- Completion file for TeXstudio improved and updated.

## Fixed
- Switches between pages styles robustified.
- Bug #65 now for bibtex as well.
- French rules were applied to glossaries and acronyms even in case of
  `mainlanguage=english`.
- Subtitles were too close to multiline titles.

# [1.0.1] - 2020-03-28

## Changed
- Documentation revised.
- Specimens improved.

## Fixed
- Bug gh #73.


# [1.0.0] - 2020-03-26

## Added
- (Partial) CHANGELOG file (following https://keepachangelog.com/en/1.0.0/).
- Semantic versionning (following https://semver.org/).
- Colophon automatically added to the thesis, with possibility to:
   - remove it,
   - change:
     - its location from 2nd cover to 3rd one,
     - its content.

## Changed
- `\disclaimer` replaced by (and alias of) `\disclaimertext`.
- Warnings and error messages now contain (expected) accented characters.

## Fixed
- Several bug fixes (among others gh #65 and #67).


# [0.99u] - 2019-03-28

## Added
- `\maketitle` option `noaim` for (slight) customization of the title pages.
- `\institute`, `\coinstitute` and `\company` option `nologo` for (slight)
  customization of the title pages (gh #51).

## Changed
- Documentation revised and extended.
- Key expressions "Titre de la thÃ¨se" and "Titre de lâ€™habilitation Ã&nbsp; diriger les
  recherches" (and English equivalents) now empty.
- Key expression "Directeurs" (and English equivalent) introducing the list of
  the "HDR" directors now replaced by "Habilitation dirigÃ©e par" (and English
  equivalent).
- Options `noinstitute`, `nodoctoralschool`, `nolaboratory`, `nodate`,
  `noacademicfield`: now turn off on title pages the display of the
  corresponding elements (as well as the co-institute for `noinstitute` and
  specialty for `noacademicfield`).
- On the title page (s) in French, automatic gender agreement in expressions
  keys introducing the groups member of the committee.

## Fixed
- Several bug fixes (among others gh #43).


# [0.99t] - 2018-07-09

## Fixed
- Several bug fixes.


# [0.99s] - 2018-06-22

## Fixed
- Several bug fixes (among others gh #58 and #60).


# [0.99s] - 2018-06-21

## Fixed
- Several bug fixes (among others gh #59).


# [0.99r] - 2018-06-02

## Fixed
- Several bug fixes.


# [0.99q] - 2018-05-04

## Removed
- Useless files on CTAN (no functional changes).


# [0.99q] - 2018-04-10

## Fixed
- Several bug fixes (among others gh #57).


# [0.99p] - 2016-12-08

## Added
- `\chapter` and `\section` have an extra optional argument for an alternative
  title in header different from the one in the ToC.
- Simplification of the use of all starred structuring commands (their
  substructuring commands don't need to be starred).

## Changed
- Documentation revised and extended.


# [0.99o] - 2016-10-30

## Added
- Automatic local (by chapter) tables of contents (thanks to Jean-FranÃ§ois
  Burnol's etoc and help): option `localtocs` (gh #45).
- Automatic local (by chapter) bibliographies: option `localbibs`.

## Changed
- Documentation revised and revised and extended. (index of concepts).
- English translation of "MCF" ("Associate Professor" instead of "Lecturer").

## Removed
- Useless warning from `iflang` package.

## Fixed
- Several bug fixes.


# [0.99n] - 2016-06-11

## Changed
- Documentation revised and extended.
- Reorganization and change of names of specimens and templates.


# [0.99m] - 2016-05-22

## Added
- Documentation can be compiled with `pdflatex`.
- Specimens and templates included in the PDF of the documentation as `.zip`
  archive.


## Changed
- Documentation revised and extended.
- Reorganization and change of names of specimens and templates.


# [0.99l] - 2014-10-23

## Changed
- Documentation revised and extended.
- Reorganization and change of names of specimens and templates.

# [0.99k] - 2014-10-01

## Added
- Macro \submissiondate

## Changed
- Documentation revised and extended.
- Page numbers on first page of each chapters (with numberred pages).

## Removed
- Class option `bookmark`.

## Fixed
- Several bug fixes.


# [0.99j] - 2014-07-18

## Added
- Initial CTAN release of the `yathesis` class (2014-07-27).
%&lt;/changelog&gt;
%&lt;*internal&gt;
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%&lt;/internal&gt;
%&lt;*class|install&gt;
\def\yathesisversion{1.0.12}
\def\yathesisdate{2024-03-07}
%&lt;/class|install&gt;
%&lt;*install&gt;
\input l3docstrip.tex
\Msg{********************************************************}
\Msg{* Installation}
\Msg{* Class: yathesis \yathesisdate\space v\yathesisversion}
\Msg{* that helps to write thesis following French rules (DB)}
\Msg{********************************************************}
\keepsilent
\askforoverwritefalse
\preamble
-----------------------------------------------------------------------
yathesis --- Yet Another Thesis Class
E-mail: denis.bitouze@univ-littoral.fr
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------------
\endpreamble
\postamble
% Copyright (C) 2012-2021 by Denis BitouzÃ© &lt;denis.bitouze@univ-littoral.fr&gt;
----------------------------------------------------------------------------------
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
  http://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of LaTeX
version 2005/12/01 or later.

This work has the LPPL maintenance status `maintained'.

The Current Maintainer of this work is Denis BitouzÃ©.

This work consists of the file  yathesis.dtx
          and the derived files yathesis.cls,
                                yathesis.ins,
                                yathesis.pdf,
                                and a number of configuration files.
\endpostamble
%
\def\YAD@classname{\jobname}
\def\YAD@packagename{\YAD@classname doc}
\def\YAD@sampletemplates{\jobname-samples-templates}
\def\YAD@addons{addons}
% \def\YAD@flattemplate{flat-template}
% \def\YAD@flatsample{flat-sample}
% \def\YAD@treetemplate{tree-template}
% \def\YAD@sample{tree-sample}
%&lt;/install&gt;
%&lt;*install&gt;
\def\YAD@documentation{documentation}
\def\YAD@examples{exemples}
\def\YAD@sample{specimen}
\def\YAD@template{canevas}
\def\YAD@flattemplate{\YAD@examples/\YAD@template/a-plat}
\def\YAD@flatsample{\YAD@examples/\YAD@sample/a-plat}
\def\YAD@treetemplate{\YAD@examples/\YAD@template/en-arborescence}
\def\YAD@treesample{\YAD@examples/\YAD@sample/en-arborescence}
%&lt;/install&gt;
%&lt;*install&gt;
\usedir{.}
\generate{
  \nopreamble\nopostamble
  \file{\YAD@classname.pkg}{\from{\jobname.dtx}{ctanomat}}
}%
\usedir{doc/latex/\YAD@classname}
\generate{
  \nopreamble\nopostamble
  \file{README.md}{\from{\jobname.dtx}{readme}}
}%
\generate{
  \nopreamble\nopostamble
  \file{CHANGELOG.md}{\from{\jobname.dtx}{changelog}}
}%
\usedir{tex/latex/\YAD@classname}
\generate{%
  \file{\YAD@classname.cls}{\from{\jobname.dtx}{class}}
  \file{\YAD@classname-demo.sty}{\from{\jobname.dtx}{demopkg}}
  \file{\YAD@classname-translations.tex}{\from{\jobname.dtx}{translations}}
}%
%&lt;/install&gt;
%&lt;install&gt;\endbatchfile
%&lt;*internal&gt;
\usedir{source/latex/\YAD@classname}
\generate{
  \file{\YAD@classname.ins}{\from{\jobname.dtx}{install}}
  \file{\YAD@classname.drv}{\from{\jobname.dtx}{driver}}%
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@flattemplate}
\generate{
  \nopreamble\nopostamble
  \file{latexmkrc}{\from{\jobname.dtx}{samples-templates-latexmkrc}}
  \file{these.tex}{\from{\YAD@sampletemplates.dtx}{flat-template}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@flatsample}
\generate{
  \nopreamble\nopostamble
  \file{latexmkrc}{\from{\jobname.dtx}{samples-templates-latexmkrc}}
  \file{these.tex}{\from{\YAD@sampletemplates.dtx}{flat-sample}}
  \file{bibliographie.bib}{\from{\YAD@sampletemplates.dtx}{bibliography-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample}
\generate{
  \nopreamble\nopostamble
  \file{latexmkrc}{\from{\jobname.dtx}{samples-templates-latexmkrc}}
  \file{these.tex}{\from{\YAD@sampletemplates.dtx}{these-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample/configuration}
\generate{
  \nopreamble\nopostamble
  \file{characteristics.tex}{\from{\YAD@sampletemplates.dtx}{characteristics-sample}}
  \file{thesis.cfg}{\from{\YAD@sampletemplates.dtx}{cfg-sample}}
  \file{macros.tex}{\from{\YAD@sampletemplates.dtx}{macros-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample/corps}
\generate{
  \nopreamble\nopostamble
  \file{conclusion.tex}{\from{\YAD@sampletemplates.dtx}{conclusion-sample}}
  \file{conclusionI.tex}{\from{\YAD@sampletemplates.dtx}{conclusionI-sample}}
  \file{position-problemeI.tex}{\from{\YAD@sampletemplates.dtx}{position-problemeI-sample}}
  \file{developpementI.tex}{\from{\YAD@sampletemplates.dtx}{developpementI-sample}}
  \file{position-problemeII.tex}{\from{\YAD@sampletemplates.dtx}{position-problemeII-sample}}
  \file{conclusionII.tex}{\from{\YAD@sampletemplates.dtx}{conclusionII-sample}}
  \file{developpementII.tex}{\from{\YAD@sampletemplates.dtx}{developpementII-sample}}
  \file{introduction.tex}{\from{\YAD@sampletemplates.dtx}{introduction-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample/liminaires}
\generate{
  \nopreamble\nopostamble
  \file{dedicaces.tex}{\from{\YAD@sampletemplates.dtx}{dedications-sample}}
  \file{epigraphes.tex}{\from{\YAD@sampletemplates.dtx}{epigraphs-sample}}
  \file{avant-propos.tex}{\from{\YAD@sampletemplates.dtx}{foreword-sample}}
  \file{avertissement.tex}{\from{\YAD@sampletemplates.dtx}{caution-sample}}
  \file{remerciements.tex}{\from{\YAD@sampletemplates.dtx}{acknowledgments-sample}}
  \file{resumes.tex}{\from{\YAD@sampletemplates.dtx}{abstract-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample/annexes}
\generate{
  \nopreamble\nopostamble
  \file{juridique.tex}{\from{\YAD@sampletemplates.dtx}{juridique-sample}}
  \file{listings.tex}{\from{\YAD@sampletemplates.dtx}{listings-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample/annexes/programmes}
\generate{
  \nopreamble\nopostamble
  \file{factorielle.c}{\from{\YAD@sampletemplates.dtx}{factorielle-sample}}
  \file{heure.c}{\from{\YAD@sampletemplates.dtx}{heure-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treesample/auxiliaires}
\generate{
  \nopreamble\nopostamble
  \file{acronymes.tex}{\from{\YAD@sampletemplates.dtx}{acronyms-sample}}
  \file{glossaire.tex}{\from{\YAD@sampletemplates.dtx}{glossary-sample}}
  \file{symboles.tex}{\from{\YAD@sampletemplates.dtx}{symbols-sample}}
  \file{bibliographie.bib}{\from{\YAD@sampletemplates.dtx}{bibliography-sample}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treetemplate}
\generate{
  \nopreamble\nopostamble
  \file{latexmkrc}{\from{\jobname.dtx}{samples-templates-latexmkrc}}
  \file{these.tex}{\from{\YAD@sampletemplates.dtx}{these-master}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treetemplate/configuration}
\generate{
  \nopreamble\nopostamble
  \file{characteristics.tex}{\from{\YAD@sampletemplates.dtx}{characteristics-master}}
  \file{thesis.cfg}{\from{\YAD@sampletemplates.dtx}{cfg-master}}
  \file{macros.tex}{\from{\YAD@sampletemplates.dtx}{macros-master}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treetemplate/auxiliaires}
\generate{
  \nopreamble\nopostamble
  \file{bibliographie.bib}{\from{\YAD@sampletemplates.dtx}{bibliography-master}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treetemplate/annexes}
\generate{
  \nopreamble\nopostamble
  \file{annexeI.tex}{\from{\YAD@sampletemplates.dtx}{annexe-masterI}}
  \file{annexeII.tex}{\from{\YAD@sampletemplates.dtx}{annexe-masterII}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treetemplate/corps}
\generate{
  \nopreamble\nopostamble
  \file{conclusion.tex}{\from{\YAD@sampletemplates.dtx}{conclusion-master}}
  \file{introduction.tex}{\from{\YAD@sampletemplates.dtx}{introduction-master}}
}%
\usedir{doc/latex/\YAD@classname/french/\YAD@treetemplate/liminaires}
\generate{
  \nopreamble\nopostamble
  \file{dedicaces.tex}{\from{\YAD@sampletemplates.dtx}{dedications-master}}
  \file{epigraphes.tex}{\from{\YAD@sampletemplates.dtx}{epigraphs-master}}
  \file{remerciements.tex}{\from{\YAD@sampletemplates.dtx}{acknowledgments-master}}
  \file{resumes.tex}{\from{\YAD@sampletemplates.dtx}{abstract-master}}
}%
\usedir{doc/latex/\YAD@classname/\YAD@addons/completion}
\generate{%
  \nopreamble\nopostamble
  \file{\YAD@classname.cwl}{\from{\jobname.dtx}{class-cwl}}
}%
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%&lt;/internal&gt;
% \fi
% \iffalse
%&lt;*driver&gt;
\ProvidesFile{yathesis.dtx}
\documentclass[full,english,french,draft]{l3doc}
\usepackage[a4paper,inner=5cm,landscape]{geometry}
\usepackage[lining]{libertine}
\setmonofont[Scale=0.85]{GoMono}
\usepackage[yad]{denisbdoc}
\makeatletter
\@ifpackageloaded{glossaries}{%
}{%
  \usepackage[xindy,toc,hyperfirst=false]{glossaries}%
  \makeglossaries
  \setglossarystyle{indexhypergroup}
  \setacronymstyle{long-sc-short}
}
\makeatother
\addbibresource{yathesis.bib}
%
% Comme il est inutile que les modifications d'inclusion/exclusion
% (Ã—\includeallÃ—/Ã—\includeonlyÃ—) des diffÃ©rents fichiers esclaves de la
% documentation soient versionnÃ©es, elles ne se font dÃ©sormais plus directement
% incluses dans le prÃ©sent \File{yathesis.dtx}, mais dans le fichier non
% versionnÃ© \File{includeall-includeonly.tex}. Ce fichier n'est inclus que s'il
% existe et, dans le cas contraire, tous les fichiers esclaves sont inclus.
\InputIfFileExists{includeall-includeonly}{}{}
%
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%&lt;/driver&gt;
% \fi
%
% \CheckSum{4290}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&amp;
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \&lt;
%   Equals        \=     Greater than  \&gt;     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%   \DoNotIndex{%
%   \newcommand,\newenvironment,\begin,\end,\acrpluralsuffix,\acrshort,\active,\addlinespace,\advance,\AtEndDocument,\begingroup,\caption,\catcode,\ClassInfo,\color,\colorlet,\cr,\DeclareGraphicsExtensions,\declaretheorem,\declaretheoremstyle,\def,\definecolor,\do,\edef,\else,\emph,\endgroup,\endVerbatimOut,\expandafter,\fi,\floatsetup,\footnotesize,\gls,\glsentrylong,\glspluralsuffix,\glsshorttok,\graphicspath,\hide,\ifluatex,\includegraphics,\InputIfFileExists,\intertitle,\killienc,\label,\LaTeX,\linewidth,\LoadClass,\loadglsentries,\lstinputlisting,\lstMakeShortInline,\lstset,\LTXtable,\makeglossaries,\mdfdefinestyle,\mdfsetup,\medskipamount,\meta,\multicolumn,\noexpand,\normalfont,\nothing,\PassOptionsToClass,\PassOptionsToPackage,\ProcessOptions,\protect,\raisebox,\relax,\renewcommand,\RequirePackage,\temp,\TeX,\textbf,\textlangle,\textrangle,\textsc,\textsf,\texttt,\textup,\the,\tmp,\to,\todoformat,\todos,\ttdefault,\ttfamily,\typeout,\uccode,\uppercase,\VerbatimOut,\WithSuffix,\LoadClassWithOptions,\DeclareOption,\xspace,\undefined,\newif,\nothtfalse,\nothttrue,\HCode,\ifnotht,\ifx,\@bsphack}
%   \DoNotIndex{%
%   \@documentclasshook,\@empty,\@esphack,\@tempa,\\,\actualchar,\baselineskip,\boolean,\c@CodelineNo,\c@HD@hypercount,\count@,\Describe@Option,\Describe@ShortCut,\encapchar,\endoption,\endshortcut,\endtrivlist,\equal,\fvset,\g@addto@macro,\global,\hbox,\HD@target,\HDorg@encapchar,\hologo,\if@inlabel,\ignorespaces,\index,\input,\item,\leavevmode,\let,\levelchar,\llap,\long,\loop,\Lsmcp,\lstdefinestyle,\lstnewenvironment,\m@cro@YT,\m@ne,\macro@cnt,\MacroTopsep,\makelabel,\MakePrivateLetters,\marginnote,\marginpar,\newboolean,\nobreak,\or,\PackageWarning,\PrintDescribeEnv,\PrintDescribeOption,\PrintDescribeShortCut,\PrintEnvName,\PrintOptionName,\PrintShortCutName,\ProvidesFile,\raggedleft,\repeat,\reversedvideodbend,\saved@macroname,\setboolean,\sffamily,\shortcut,\space,\special@index,\SpecialMainOptionIndex,\SpecialMainShortCutIndex,\SpecialOptionIndex,\SpecialShortCutIndex,\string,\strut,\textbelow,\textsl,\topsep,\trivlist,\VerbatimEnvironment,\vss,\vtop,\xspaceaddexceptions,\par}
%
% \DoNotIndex{\@cclvi,\@ne,\@tempcnta,\@whilenum,\toks@,\z@}
%
% \DoNotIndex{\addbibresource,\biolinumKeyGlyph,\DeclareRobustCommand,\ClassWarning,\DescribeOption,\DescribeShortCut,\ifcase,\ifnum,\ifthenelse,\option,\pagestyle}
%
% \def\yathesisversion{1.0.12}
% \def\yathesisdate{2024-03-07}
%
% \title{\textsf{yathesis} : classe \LaTeX{} pour la rÃ©daction de thÃ¨ses\\
% selon les (des) rÃ¨gles en vigueur en France\thanks{Ce fichier dÃ©crit la version
% \yathesisversion, rÃ©visÃ©e pour la derniÃ¨re fois le
% \DTMdate{\yathesisdate}.}\\[.5cm]ImplÃ©mentation%
% }
% \author{Denis BitouzÃ©\thanks{E-mail: denis.bitouze@univ-littoral.fr}}
% \date{\DTMdate{\yathesisdate}}
%
% \maketitle
%
% \begin{documentation}
%
% \end{documentation}
%
% \begin{implementation}
%
%^^A The following implementation is for both \yatcl{} and for \yatpa (the
%^^A latter just used for documenting the former). Code concerning:
%^^A \begin{description}
%^^A \item[\yatcl{} only] is between \metaimplementation{*class} and
%^^A   \metaimplementation{/class} tags,
%^^A \item[\yatpa only] is between \metaimplementation{*package} and
%^^A   \metaimplementation{/package} tags,
%^^A \item[both \yatcl{} and \yatpa] is between
%^^A \metaimplementation{*package\textbar class} and
%^^A   \metaimplementation{/package\textbar class} tags.
%^^A \end{description}
%
%^^A Please note that the following implementation is far from being well
%^^A documented. This may be improved in the future.
%
% \section{DÃ©claration des options}
%
%    \begin{macrocode}
%&lt;*class&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{yathesis}[\yathesisdate\space v\yathesisversion\space Yet another class for writing thesis (DB)]
%    \end{macrocode}
%
% Pour pouvoir disposer d'autant de \enquote{flots} d'Ã©criture dans
% des fichiers annexes que nÃ©cessaire.
%    \begin{macrocode}
\ExplSyntaxOn
\sys_if_engine_pdftex:T {\RequirePackage{morewrites}}
\ExplSyntaxOff
%    \end{macrocode}
% Pour pouvoir dÃ©finir des macros dont les arguments puissent Ãªtre
% spÃ©cifiÃ©s sous la forme Ã—clÃ©=Ã—\meta{valeur}, tant en argument de
% Ã—\documentclassÃ— que de macros et environnements de la classe.
%    \begin{macrocode}
\RequirePackage{pgfopts}[2011/06/02]%
%    \end{macrocode}
% Pour disposer d'une boÃ®te Ã&nbsp; outils de programmation
%    \begin{macrocode}
\RequirePackage{etoolbox}[2011/01/03]%
%    \end{macrocode}
% Extension de \package{etoolbox} permettant de patcher des
% commandes Ã&nbsp; argument(s) optionnel
%    \begin{macrocode}
\RequirePackage{xpatch}[2012/10/02]%
%    \end{macrocode}
% Assignation Ã—\letÃ— pour macros Ã&nbsp; arguments optionnels amÃ©liorÃ©e
%    \begin{macrocode}
\RequirePackage{letltxmacro}[2010/09/02]%
%    \end{macrocode}
% DÃ©finitions avec deux arguments optionnels
%    \begin{macrocode}
\RequirePackage{twoopt}[1999/04/12]%
%    \end{macrocode}
% Pour la gestion des tests conditionnels
%    \begin{macrocode}
\RequirePackage{xifthen}[2009/04/17]%
%    \end{macrocode}
%
%    \begin{macrocode}
\newbool{YAD@cosupervisor@or@comonitor}
\newbool{YAD@inprogress@work@star}
\newbool{YAD@inprogress@work}
\newbool{YAD@submitted@work}
\newbool{YAD@submitted@work@star}
\newbool{YAD@final@work}
\newbool{YAD@draft}
%
% \newbool{YAD@frenchabstract@used}
\newbool{YAD@output@paper}
\newbool{YAD@output@paper@star}
\newbool{YAD@in@footnote}
\newbool{YAD@second@title}
\newbool{YAD@second@abstract}
\newbool{YAD@maketitle@used}
\newbool{YAD@keywords@used}
\newbool{YAD@introduction@used}
\newbool{YAD@introduction@empty}
\newbool{YAD@conclusion@used}
\newbool{YAD@conclusion@empty}
\newbool{YAD@makeabstract@used}
\newbool{YAD@second@abstract@used}
\newbool{YAD@abstract@used}
\newbool{YAD@main@abstract@empty}
\newbool{YAD@second@abstract@empty}
\newbool{YAD@tableofcontents@used}
\newbool{YAD@printbibliography@used}
\newbool{YAD@two@titles}
\newbool{YAD@cover@page}
\newbool{YAD@supervisor@specified}
\newbool{YAD@committeepresident@specified}
\newbool{YAD@symbols@isolated}
\newbool{YAD@logo@before}
\newbool{YAD@valid@day}
\newbool{YAD@valid@month}
\newbool{YAD@valid@year}
\newbool{YAD@mainmatter@used}
\newbool{YAD@mainmatter}
\newbool{YAD@backmatter}
\newbool{YAD@localtocs}%
\newbool{YAD@localbibs@used}%
\newbool{YAD@nextwithlocaltoc}%
\newbool{YAD@nonnumbered@chapter}%
\newbool{YAD@nonnumbered@section}%
\newbool{YAD@nonnumbered@subsection}%
\newbool{YAD@nonnumbered@subsubsection}%
\newbool{YAD@nonnumbered@paragraph}%
\newbool{YAD@nonnumbered@subparagraph}%
\newbool{YAD@colophon}%
%
\newlength{\cmdKV@YAD@logoheight}
\newlength{\YAD@max@logoheight}
\newlength{\YAD@default@logoheight}
\newlength{\YAD@titleboxheight}%
\newlength{\YAD@titleboxwidth}%
\newlength{\YAD@otherboxheight}%
\newlength{\YAD@laboratory@width}%
%
\setlength\YAD@default@logoheight{1.5cm}%
\setlength\cmdKV@YAD@logoheight{\YAD@default@logoheight}%
\setlength\YAD@max@logoheight{\cmdKV@YAD@logoheight}%
%
\newsavebox{\YAD@titlebox}%
\newsavebox{\YAD@beforetitlebox}%
\newsavebox{\YAD@aftertitlebox}%
\newsavebox{\YAD@abstract@mainlanguage}%
\newsavebox{\YAD@abstract@secondarylanguage}%
%
\newcounter{YAD@abstracts}%
\newcounter{YAD@warnings}%
\setcounter{YAD@abstracts}{0}%
\setcounter{YAD@warnings}{0}%
%
\def\YAD@mainlanguage{french}%
\def\YAD@secondarylanguage{english}%
\def\YAD@tocdepth{subsection}%
\def\YAD@secnumdepth{subsection}%
\def\YAD@mainkeywords{\YAD@generic@argument@translate{keywords}}%
\def\YAD@secondarykeywords{\YAD@generic@argument@translate{keywords}}%
\def\YAD@global@sepcorpaffil@french{}%
\def\YAD@global@sepcorpaffil@english{}%
%    \end{macrocode}
% On dÃ©finit une marco dans laquelle sera stockÃ©e le style du cadre figurant
% autour du titre de la thÃ¨se sur les pages de titre.
% \begin{macro}{\cmdKV@YAD@frametitle}
%    \begin{macrocode}
\def\cmdKV@YAD@frametitle{fbox}%
%    \end{macrocode}
% \end{macro}
%
% On dÃ©finit la macro Ã—\YAD@ClassErrorÃ— qui est essentiellement identique
% Ã&nbsp; Ã—\ClassErrorÃ—, sauf que les erreurs dÃ©finies par elle sont dÃ©sactivÃ©es si
% l'une ou l'autre des options Ã—noerrorÃ—, Ã—version=draftÃ—, Ã—version=inprogressÃ—
% ou Ã—version=inprogress*Ã— est passÃ©e Ã&nbsp; la \yatcl{}.
%    \begin{macrocode}
\newcommand{\YAD@generic@text}{%
  Un texte gÃ©nÃ©rique risque d'Ãªtre affichÃ© Ã&nbsp; la place.\MessageBreak%
}%
\newcommand{\YAD@quiet@text}[1]{%
  Pour ne plus Ãªtre importunÃ©(e) par la prÃ©sente erreur,\MessageBreak%
  on peut passer l'option\MessageBreak%
  \space\space`#1'\MessageBreak%
  Ã&nbsp; la classe `yathesis', mais cela peut sÃ©rieusement\MessageBreak%
  altÃ©rer son fonctionnement : option Ã&nbsp; utiliser\MessageBreak%
  \space\space\space\space/Ã&nbsp; ses risques et pÃ©rils !/%
}%
\newcommand{\YAD@extra@help@text}{%
  \MessageBreak%
  Consulter la documentation de la classe `yathesis'\MessageBreak%
  pour plus de precisions.%
}%
\newcommand{\YAD@ClassError}{\@ifstar{\@tempswatrue\@YAD@ClassError}{\@tempswafalse\@YAD@ClassError}}
\newcommand{\@YAD@ClassError}[3][]{%
  \ifbool{YAD@noerror}{%
  }{%
    \ifboolexpr{%
      bool {YAD@inprogress@work}%
      or bool {YAD@inprogress@work@star}%
      or bool {YAD@draft}%
      or bool {YAD@noerror}%
    }{%
    }{%
      \ifthenelse{\isempty{#1}}{%
        \ClassError{yathesis}{%
          #2%
        }{%
          #3%
          \MessageBreak
          \if@tempswa%
          \else%
          \YAD@generic@text%
          \fi%
          \YAD@extra@help@text%
        }%
      }{%
        \ClassError{yathesis}{%
          #2%
        }{%
          #3%
          \MessageBreak
          \if@tempswa%
          \else%
          \YAD@generic@text%
          \fi%
          \YAD@quiet@text{#1}%
          \YAD@extra@help@text%
        }%
      }%
    }%
  }%
}%
%    \end{macrocode}
% On dÃ©finit la macro Ã—\YAD@ClassWarningNoLineÃ— qui est essentiellement
% identique Ã&nbsp; Ã—\ClassWarningNoLineÃ—, sauf que les messages de warnings :
% \begin{itemize}
% \item apparaissent en fin de log ;
% \item sont dÃ©sactivÃ©s si l'une ou l'autre des options Ã—nowarningÃ—,
%   Ã—version=draftÃ—, Ã—version=inprogressÃ— ou Ã—version=inprogress*Ã— est passÃ©e
%   Ã&nbsp; la \yatcl{}.
% \end{itemize}
%
%    \begin{macrocode}
\newcommand{\YAD@ClassWarningNoLine}[1]{%
  \ifboolexpr{%
    bool {YAD@inprogress@work}%
    or bool {YAD@inprogress@work@star}%
    or bool {YAD@draft}%
    or bool {YAD@nowarning}%
  }{%
    \stepcounter{YAD@warnings}%
  }{%
    \ClassWarningNoLine{yathesis}{%
      #1%
    }%
  }%
}%
%    \end{macrocode}
% On dÃ©finit le chemin \enquote{yad} par dÃ©faut des clÃ©s \enquote{pgf}.
%    \begin{macrocode}
\pgfkeys{/yad/.is family}
\pgfkeys{/yad/.cd}
\def\yadsetup{\pgfqkeys{/yad}}
%    \end{macrocode}
% On interdit l'utilisation de Ã—\yadsetupÃ— ailleurs qu'en prÃ©ambule.
%    \begin{macrocode}
% \@onlypreamble\yadsetup%
%    \end{macrocode}
%    \begin{macrocode}
\newcommand{\YAD@create@boolean}[1]{%
  % \yadsetup{#1/.is if = #1}
  \newbool{YAD@#1}%
  \yadsetup{%
    #1/.is choice,
    #1/true/.code={%
      \booltrue{YAD@#1}%
    },
    #1/false/.code={%
      \boolfalse{YAD@#1}%
    },
    #1/.default=true,
  }%
  % }{%
  %   \ClassWarningNoLine{yathesis}{%
  %     Valeur passÃ©e Ã&nbsp; la clÃ© `#1' non valide :\MessageBreak%
  %     cette valeur ne peut Ãªtre que `true' ou `false'%
  %   }%
  % }%
}%
% \YAD@create@boolean{nolink}%
\YAD@create@boolean{nonamelink}%
\YAD@create@boolean{noerror}%
\YAD@create@boolean{nowarning}%
\YAD@create@boolean{noauthor}%
\YAD@create@boolean{notitle}%
\YAD@create@boolean{noacademicfield}%
\YAD@create@boolean{noaim}%
\YAD@create@boolean{nodate}%
\YAD@create@boolean{noinstitute}%
\YAD@create@boolean{nodoctoralschool}%
\YAD@create@boolean{nolaboratory}%
\YAD@create@boolean{nolaboratoryaddress}%
\YAD@create@boolean{nosupervisor}%
\YAD@create@boolean{nomaketitle}%
\YAD@create@boolean{nokeywords}%
\YAD@create@boolean{noabstract}%
\YAD@create@boolean{nomakeabstract}%
\YAD@create@boolean{notableofcontents}%
\YAD@create@boolean{noprintbibliography}%
\YAD@create@boolean{nofrontcover}%
\YAD@create@boolean{hdr}%
\YAD@create@boolean{localtocs@classoption}%
\YAD@create@boolean{localbibs}%
%
\yadsetup{noerror=true}%
%
\booltrue{YAD@cover@page}%
%
\YAD@create@boolean{nologo}%
\YAD@create@boolean{professor}%
\YAD@create@boolean{mcf}%
\YAD@create@boolean{mcf*}%
\YAD@create@boolean{associateprofessor}%
\YAD@create@boolean{associateprofessor*}%
\YAD@create@boolean{juniorresearcher}%
\YAD@create@boolean{juniorresearcher*}%
\YAD@create@boolean{seniorresearcher}%
\YAD@create@boolean{male}%
\YAD@create@boolean{female}%
\yadsetup{%
  nologo=false,%
  professor=false,%
  mcf=false,%
  mcf*=false,%
  associateprofessor=false,%
  associateprofessor*=false,%
  juniorresearcher=false,%
  juniorresearcher*=false,%
  seniorresearcher=false,%
  male=true,%
  female=false,%
}%
%    \end{macrocode}
%
% On dÃ©finit la clÃ© Ã—versionÃ— de la classe qui prend pour valeurs :
% \begin{itemize}
% \item (par dÃ©faut) Ã—inprogressÃ— qui indique clairement qu'il s'agit d'une
%   version de travail et dÃ©sactive les erreurs pour Ã©lÃ©ments
%   \enquote{obligatoires} manquants ;
% \item Ã—inprogress*Ã—, identique Ã&nbsp; Ã—inprogressÃ— avec un filigrane en plus ;
% \item Ã—draftÃ— Â» ;
% \item Ã—finalÃ—, qui active les erreurs pour Ã©lÃ©ments \enquote{obligatoires}
%   manquants, Ã&nbsp; spÃ©cifier pour la version finale du document qui ne compose
%   pas en pied de page la mention \enquote{Version intermÃ©diaire en date du
%   ...} ;
% \item Ã—submittedÃ—, analogue Ã&nbsp; Ã—finalÃ—, sauf que la date de soutenance n'est
%   pas affichÃ©e ;
% \item Ã—submitted*Ã—, identique Ã&nbsp; Ã—submittedÃ—, mais qui en plus indique
%   clairement qu'il s'agit d'une version soumise aux rapporteurs.
% \end{itemize}
%    \begin{macrocode}
\yadsetup{%
  version/.is choice,%
  version/draft/.code={%
    \booltrue{YAD@draft}%
    \boolfalse{YAD@inprogress@work}%
    \boolfalse{YAD@inprogress@work@star}%
    \boolfalse{YAD@submitted@work}%
    \boolfalse{YAD@submitted@work@star}%
    \boolfalse{YAD@final@work}%
    \ifthenelse{\equal{\@classoptionslist}{}}{%
      \edef\@classoptionslist{draft}%
    }{%
      \edef\@classoptionslist{\@classoptionslist,draft}%
    }%
  },%
  version/inprogress/.code={%
    \boolfalse{YAD@draft}%
    \booltrue{YAD@inprogress@work}%
    \boolfalse{YAD@inprogress@work@star}%
    \boolfalse{YAD@submitted@work}%
    \boolfalse{YAD@submitted@work@star}%
    \boolfalse{YAD@final@work}%
  },%
  version/inprogress*/.code={%
    \boolfalse{YAD@draft}%
    \boolfalse{YAD@inprogress@work}%
    \booltrue{YAD@inprogress@work@star}%
    \boolfalse{YAD@submitted@work}%
    \boolfalse{YAD@submitted@work@star}%
    \boolfalse{YAD@final@work}%
  },%
  version/submitted/.code={%
    \boolfalse{YAD@nowarning}%
    \boolfalse{YAD@noerror}%
    \boolfalse{YAD@nowarning}%
    \boolfalse{YAD@noerror}%
    \boolfalse{YAD@draft}%
    \boolfalse{YAD@inprogress@work}%
    \boolfalse{YAD@inprogress@work@star}%
    \booltrue{YAD@submitted@work}%
    \boolfalse{YAD@submitted@work@star}%
    \boolfalse{YAD@final@work}%
  },%
  version/submitted*/.code={%
    \boolfalse{YAD@nowarning}%
    \boolfalse{YAD@noerror}%
    \boolfalse{YAD@draft}%
    \boolfalse{YAD@inprogress@work}%
    \boolfalse{YAD@inprogress@work@star}%
    \boolfalse{YAD@submitted@work}%
    \booltrue{YAD@submitted@work@star}%
    \boolfalse{YAD@final@work}%
  },%
  version/final/.code={%
    \boolfalse{YAD@nowarning}%
    \boolfalse{YAD@noerror}%
    \boolfalse{YAD@draft}%
    \boolfalse{YAD@inprogress@work}%
    \boolfalse{YAD@inprogress@work@star}%
    \boolfalse{YAD@submitted@work}%
    \boolfalse{YAD@submitted@work@star}%
    \booltrue{YAD@final@work}%
  },%
}%
\yadsetup{version=inprogress}%
%    \end{macrocode}
%
% On dÃ©finit la clÃ© Ã—outputÃ— de la classe qui prend pour valeurs :
% \begin{itemize}
% \item (par dÃ©faut) Ã—screenÃ— ;
% \item Ã—paperÃ— Â» ;
% \item Ã—paper*Ã—.
% \end{itemize}
%    \begin{macrocode}
\yadsetup{%
  output/.is choice,%
  output/paper/.code={\booltrue{YAD@output@paper}},%
  output/paper*/.code={%
    \booltrue{YAD@output@paper}%
    \booltrue{YAD@output@paper@star}%
  },%
  output/screen/.code={},%
}%
\yadsetup{output=screen}%
%    \end{macrocode}
%
% On dÃ©finit la clÃ© de classe Ã—localtocsÃ— qui fait que les titres des chapitres
% de la partie principale sont automatiquement suivis d'une table des matiÃ¨res
% locale Ã&nbsp; ce chapitre, de profondeur pouvant Ãªtre prÃ©cisÃ©e mais par dÃ©faut
% celle par dÃ©faut de la table des matiÃ¨res.
%    \begin{macrocode}
\def\YAD@localtocsdepth{\YAD@tocdepth}%
\yadsetup{%
  localtocs/.is family,%
  localtocs/.code={%
    \booltrue{YAD@localtocs@classoption}%
  },%
  localtocs/depth/.code={%
    \pgfkeysalso{localtocs}%
    \ifboolexpr{%
      test {\ifstrempty{#1}}
      or %
      test {\ifstrequal{#1}{part}}
      or %
      test {\ifstrequal{#1}{chapter}}
    }{%
      \def\YAD@localtocsdepth{\YAD@tocdepth}%
    }{%
      \def\YAD@localtocsdepth{#1}%
    }%
    \ifboolexpr{%
      test {\etocifunknownlevelTF {\YAD@localtocsdepth}}
      or %
      test {\ifstrequal{#1}{part}}
      or %
      test {\ifstrequal{#1}{chapter}}
    }{%
      \YAD@ClassWarningNoLine{%
        La valeur (`#1') passÃ©e Ã&nbsp; la cle\MessageBreak%
         `localtocs/depth'\MessageBreak%
        en option de classe n'est pas un des niveaux de\MessageBreak%
        sectionnement acceptÃ©s :\MessageBreak%
        `section', `subsection',`subsubsection',\MessageBreak%
        `paragraph', `subparagraph'.\MessageBreak%
        Le niveau `\YAD@tocdepth' va Ãªtre utilisÃ© Ã&nbsp; la place%
      }%
    }{%
    }%
  },%
}%
%    \end{macrocode}
%
% On dÃ©finit la clÃ© de classe Ã—localbibsÃ— qui fait que les chapitres
% contenant des rÃ©fÃ©rences bibliographiques sont automatiquement terminÃ©es par
% leurs bibliographies locales.
%    \begin{macrocode}
\newcommand\YAD@localbibs@common@code[1]{%
  \booltrue{YAD@localbibs}%
  \AddToHook{env/document/before}[YAD/loadcsquotesbiblatex]{%
    \@ifpackageloaded{csquotes}{%
    }{%
      \RequirePackage{csquotes}%
    }%
    \@ifpackageloaded{biblatex}{%
    }{%
      \YAD@ClassWarningNoLine{%
        L'ajout automatique des bibliographies locales en fin\MessageBreak%
        de chapitres fourni par l'option de classe\MessageBreak%
        `localbibs' repose sur le package `biblatex'\MessageBreak%
        que vous n'avez pas chargÃ©.\MessageBreak%
        La classe `yathesis' va le faire pour vous mais\MessageBreak%
        le recours Ã&nbsp; ce package pour la bibliographie sera\MessageBreak%
        alors nÃ©cessaire et exclura tout autre outil\MessageBreak%
        de production de la bibliographie\MessageBreak%
        (notamment `BibTeX')%
      }%
      \RequirePackage{biblatex}%
    }%
    \ExecuteBibliographyOptions{%
      refsegment=chapter,%
      defernumbers=#1%
    }%
  }%
  \DeclareHookRule{env/document/before}{YAD/loadcsquotesbiblatex}{before}{hyperref}%
}
\yadsetup{%
  localbibs*/.code={%
    \YAD@localbibs@common@code{true}%
  },%
  localbibs/.code={%
    \YAD@localbibs@common@code{false}%
    \AddToHook{begindocument/before}{\BiblatexSplitbibDefernumbersWarningOff}%
  }%
}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\YAD@interligne{single}%
\yadsetup{%
  space/.is choice,%
  space/single/.code={\def\YAD@interligne{single}},%
  space/onehalf/.code={\def\YAD@interligne{onehalf}},%
  space/double/.code={\def\YAD@interligne{double}},%
}%
\yadsetup{space=single}
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand{\cmdKV@YAD@numlaboratories}{1}%
\yadsetup{%
  numlaboratories/.store in=\cmdKV@YAD@numlaboratories%
}%
%    \end{macrocode}
%    \begin{macrocode}
\def\YAD@colophon@location{verso-frontcover}%
\yadsetup{%
  colophon-location/.is choice,%
  colophon-location/nowhere/.code={\def\YAD@colophon@location{nowhere}},%
  colophon-location/verso-frontcover/.code={\def\YAD@colophon@location{verso-frontcover}},%
  colophon-location/recto-backcover/.code={\def\YAD@colophon@location{recto-backcover}},%
}%
\yadsetup{colophon-location=verso-frontcover}
%    \end{macrocode}
%
%    \begin{macrocode}
\yadsetup{%
  mainlanguage/.store in=\YAD@mainlanguage,%
  secnumdepth/.store in=\YAD@secnumdepth,%
  sepcorpaffilfrench/.store in=\YAD@global@sepcorpaffil@french,%
  sepcorpaffilenglish/.store in=\YAD@global@sepcorpaffil@english,%
  % frametitle/.store in=\cmdKV@YAD@frametitle,%
  chap-style/.code={%
    \def\YAD@fncychapstyle{#1}%
    \PassOptionsToPackage{#1}{fncychap}%
  },%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\yadsetup{fncychap/.style={chap-style=#1}}
%    \end{macrocode}
%
%    \begin{macrocode}
\yadsetup{%
  sepcorpaffilenglish={\ at\ },%
  chap-style=PetersLenny,%
}%
%    \end{macrocode}
%
% On crÃ©e des \enquote{hooks} permettant de passer, en option de
% Ã—\documentclassÃ—, des options aux packages chargÃ©s par la classe qui :
% \begin{enumerate}
% \item prÃ©sentent un intÃ©rÃªt en soi pour l'utilisateur final ;
% \item dont les options peuvent Ãªtre utiles Ã&nbsp; l'utilisateur final.
% \end{enumerate}
%
%    \begin{macrocode}
\PassOptionsToPackage{a4paper}{geometry}%
% \PassOptionsToPackage{nodayofweek}{datetime}%
\PassOptionsToPackage{export}{adjustbox}%
\PassOptionsToPackage{numbered}{bookmark}%
% \PassOptionsToPackage{pagestyles}{titlesec}%
%    \end{macrocode}
% On passe au \Package{hyperref} (s'il est chargÃ© par l'utilisteur final) des
% options qui nous semblent pertinentes.
%    \begin{macrocode}
\PassOptionsToPackage{%
  final,%
  unicode,%
  hyperfootnotes=false,%
  hyperindex=false,%
  plainpages=false,%
  breaklinks,%
  pdfpagemode=UseOutlines,%
  pdfpagelayout=TwoPageRight%
}{hyperref}%
%
\yadsetup{%
  graphicx/.code={\PassOptionsToPackage{#1}{graphicx}},%
  adjustbox/.code={\PassOptionsToPackage{#1}{adjustbox}},%
  setspace/.code={\PassOptionsToPackage{#1}{setspace}},%
  xcolor/.code={\PassOptionsToPackage{#1}{xcolor}},%
  datatool/.code={\PassOptionsToPackage{#1}{datatool}},%
  titlesec/.code={\PassOptionsToPackage{#1}{titlesec}},%
  draftwatermark/.code={\PassOptionsToPackage{#1}{draftwatermark}},%
  babel/.code={\PassOptionsToPackage{#1}{babel}},%
  datetime2/.code={\PassOptionsToPackage{useregional,#1}{datetime2}}%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\yadsetup{%
  .unknown/.code ={\expandafter\PassOptionsToClass\expandafter{\pgfkeyscurrentname}{book}}%
}%
%    \end{macrocode}
%
%
% Pour Ã©viter certains comportements inattendus, on prÃ©cise la langue
% principale au moyen de l'option Ã—mainÃ— du \Package{babel}. Mais, comme
% celle-ci n'est apparue que rÃ©cemment, on n'y recourt que si la version du
% package est assez rÃ©cente.
%    \begin{macrocode}
\@ifpackagelater{babel}{2013/04/15}{%
  \PassOptionsToPackage{main=\YAD@mainlanguage}{babel}%
}{%
  \YAD@ClassWarningNoLine{%
    La version de `babel' utilisÃ©e est obsolÃ¨te.\MessageBreak%
    La classe `yathesis' va essayer de faire son possible\MessageBreak%
    mais il se peut qu'elle produise des resultats\MessageBreak%
    non prÃ©vus. Il est conseillÃ© de mettre Ã&nbsp; jour sa\MessageBreak%
    distribution TeX%
  }%
}%
%    \end{macrocode}
%
% \section{Traitement des options}
%
%    \begin{macrocode}
\ProcessPgfOptions{/yad}%
%    \end{macrocode}
%
%    \begin{macrocode}
\ifthenelse{\equal{\YAD@mainlanguage}{english}}{%
  \def\YAD@secondarylanguage{french}%
}{%
}%
\ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
  \def\YAD@secondarylanguage{english}%
}{%
}%
\ifthenelse{\equal{\@classoptionslist}{}}{%
  \edef\@classoptionslist{\YAD@secondarylanguage,\YAD@mainlanguage}%
}{%
  \edef\@classoptionslist{\YAD@secondarylanguage,\YAD@mainlanguage,\@classoptionslist}%
}%
%    \end{macrocode}
%
% \section{Chargement de la classe}
%
% La \yatCl{} est basÃ©e sur la \Class{book} standard :
%
%    \begin{macrocode}
\LoadClass{book}%
%    \end{macrocode}
%
% \section{Chargement de packages}\label{sec-packages-loaded}
%
% Tous les packages suivants sont prÃ©sents dans les distributions modernes
% standard \LaTeX.
%
% Le \Package{xkeyval} permet aussi de dÃ©finir des macros dont les arguments
% puissent Ãªtre spÃ©cifiÃ©s sous la forme Ã—clÃ©=Ã—\meta{valeur} mais ce n'est pas
% pour cela qu'il est chargÃ© : c'est pour Ã©viter des erreurs qui ont lieu dans
% certaines circonstances du fait du \Package{keyval} chargÃ© par le
% \Package{geometry}.
%    \begin{macrocode}
\RequirePackage{xkeyval}%
%    \end{macrocode}
% Gestion de la gÃ©omÃ©trie de la page.
%    \begin{macrocode}
\RequirePackage{geometry}[2010/09/12]%
%    \end{macrocode}
% Pour insÃ©rer des images
%    \begin{macrocode}
\RequirePackage{graphicx}[1999/02/16]%
%    \end{macrocode}
% Pour stocker le contenu d'un environnement dans une macro.
%    \begin{macrocode}
\RequirePackage{environ}[2013/04/01]%
%    \end{macrocode}
% Pour ajuster la position des matÃ©riels \LaTeX{}, notamment pour assurer
% l'alignement vertical des images.
%    \begin{macrocode}
\RequirePackage{adjustbox}[2012/05/21]%
%    \end{macrocode}
% Pour disposer d'outils pour les tableaux
%    \begin{macrocode}
\RequirePackage{array}[2008/09/09]%
%    \end{macrocode}
% Pour des tableaux de largeur dÃ©terminÃ©e
%    \begin{macrocode}
\RequirePackage{tabularx}[2020/01/15]%
%    \end{macrocode}
% Pour effectuer des manipulations sur des chaÃ®ne de caractÃ¨res
%    \begin{macrocode}
\RequirePackage{xstring}[2013/10/13]%
%    \end{macrocode}
% Pour tester le moteur employÃ©
%    \begin{macrocode}
\RequirePackage{iftex}[2013/04/04]%
%    \end{macrocode}
% Pour les Ã©pigraphes
%    \begin{macrocode}
\RequirePackage{epigraph}[2009/09/02]%
%    \end{macrocode}
% Pour disposer de boÃ®tes Ã©laborÃ©es en couleurs et encadrÃ©es
%    \begin{macrocode}
\RequirePackage{tcolorbox}[2014/03/31]%
%    \end{macrocode}
% Pour insÃ©rer des petits symboles rigolos (tÃ©lÃ©phone, fax, etc.)
%    \begin{macrocode}
\RequirePackage{marvosym}[2011/07/20]%
%    \end{macrocode}
% Pour la gestion des interlignes
%    \begin{macrocode}
\RequirePackage{setspace}[2011/12/19]%
%    \end{macrocode}
% Pour un colophon
%    \begin{macrocode}
\RequirePackage[noclrdblpg,nofullpage,aftertitle=1em]{colophon}[2018/04/01]%
%    \end{macrocode}
% Pour faire figurer les table des matiÃ¨res, bibliographie et index
% dans la table des matiÃ¨res
%    \begin{macrocode}
\RequirePackage{tocbibind}[2010/10/13]%
%    \end{macrocode}
% Pour dÃ©boguer
%    \begin{macrocode}
% \RequirePackage{trace}%
%    \end{macrocode}
% Pour des titres de chapitres amÃ©liorÃ©s
%    \begin{macrocode}
\ifthenelse{\equal{\YAD@fncychapstyle}{none}}{%
}{%
  \RequirePackage{fncychap}[2007/07/30]%
}%
%    \end{macrocode}
% Pour gÃ©rer les titres courants (entÃªtes) et bas de page
%    \begin{macrocode}
\RequirePackage[pagestyles]{titlesec}[2019/10/16]%
%    \end{macrocode}
% Pour supprimer le numÃ©ro de page sur la page de titre d'une partie
%    \begin{macrocode}
\RequirePackage{nonumonpart}[2011/04/15]%
%    \end{macrocode}
% Pour les couleurs
%    \begin{macrocode}
\RequirePackage{xcolor}[2007/01/21]%
%    \end{macrocode}
% Pour manipuler des bases de donnÃ©es
%    \begin{macrocode}
\RequirePackage{datatool}[2014/03/08]%
%    \end{macrocode}
% Pour distinguer le mode \enquote{draft} des autres modes.
%    \begin{macrocode}
\RequirePackage{ifdraft}[2008/08/11]%
%    \end{macrocode}
% Pour insÃ©rer du texte en filigrane
%    \begin{macrocode}
\ifdraft{%
  \RequirePackage{draftwatermark}[2006/06/30]%
%    \end{macrocode}
% Si on est en mode \enquote{draft}, les diffÃ©rentes zones de la page,
% notamment celle allouÃ©e au texte, sont matÃ©rialisÃ©es et les
% dÃ©passements de marges sont signalÃ©s par une barre verticale noire
% dans la marge.
%    \begin{macrocode}
  \geometry{showframe}%
  \setlength\overfullrule{5pt}%
}{%
  \ifbool{YAD@inprogress@work@star}{%
    \RequirePackage{draftwatermark}[2006/06/30]%
  }{%
  }%
}%
%    \end{macrocode}
% Pour gÃ©rer les langues.
%    \begin{macrocode}
\RequirePackage[\YAD@secondarylanguage,main=\YAD@mainlanguage]{babel}[2014/03/24]
%    \end{macrocode}
% Pour pouvoir afficher un sommaire c-Ã&nbsp;-d une table des matiÃ¨res rÃ©duite
%    \begin{macrocode}
\RequirePackage{etoc}[2016/09/29]%
\providecommand*\etocifunknownlevelTF[1]{\@ifundefined{Etoc@#1@@}}%
%    \end{macrocode}
% La commande suivante est une solution de contournement fournie par le paquet
% etoc afin de rÃ©soudre le problÃ¨me
% \url{https://github.com/dbitouze/yathesis/issues/83} (voir ci-dessous).
%    \begin{macrocode}
\ifdefined\etockeeporiginaltableofcontents\etockeeporiginaltableofcontents\fi
%    \end{macrocode}
% Pour tester la langue en cours
%    \begin{macrocode}
\RequirePackage{iflang}[2007/11/11]%
%    \end{macrocode}
% Pour pouvoir assurer facilement les traductions de certains mots ou
% expressions clÃ©s du canevas de thÃ¨se (notamment dans les pages de titre)
%    \begin{macrocode}
\RequirePackage{translator}[2010/06/12]%
%    \end{macrocode}
% Pour gÃ©nÃ©rer les dates (sans affichage du jour de la semaine).
%    \begin{macrocode}
\RequirePackage[useregional]{datetime2}[2020-03-02]%
%    \end{macrocode}
% Pour faire pointer les hyperliens au dÃ©but des flottants plutÃ´t qu'au
% dÃ©but des lÃ©gendes et pour la gestion des signets.
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{hyperref}{%
    \RequirePackage[all]{hypcap}[2011/02/16]%
    \RequirePackage[numbered]{bookmark}[2011/12/02]%
  }{%
  }%
}%
%    \end{macrocode}
%
% \section{DÃ©but du code de la classe}
%
% En raison de certains changements dans \Package{parskip}, nous devons ajuster
% l'espace vertical avant la premiÃ¨re rÃ¨gle des TdM locales, selon que ce
% package est chargÃ© ou non (cf. la dÃ©finition de Ã—\YAD@localstyleÃ— ci-dessous).
%    \begin{macrocode}
\newlength{\YAD@vspace@before@localtoc@rule}
\setlength{\YAD@vspace@before@localtoc@rule}{-1.25\baselineskip}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{parskip}{%
    \@ifpackagelater{parskip}{2.0a}{%
      \setlength{\YAD@vspace@before@localtoc@rule}{-.775\baselineskip}%
    }{%
    }%
  }{%
  }%
}
%    \end{macrocode}
%
% On dÃ©finit les macros Ã—\YAD@hrefÃ—, Ã—\YAD@hypersetupÃ—, Ã—\YAD@urlÃ—,
% Ã—\YAD@nolinkurlÃ— identiques aux macros Ã—\hrefÃ—, Ã—\hypersetupÃ—, Ã—\urlÃ—,
% Ã—\nolinkurlÃ— du \Package{hyperref} mais sur lesquelles on a plus de
% contrÃ´le.
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{hyperref}{%
    \newcommand{\YAD@href}[3][]{\href[#1]{#2}{#3}}%
    \newcommand{\YAD@hypersetup}[1]{\hypersetup{#1}}%
    \newcommand{\YAD@url}[1]{\url{#1}}%
    \newcommand{\YAD@nolinkurl}[1]{\nolinkurl{#1}}%
    \newcommand{\YAD@texorpdfstring}[2]{\texorpdfstring{#1}{#2}}%
    \newcommand{\YAD@phantomsection}{\phantomsection}%
  }{%
    \newcommand{\YAD@href}[3][]{#3}%
    \newcommand{\YAD@hypersetup}[1]{}%
    \newcommand{\YAD@url}[1]{\texttt{#1}}%
    \newcommand{\YAD@nolinkurl}[1]{\texttt{#1}}%
    \newcommand{\YAD@texorpdfstring}[2]{#1}%
    \newcommand{\YAD@phantomsection}{}%
  }%
  \@ifpackageloaded{bookmark}{%
    \newcommand{\YAD@bookmarksetup}[1]{\bookmarksetup{#1}}%
  }{%
    \newcommand{\YAD@bookmarksetup}[1]{}%
  }%
}%
%    \end{macrocode}
%
% On change l'appellation des tableaux flottants tels que traduits par le
% module \package{babel-french} du \Package{babel} de \enquote{Table} Ã&nbsp; \enquote{Tableau}.
%
%    \begin{macrocode}
\addto\captionsfrench{\def\tablename{{\scshape Tableau}}}%
%    \end{macrocode}
%
% % On redÃ©finit l'environnement Ã—colophonÃ— pour pouvoir disposer de la macro
% % Ã—\colophonÃ— qui va hÃ©berger le contenu du colophon.
% %    \begin{macrocode}
% \let\YAD@colophon@ORI\colophon
% \let\colophon\relax
% \let\YAD@endcolophon@ORI\endcolophon
% \let\endcolophon\relax
% %    \end{macrocode}
% On redÃ©finit la taille des caractÃ¨res des titre et texte du colophon.
%    \begin{macrocode}
\colophonpreparhook{\normalsize}
\colophonpretitlehook{\Large}
%    \end{macrocode}
%
% On dÃ©finit la macro Ã—\YAD@ifemptyorundefÃ— qui teste si le nom passÃ© est celui
% d'une macro inexistante ou dont le texte de remplacement est vide (ou
% constituÃ© d'espaces seulement).
%    \begin{macrocode}
\newcommand{\YAD@ifemptyorundef}[3]{%
  \ifboolexpr{%
    test {\ifundef{#1}} or %
    test {\ifdefempty{#1}}%
  }{%
    #2%
  }{%
    #3%
  }%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\AfterEndDocument{%
  \ifbool{YAD@nowarning}{%
    \ifboolexpr{%
      bool {YAD@inprogress@work}%
      or bool {YAD@inprogress@work@star}%
      or bool {YAD@draft}%
    }{%
    }{%
      \ifnumgreater{\value{YAD@warnings}}{0}{%
        % \immediate\write\YAD@file{%
          \ClassWarningNoLine{yathesis}{%
            L'option `nowarning' ayant Ã©tÃ© utilisÃ©e,\MessageBreak%
            \theYAD@warnings\space warning%
            \ifnumequal{\value{YAD@warnings}}{1}{%
              \space propre%
            }{%
              s propres%
            }
            %
            Ã&nbsp; la classe `yathesis'\MessageBreak%
            \ifnumequal{\value{YAD@warnings}}{1}{%
              a Ã©tÃ© masquÃ©%
            }{%
              ont Ã©tÃ© masquÃ©s%
            }
            %
            dans ce fichier de log.\MessageBreak%
            Il est fortement conseillÃ© de rÃ©activer\MessageBreak%
            l'affichage de ce%
            \ifnumequal{\value{YAD@warnings}}{1}{%
              \space warning%
            }{%
              s warnings%
            }
            %
            en supprimant\MessageBreak%
            l'option `nowarning'%
          }%
        % }%
      }{%
      }%
    }%
  }{%
  }%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/class&gt;
%    \end{macrocode}
%
% \section{Code principal}
%
%    \begin{macrocode}
%&lt;*class&gt;
%    \end{macrocode}
%
% On charge la libraire Ã—skinsÃ— du \Package{tcolorbox}.
%    \begin{macrocode}
  \tcbuselibrary{skins}%
%    \end{macrocode}
%
% Afin de prÃ©server la compatibilitÃ© ascendante, on demande le comportement
% original du \Package{tcolorbox} en ce qui concerne les espaces verticaux avant
% et aprÃ¨s les boÃ®tes de couleur de ce package.
%    \begin{macrocode}
  \tcbsetforeverylayer{autoparskip}
%    \end{macrocode}
%
% Par dÃ©faut, les listings sont composÃ©s en fonte Ã&nbsp; chÃ¢sse fixe
%    \begin{macrocode}
% \lstset{basicstyle=\ttfamily}
%    \end{macrocode}
%
% \begin{macro}{\YAD@clearspread}
%
% Commande permettant de dÃ©buter sur une page paire (pour la 4\ieme{}
% de couverture)
%    \begin{macrocode}
\def\YAD@clearspread{\clearpage\if@twoside \ifodd\c@page
  \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{titlepage}
% RedÃ©finition de l'environnement \lstinline|titlepage| pour que la numÃ©rotation
% des pages n'y soit pas fixÃ©e Ã&nbsp; $1$.
%    \begin{macrocode}
\renewenvironment{titlepage}
{%
  \cleardoublepage
  \if@twocolumn
  \@restonecoltrue\onecolumn
  \else
  \@restonecolfalse\newpage
  \fi
  \thispagestyle{empty}%
}%
{\if@restonecol\twocolumn \else \newpage \fi
}%
%    \end{macrocode}
% \end{environment}
%
%    \begin{macrocode}
% \patchcmd{\chapter}{plain}{empty}{}{}%
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/class&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;*class&gt;
%    \end{macrocode}
%
% On dÃ©finit la macro privÃ©e oÃ¹ est stockÃ© le nom du rÃ©pertoire des
% \enquote{rÃ©glages} oÃ¹ se trouvent les divers fichiers de configuration.
% \begin{macro}{\YAD@configuration@directory}
%    \begin{macrocode}
\newcommand*{\YAD@configuration@directory}{configuration}
%    \end{macrocode}
% \end{macro}
%
% On dÃ©finit la macro privÃ©e oÃ¹ est stockÃ© le nom du fichier
% de configuration \emph{local} de la thÃ¨se.
% \begin{macro}{\YAD@configuration@file}
%    \begin{macrocode}
\newcommand*{\YAD@configuration@file}{thesis.cfg}
%    \end{macrocode}
% \end{macro}
%
% On dÃ©finit la macro privÃ©e oÃ¹ est stockÃ© le nom du fichier esclave contenant
% les donnÃ©es caractÃ©ristiques du document (ce qui doit figurer sur les pages
% de couverture et de titre, les mots clÃ©s, etc.).
% \begin{macro}{\YAD@characteristics@file}
%    \begin{macrocode}
\newcommand*{\YAD@characteristics@file}{characteristics.tex}
%    \end{macrocode}
% \end{macro}
%
% On dÃ©finit la macro privÃ©e oÃ¹ est stockÃ© le nom du fichier contenant
% les traductions de la classe.
% \begin{macro}{\YAD@characteristics@file}
%    \begin{macrocode}
\newcommand*{\YAD@translations@file}{yathesis-translations.tex}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%&lt;/class&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;*class&gt;
%    \end{macrocode}
%
% Recherche automatique des fichiers images dans le \Folder{images}.
% Ceci permet de ne pas spÃ©cifier le chemin des images qui s'y trouvent.
%
%    \begin{macrocode}
% \graphicspath{{\imagesdirectory/}}
%    \end{macrocode}
%
% RÃ©glages propres au \Package{siunitx} (nombres composÃ©s avec la
% fonte courante et adoption des conventions typographiques
% franÃ§aises, notamment la virgule en guise de sÃ©parateur dÃ©cimal).
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{siunitx}{%
    \sisetup{detect-all}%
    \ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
      \sisetup{locale=FR}%
    }{%
      \sisetup{locale=UK}%
    }%
  }{%
  }%
}%
%    \end{macrocode}
%
% \begin{macro}{\YAD@reach@file}
% Macro offrant la possibilitÃ© de cliquer sur un hyperlien pour ouvrir
% les fichiers permettant de modifier les mots et expressions clÃ©s du
% canevas de thÃ¨se et les donnÃ©es de la thÃ¨se
%    \begin{macrocode}
\definecolor{YAD@configuration@file@color}{rgb}{0.5,0,0.5}%
\definecolor{YAD@main@file@color}{rgb}{1,0.5,0}%
\newcommand*{\YAD@reach@file}[2][\YAD@characteristics@file]{%
  \ifdraft{%
    \ifthenelse{\equal{\YAD@configuration@file}{#1}}{%
      \YAD@hypersetup{%
        urlbordercolor=YAD@configuration@file@color,%
        urlcolor=YAD@configuration@file@color%
      }%
    }{%
      \YAD@hypersetup{%
        urlbordercolor=YAD@main@file@color,%
        urlcolor=YAD@main@file@color%
      }%
    }%
    \IfFileExists{\YAD@configuration@directory/#1}{%
       \YAD@href{\YAD@configuration@directory/#1}{#2}%
    }{%
      \YAD@href{\jobname.tex}{#2}%
    }%
  }{%
    #2%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% Si on est en format de sortie Ã—paperÃ— (impression sur papier) la macro
% Ã—\YAD@hrefÃ—\meta{\textsc{url}}Ã—}{Ã—\meta{texte}Ã—}Ã— n'affiche que le
% \meta{texte} et les hyperliens des macros
% Ã—\urlÃ— sont supprimÃ©s. En outre, les commandes
% Ã—\href{Ã—\meta{\textsc{url}}Ã—}{Ã—\meta{texte}Ã—}Ã— du \Package{hyperref} sont
% automatiquement remplacÃ©es par :
% \begin{itemize}
% \item \meta{texte}Ã—\footnote{Ã—\meta{\textsc{url}}Ã—}Ã— ;
% \item \meta{texte} Ã—(Ã—\meta{\textsc{url}}Ã—)Ã— ;
% \end{itemize}
% selon que Ã—\href{Ã—\meta{\textsc{url}}Ã—}{Ã—\meta{texte}Ã—}Ã— est dans le texte
% ordinaire ou elle-mÃªme en note de bas de page.
%    \begin{macrocode}
\ifbool{YAD@output@paper}{%
  \AddToHook{begindocument/before}{%
    \@ifpackageloaded{hyperref}{%
      \YAD@hypersetup{colorlinks=false}%
      \renewcommand{\YAD@href}[3][]{#3}%
      \let\YAD@ori@footnote\footnote%
      \renewcommand{\footnote}[1]{\booltrue{YAD@in@footnote}\YAD@ori@footnote{#1}\boolfalse{YAD@in@footnote}}%
      \renewcommand*\url[1]{\nolinkurl{#1}}%
      \renewcommand*\href[3][]{%
        \ifbool{YAD@in@footnote}{%
          #3 (\url{#2}) }{%
          #3\footnote{\url{#2}} }%
      }%
    }{%
    }%
  }%
}{%
}%
%    \end{macrocode}
%
% On fixe la couleur du filigrane insÃ©rÃ© lorsque le
% \Package{draftwatermark} est chargÃ©.
%    \begin{macrocode}
\@ifpackageloaded{draftwatermark}{%
  \SetWatermarkColor{gray!10}%
}{%
}%
%    \end{macrocode}
% En cas de travail en cours, on l'indique en filigrane.
%    \begin{macrocode}
\ifbool{YAD@inprogress@work@star}{%
  \SetWatermarkFontSize{3cm}%
  \AfterEndPreamble{\translatelet\YAD@trinprogress{lbl-inprogress}}%
  \SetWatermarkText{\MakeUppercase{\YAD@trinprogress}}%
}{%
}%
%    \end{macrocode}
% Si l'option Ã—draftÃ— est activÃ©e, on indique clairement qu'on est en
% mode brouillon au moyen d'un texte en filigrane
%    \begin{macrocode}
\ifdraft{%
  \AfterEndPreamble{\translatelet\YAD@trdraft{lbl-draft}}%
  \SetWatermarkText{\MakeUppercase{\YAD@trdraft}}%
}{%
}%
%    \end{macrocode}
%
% Commande permettant de composer les arguments gÃ©nÃ©riques
% \begin{macro}{\YAD@generic@argument@}
%    \begin{macrocode}
\newcommand*{\YAD@generic@argument}[1]{%
  \bgroup\color{brown}\normalfont$\langle$\textsl{\texttt{#1}}$\rangle$\egroup%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@translation}
%   Commande adjoignant Ã&nbsp; Ã—\translateÃ— les hyperliens vers le fichier
%   de configuration oÃ¹ peuvent Ãªtre surchargÃ©es les traductions
%    \begin{macrocode}
\newcommand*{\YAD@translation}[1]{%
  \ifthenelse{\isempty{#1}}{%
  }{%
    \ifdraft{%
      {%
        \scriptsize%
        \begin{tabular}{l}
          {%
            \normalfont\ttfamily\tiny%
            (#1)%
          }%
          \\[-.3\baselineskip]
          \YAD@reach@file[\YAD@configuration@file]{%
            \translate{lbl-#1}%
          }%
        \end{tabular}%
      }%
    }{%
    \translate{lbl-#1}%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@astuce@expressioncle}
%    \begin{macrocode}
\newcommand{\YAD@astuce@expressioncle}{%
  \ifdraft{%
    \begin{center}
      \footnotesize%
      \fboxrule4pt%
      \fcolorbox{red}{white}{%
        \begin{minipage}{.9\linewidth}
          \selectlanguage{french}%
          Sur cette page, il est simple de (re)d\'efinir\ifundef{\Fcolonspace}{\FBcolonspace}{\Fcolonspace}:
          \begin{enumerate}
          \item une
            \YAD@reach@file[\YAD@configuration@file]{expression
              cl\'e}\ifundef{\Fcolonspace}{\FBcolonspace}{\Fcolonspace}:
            il suffit de cliquer sur le cadre de couleur orange qui
            l'entoure pour atteindre le fichier
            \YAD@reach@file[\YAD@configuration@file]{\texttt{\YAD@configuration@file}}
            et d'y ins\'erer
            \begin{center}
              \lstinline[morekeywords=expression]|\\expression\{|%
              \YAD@meta{label}%
              \lstinline|\}\{|%
              \YAD@meta{valeur (en franÃ§ais)}%
              \lstinline|\}\{|%
              \YAD@meta{valeur (en anglais)}%
              \lstinline|\}|
            \end{center}
            pour lui donner une (nouvelle) \YAD@meta{valeur} (\'eventuellement
            vide), \YAD@meta{label} \'etant son identifiant indiqu\'e au-dessus et
            entre parenth\`eses\ifundef{\Fcolonspace}{\FBcolonspace}{\Fcolonspace};
          \item une \YAD@reach@file{donn\'ee}\ifundef{\Fcolonspace}{\FBcolonspace}{\Fcolonspace}: il
            suffit de cliquer sur le cadre de couleur pourpre qui l'entoure
            pour atteindre le fichier
            \YAD@reach@file{\texttt{\YAD@configuration@file}} o\`u elle est
            d\'efinie.
          \end{enumerate}
          Pour plus de d\'etails, consulter la documentation de la
          classe \textsl{yathesis}.%
        \end{minipage}%
      }%
    \end{center}
  }{%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\expression}
%   On offre la possibilitÃ© de (re)dÃ©finir les expressions clÃ©s de la thÃ¨se.
%   Le 1\ier{} argument est le label de l'expression et les 2\ieme{} et
%   3\ieme{} arguments permettent de stipuler les (nouvelles) valeurs
%   (Ã©ventuellement vides) de l'expresion respectivement en franÃ§ais et en
%   anglais.
%    \begin{macrocode}
\newcommand{\YAD@expression}[3]{%
  \AddToHook{begindocument}{%
    \deftranslation[to=French]{lbl-#1}{#2}%
    \deftranslation[to=English]{lbl-#1}{#3}%
    \deftranslation[to=French]{#1}{#2}%
    \deftranslation[to=English]{#1}{#3}%
  }%
}%
\newcommand{\YAD@expression@alias}[5]{%
  \ifthenelse{\equal{#1}{#4}}{%
    \YAD@expression{#5}{#2}{#3}%
  }{%
  }%
}%
\newcommand{\expression}[3]{%
  \YAD@expression@alias{#1}{#2}{#3}{juniorresearcherfem*}{juniorresearcher-female*}%
  \YAD@expression@alias{#1}{#2}{#3}{mcf}{associateprofessor}%
  \YAD@expression@alias{#1}{#2}{#3}{mcf*}{associateprofessor*}%
  \renewcommand*{\do}[1]{\YAD@expression@alias{#1}{#2}{#3}{##1fem}{##1-female}}
  \docsvlist{%
    juniorresearcher,%
    supervisor,%
    cosupervisor,%
    comonitor,%
    seniorresearcher,%
    committeepresident,%
    professor,%
  }
  %
  \YAD@expression{#1}{#2}{#3}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@generic@argument@translate}
%    \begin{macrocode}
\newcommand*{\YAD@generic@argument@translate}[1]{%
  \YAD@texorpdfstring{\YAD@generic@argument{\translate{meta-#1}}}{&lt;#1&gt;}%
}%
%    \end{macrocode}
% \end{macro}
%
% DÃ©clarations permettant de dÃ©finir des macros des directeurs (dont
% d'Ã©ventuels co-directeurs), rapporteurs et examinateurs (dont le prÃ©sident du
% jury) dont les arguments puissent Ãªtre spÃ©cifiÃ©s sous la forme \meta{clÃ©} =
% \meta{valeur} (grÃ¢ce au package \package{pgfkeys}). La famille est nommÃ©e
% \lstinline|yad| (comme \foreignquote{english}{yet antoher document}).
%    \begin{macrocode}
\yadsetup{%
  role/.store in=\cmdKV@YAD@role,%
  corporation/.store in=\cmdKV@YAD@corps,%
  corps/.store in=\cmdKV@YAD@corps,%
  url/.store in=\cmdKV@YAD@url,%
  logo/.store in=\cmdKV@YAD@logo,%
  address/.store in=\cmdKV@YAD@address,%
  telephone/.store in=\cmdKV@YAD@telephone,%
  fax/.store in=\cmdKV@YAD@fax,%
  email/.store in=\cmdKV@YAD@email,%
  affiliation/.store in=\cmdKV@YAD@affiliation,%
  affiliationsecondary/.store in=\cmdKV@YAD@affiliationsecondary,%
  sepcorpaffilfrench/.store in=\cmdKV@YAD@sepcorpaffilfrench,%
  sepcorpaffilenglish/.store in=\cmdKV@YAD@sepcorpaffilenglish,%
  name/.store in=\cmdKV@YAD@name,%
  depth/.store in=\cmdKV@YAD@depth,%
  frametitle/.store in=\cmdKV@YAD@frametitle,%
}%
%
\yadsetup{%
  logoheight/.code={%
    \global\setlength\cmdKV@YAD@logoheight{#1}%
    \ifdimgreater{\cmdKV@YAD@logoheight}{\YAD@max@logoheight}{%
      \global\setlength\YAD@max@logoheight{\cmdKV@YAD@logoheight}%
    }{%
    }%
  }%
}%
%
\yadsetup{sepcorpaffilfrench=\YAD@global@sepcorpaffil@french}%
\yadsetup{sepcorpaffilenglish=\YAD@global@sepcorpaffil@english}%
\yadsetup{name=\contentsname}%
\yadsetup{depth=subsubsection}%
% \yadsetup{frametitle=fbox}%
%    \end{macrocode}
% On crÃ©e un style de rÃ©initialisation des caractÃ©ristiques des personnes.
%    \begin{macrocode}
\yadsetup{reset person/.style={%
    corps=,%
    role=,%
    affiliation=,%
    affiliationsecondary=,%
    female=false,%
    male=true,%
    professor=false,%
    mcf=false,%
    mcf*=false,%
    associateprofessor=false,%
    associateprofessor*=false,%
    juniorresearcher=false,%
    juniorresearcher*=false,%
    seniorresearcher=false,%
  }%
}%
%    \end{macrocode}
% DÃ©finition de nouvelles bases de donnÃ©es
%    \begin{macrocode}
\DTLnewdb{YAD@staffs}%
\DTLnewrow{YAD@staffs}%
\DTLnewdbentry{YAD@staffs}{YAD@the@staff}{referees}%
\DTLnewrow{YAD@staffs}%
\DTLnewdbentry{YAD@staffs}{YAD@the@staff}{examiners}%
\DTLnewrow{YAD@staffs}%
\DTLnewdbentry{YAD@staffs}{YAD@the@staff}{guests}%
\DTLnewrow{YAD@staffs}%
\DTLnewdbentry{YAD@staffs}{YAD@the@staff}{supervisors-in-committee}%
%
\DTLforeach{YAD@staffs}{%
  \YAD@the@staff=YAD@the@staff}{%
  \DTLnewdb{\YAD@the@staff}%
}%
\DTLnewdb{YAD@supervisors}%
%
\DTLnewdb{dedications}%
\DTLnewdb{frontepigraphs}%
%    \end{macrocode}
% BoolÃ©ens testant la prÃ©sence de femmes uniquement dans chacun des groupes de
% membres du jury, globalement fixÃ©s Ã&nbsp; \enquote{vrai} par dÃ©faut.
%    \begin{macrocode}
\DTLforeach{YAD@staffs}{%
  \YAD@the@staff=YAD@the@staff}{%
  \YAD@create@boolean{only@female@\YAD@the@staff}%
  \global\booltrue{YAD@only@female@\YAD@the@staff}%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand*{\YAD@staff}[4][]{%
%    \end{macrocode}
% On continue.
%    \begin{macrocode}
  \dtlexpandnewvalue%
  %
  \yadsetup{#1}%
%    \end{macrocode}
% Pour chacun des groupes de membres du jury, le boolÃ©en testant la prÃ©sence de
% femmes uniquement est globalement fixÃ©s Ã&nbsp; \enquote{faux} si au moins une
% personne n'est pas une femme.
%    \begin{macrocode}
\DTLforeach{YAD@staffs}{%
  \YAD@the@staff=YAD@the@staff}{%
    \ifthenelse{\equal{#4}{\YAD@the@staff}}{%
      \ifboolexpr{%
        bool {YAD@female} or %
        not bool {YAD@male}%
      }{%
      }{%
        \global\boolfalse{YAD@only@female@#4}%
      }%
    }{%
    }
}%
%
  \ifbool{YAD@professor}{%
    \ifboolexpr{%
      bool {YAD@female} or %
      not bool {YAD@male}%
    }{%
      \yadsetup{corps=professor-female,#1}%
    }{%
      \yadsetup{corps=professor,#1}%
    }%
  }{%
  }%
  \ifboolexpr{
    bool {YAD@mcf}
    or
    bool {YAD@associateprofessor}
  }{%
    \yadsetup{corps=associateprofessor,#1}%
  }{%
  }%
  \ifboolexpr{
    bool {YAD@mcf*}
    or
    bool {YAD@associateprofessor*}
  }{%
    \yadsetup{corps=associateprofessor*,#1}%
  }{%
  }%
  \ifboolexpr{ bool {YAD@juniorresearcher} }{%
    \ifboolexpr{%
      bool {YAD@female} or %
      not bool {YAD@male}%
    }{%
      \yadsetup{corps=juniorresearcher-female,#1}%
    }{%
      \yadsetup{corps=juniorresearcher,#1}%
    }%
  }{%
  }%
  \ifboolexpr{ bool {YAD@juniorresearcher*} }{%
    \ifboolexpr{%
      bool {YAD@female} or %
      not bool {YAD@male}%
    }{%
      \yadsetup{corps=juniorresearcher-female*,#1}%
    }{%
      \yadsetup{corps=juniorresearcher*,#1}%
    }%
  }{%
  }%
  \ifboolexpr{ bool {YAD@seniorresearcher} }{%
    \ifboolexpr{%
      bool {YAD@female} or %
      not bool {YAD@male}%
    }{%
      \yadsetup{corps=seniorresearcher-female,#1}%
    }{%
      \yadsetup{corps=seniorresearcher,#1}%
    }%
  }{%
  }%
  %
%    \end{macrocode}
% On fait en sorte que la clÃ© Ã—corporationÃ—, obsolÃ¨te et remplacÃ©e par la clÃ©
% Ã—corpsÃ—,  soit un alias de ce dernier.
%    \begin{macrocode}
  % \YAD@ifemptyorundef{\cmdKV@YAD@corporation}{%
  % }{%
  %   \YAD@ifemptyorundef{\cmdKV@YAD@corps}{%
  %     \yadsetup{#1,corps=\cmdKV@YAD@corporation}%
  %   }{%
  %   }%
  % }%
%    \end{macrocode}
% On continue.
%    \begin{macrocode}
  \DTLnewrow{#4}%
  \DTLnewdbentry{#4}{firstname}{#2}%
  \DTLnewdbentry{#4}{lastname}{#3}%
  \YAD@ifemptyorundef{\cmdKV@YAD@role}{%
    \DTLnewdbentry{#4}{role}{}%
  }{%
    \DTLnewdbentry{#4}{role}{\cmdKV@YAD@role}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@corps}{%
    \DTLnewdbentry{#4}{corps}{}%
  }{%
    \DTLnewdbentry{#4}{corps}{\cmdKV@YAD@corps}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@sepcorpaffilfrench}{%
    \DTLnewdbentry{#4}{sepcorpaffilfrench}{\YAD@global@sepcorpaffil@french}%
  }{%
    \DTLnewdbentry{#4}{sepcorpaffilfrench}{\cmdKV@YAD@sepcorpaffilfrench}%
    \def\cmdKV@YAD@sepcorpaffilfrench{}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@sepcorpaffilenglish}{%
    \DTLnewdbentry{#4}{sepcorpaffilenglish}{\YAD@global@sepcorpaffil@english}%
  }{%
    \DTLnewdbentry{#4}{sepcorpaffilenglish}{\cmdKV@YAD@sepcorpaffilenglish}%
    \def\cmdKV@YAD@sepcorpaffilenglish{}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@affiliation}{%
    \DTLnewdbentry{#4}{affiliation}{}%
  }{%
    \DTLnewdbentry{#4}{affiliation}{\cmdKV@YAD@affiliation}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@affiliationsecondary}{%
    \YAD@ifemptyorundef{\cmdKV@YAD@affiliation}{%
      \DTLnewdbentry{#4}{affiliationsecondary}{}%
    }{%
      \DTLnewdbentry{#4}{affiliationsecondary}{\cmdKV@YAD@affiliation}%
    }%
  }{%
    \DTLnewdbentry{#4}{affiliationsecondary}{\cmdKV@YAD@affiliationsecondary}%
  }%
%    \end{macrocode}
% On rÃ©initialise les caractÃ©ristiques pour la personne suivante.
%    \begin{macrocode}
  \yadsetup{reset person}%
}%
%    \end{macrocode}
%
% \begin{macro}{\YAD@error@firstlastnames@empty}
%    \begin{macrocode}
\newcommand{\YAD@error@firstlastnames@empty}[4]{%
  \ifthenelse{\isempty{#2}}{%
    \YAD@ClassError{%
      PrÃ©nom #1 non spÃ©cifiÃ©%
    }{%
      Le 1er argument obligatoire de la commande \string#4\MessageBreak%
      est vide (celui-ci doit Ãªtre renseignÃ©).%
    }%
  }{%
  }%
  \ifthenelse{\isempty{#3}}{%
    \YAD@ClassError{%
      Nom #1 non spÃ©cifiÃ©%
    }{%
      Le 2e argument obligatoire de la commande \string#4\MessageBreak%
      est vide (celui-ci doit Ãªtre renseignÃ©).%
    }%
  }{%
  }%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@supervisors@in@committee}
%    \begin{macrocode}
\newcommand*{\YAD@supervisors@in@committee}[3][]{%
  \YAD@staff[#1]{#2}{#3}{supervisors-in-committee}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\supervisor}
%    \begin{macrocode}
\newcommand{\supervisor}{%
  \@ifstar{\@tempswafalse\YAD@supervisor}{\@tempswatrue\YAD@supervisor}%
}
\newcommand*{\YAD@supervisor}[3][]{%
  \booltrue{YAD@supervisor@specified}%
  \yadsetup{#1}%
  \ifboolexpr{%
    bool {YAD@female} or %
    not bool {YAD@male}%
  }{%
    \YAD@error@firstlastnames@empty{de la directrice de thÃ¨se}{#2}{#3}{\supervisor}%
    \YAD@staff[role=supervisor-female,#1]{#2}{#3}{YAD@supervisors}%
  }{%
    \YAD@error@firstlastnames@empty{du directeur de thÃ¨se}{#2}{#3}{\supervisor}%
    \YAD@staff[role=supervisor,#1]{#2}{#3}{YAD@supervisors}%
  }%
  \if@tempswa%
  \YAD@staff[role=supervisor,#1]{#2}{#3}{supervisors-in-committee}%
  \fi%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cosupervisor}
%    \begin{macrocode}
\newcommand{\cosupervisor}{%
  \@ifstar{\@tempswatrue\YAD@cosupervisor}{\@tempswafalse\YAD@cosupervisor}%
}
\newcommand*{\YAD@cosupervisor}[3][]{%
  \booltrue{YAD@supervisor@specified}%
  \booltrue{YAD@cosupervisor@or@comonitor}%
  \yadsetup{#1}%
  \ifboolexpr{%
    bool {YAD@female} or %
    not bool {YAD@male}%
  }{%
    \YAD@error@firstlastnames@empty{de la co-directrice de thÃ¨se}{#2}{#3}{\cosupervisor}%
    \YAD@staff[role=cosupervisor-female,#1]{#2}{#3}{YAD@supervisors}%
  }{%
    \YAD@error@firstlastnames@empty{du co-directeur de thÃ¨se}{#2}{#3}{\cosupervisor}%
    \YAD@staff[role=cosupervisor,#1]{#2}{#3}{YAD@supervisors}%
  }%
  \if@tempswa%
  \else%
  \YAD@staff[role=cosupervisor,#1]{#2}{#3}{supervisors-in-committee}%
  \fi%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\comonitor}
%    \begin{macrocode}
\newcommand{\comonitor}{%
  \@ifstar{\@tempswatrue\YAD@comonitor}{\@tempswafalse\YAD@comonitor}%
}
\newcommand*{\YAD@comonitor}[3][]{%
  \booltrue{YAD@supervisor@specified}%
  \booltrue{YAD@cosupervisor@or@comonitor}%
  \yadsetup{#1}%
  \ifboolexpr{%
    bool {YAD@female} or %
    not bool {YAD@male}%
  }{%
    \YAD@error@firstlastnames@empty{de la co-encadrante de thÃ¨se}{#2}{#3}{\comonitor}%
    \YAD@staff[role=comonitor-female,#1]{#2}{#3}{YAD@supervisors}%
  }{%
    \YAD@error@firstlastnames@empty{de co-encadrant de thÃ¨se}{#2}{#3}{\comonitor}%
    \YAD@staff[role=comonitor,#1]{#2}{#3}{YAD@supervisors}%
  }%
  \if@tempswa%
  \else%
  \YAD@staff[role=comonitor,#1]{#2}{#3}{supervisors-in-committee}%
  \fi%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\guest}
%    \begin{macrocode}
\newcommand*{\guest}[3][]{%
  \YAD@staff[#1]{#2}{#3}{guests}%
  \YAD@error@firstlastnames@empty{de l'invite}{#2}{#3}{\guest}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\referee}
%    \begin{macrocode}
\newcommand*{\referee}[3][]{%
  \yadsetup{#1}%
  \ifboolexpr{%
    bool {YAD@female} or %
    not bool {YAD@male}%
  }{%
    \YAD@error@firstlastnames@empty{de la rapportrice}{#2}{#3}{\referee}%
  }{%
    \YAD@error@firstlastnames@empty{du rapporteur}{#2}{#3}{\referee}%
  }%
  \YAD@staff[#1]{#2}{#3}{referees}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\examiner}
%    \begin{macrocode}
\newcommand*{\examiner}[3][]{%
  \yadsetup{#1}%
  \YAD@staff[#1]{#2}{#3}{examiners}%
  \ifboolexpr{%
    test {\ifdefstring{\cmdKV@YAD@role}{committeepresident}} or %
    test {\ifdefstring{\cmdKV@YAD@role}{committeepresident-female}}%
  }{%
  }{%
    \ifboolexpr{%
      bool {YAD@female} or %
      not bool {YAD@male} or %
    }{%
      \YAD@error@firstlastnames@empty{de l'examinatrice}{#2}{#3}{\examiner}%
    }{%
      \YAD@error@firstlastnames@empty{de l'examinateur}{#2}{#3}{\examiner}%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\committeepresident}
%    \begin{macrocode}
\newcommand*{\committeepresident}[3][]{%
  \booltrue{YAD@committeepresident@specified}
  \yadsetup{#1}%
  \ifboolexpr{%
    bool {YAD@female} or %
    not bool {YAD@male}%
  }{%
    \YAD@error@firstlastnames@empty{de la presidente du jury}{#2}{#3}{\committeepresident}%
    \examiner[role=committeepresident-female,#1]{#2}{#3}%
  }{%
    \YAD@error@firstlastnames@empty{du president du jury}{#2}{#3}{\committeepresident}%
    \examiner[role=committeepresident,#1]{#2}{#3}%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\newcommand*{\YAD@al}{ \`a l'}%
\newcommand*{\YAD@au}{ au }%
\newcommand*{\YAD@del}{ de l'}%
\newcommand*{\YAD@du}{ du }%
%
\newcommand*{\YAD@if@starts@with@vowel}[3]{%
  \ifboolexpr{%
    test {\IfBeginWith{#1}{a}} or %
    test {\IfBeginWith{#1}{e}} or %
    test {\IfBeginWith{#1}{i}} or %
    test {\IfBeginWith{#1}{o}} or %
    test {\IfBeginWith{#1}{u}} or %
    test {\IfBeginWith{#1}{y}} or %
    test {\IfBeginWith{#1}{\`a}} or %
    test {\IfBeginWith{#1}{\^a}} or %
    test {\IfBeginWith{#1}{\"a}} or %
    test {\IfBeginWith{#1}{\'e}} or %
    test {\IfBeginWith{#1}{\`e}} or %
    test {\IfBeginWith{#1}{\^e}} or %
    test {\IfBeginWith{#1}{\"e}} or %
    test {\IfBeginWith{#1}{\^i}} or %
    test {\IfBeginWith{#1}{\"i}} or %
    test {\IfBeginWith{#1}{\^o}} or %
    test {\IfBeginWith{#1}{\"o}} or %
    test {\IfBeginWith{#1}{\`u}} or %
    test {\IfBeginWith{#1}{\^u}} or %
    test {\IfBeginWith{#1}{\"u}} or %
    test {\IfBeginWith{#1}{\"y}} or %
    test {\IfBeginWith{#1}{A}} or %
    test {\IfBeginWith{#1}{E}} or %
    test {\IfBeginWith{#1}{I}} or %
    test {\IfBeginWith{#1}{O}} or %
    test {\IfBeginWith{#1}{U}} or %
    test {\IfBeginWith{#1}{Y}} or %
    test {\IfBeginWith{#1}{\`A}} or %
    test {\IfBeginWith{#1}{\^A}} or %
    test {\IfBeginWith{#1}{\"A}} or %
    test {\IfBeginWith{#1}{\'E}} or %
    test {\IfBeginWith{#1}{\`E}} or %
    test {\IfBeginWith{#1}{\^E}} or %
    test {\IfBeginWith{#1}{\"E}} or %
    test {\IfBeginWith{#1}{\^I}} or %
    test {\IfBeginWith{#1}{\"I}} or %
    test {\IfBeginWith{#1}{\^O}} or %
    test {\IfBeginWith{#1}{\"O}} or %
    test {\IfBeginWith{#1}{\`U}} or %
    test {\IfBeginWith{#1}{\^U}} or %
    test {\IfBeginWith{#1}{\"U}} or %
    test {\IfBeginWith{#1}{\"Y}} or %
    test {\IfBeginWith{#1}{\ae}} or %
    test {\IfBeginWith{#1}{\oe}} or %
    test {\IfBeginWith{#1}{\AE}} or %
    test {\IfBeginWith{#1}{\OE}}%
  }{%
    #2%
  }{%
    #3%
  }%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand{\YAD@display@staff}[1]{%
  \DTLforeach*{#1}{%
    \YAD@committeemember@lastname=lastname,%
    \YAD@committeemember@firstname=firstname,%
    \YAD@committeemember@role=role,%
    \YAD@committeemember@corps=corps,%
    \YAD@committeemember@sepcorpaffil=%
    \expandafter\IfLanguageName{french}{%
      sepcorpaffilfrench%
    }{%
      sepcorpaffilenglish%
    }%
    ,%
    \YAD@committeemember@affiliation=%
    \IfLanguageName{french}{%
      affiliation%
    }{%
      affiliationsecondary%
    }%
  }{%
    % Nature des membres du jury
    \DTLiffirstrow{%
      \ifthenelse{\DTLrowcount{\YAD@the@staff}&gt;1}{%
        \ifboolexpr{%
          bool {YAD@hdr} and test {\ifdefstring{\YAD@the@staff}{supervisors-in-committee}}%
        }{%
          \ifboolexpr{%
            bool {YAD@only@female@\YAD@the@staff}%
          }{%
            \YAD@translation{\YAD@the@staff-pl-hdr-female}%
          }{%
            \YAD@translation{\YAD@the@staff-pl-hdr}%
          }%
        }{%
          \ifboolexpr{%
            bool {YAD@only@female@\YAD@the@staff}%
          }{%
            \YAD@translation{\YAD@the@staff-pl-female}%
          }{%
            \YAD@translation{\YAD@the@staff-pl}%
          }%
        }%
      }{%
        \ifboolexpr{%
          bool {YAD@hdr} and test {\ifdefstring{\YAD@the@staff}{supervisors-in-committee}}%
        }{%
          \ifboolexpr{%
            bool {YAD@only@female@\YAD@the@staff}%
          }{%
            \YAD@translation{\YAD@the@staff-hdr-female}%
          }{%
            \YAD@translation{\YAD@the@staff-hdr}%
          }%
        }{%
          \ifboolexpr{%
            bool {YAD@only@female@\YAD@the@staff}%
          }{%
            \YAD@translation{\YAD@the@staff-female}%
          }{%
            \YAD@translation{\YAD@the@staff}%
          }%
        }%
      }%
    }{%
    }%
    &amp;
    % PrÃ©nom
    \YAD@reach@file{%
      %
      \ifthenelse{\DTLiseq{\YAD@committeemember@firstname}{}}{%
        \YAD@generic@argument@translate{firstname}%
      }{%
        \YAD@committeemember@firstname%
      }%
%    \end{macrocode}
% L'accolade suivante ne doit pas Ãªtre suivie d'un Ã—%Ã— sans quoi il
% n'y aura pas d'espace entre le prÃ©nom et le nom.
%    \begin{macrocode}
    }
% Nom
    \YAD@reach@file{%
      \ifthenelse{\DTLiseq{\YAD@committeemember@lastname}{}}{%
        \YAD@generic@argument@translate{lastname}%
      }{%
        \textsc{\YAD@committeemember@lastname}%
      }%
    }%
    &amp;
% Corps
    \YAD@reach@file{%
      \ifthenelse{\DTLiseq{\YAD@committeemember@corps}{}}{%
        \ifdraft{%
          \YAD@generic@argument@translate{corps}%
        }{%
        }%
      }{%
        \YAD@translation{%
          \YAD@committeemember@corps%
        }%
      }%
    }%
% Ã‰tablissement
    \YAD@reach@file{%
      \ifthenelse{\DTLiseq{\YAD@committeemember@affiliation}{}}{%
        \ifdraft{%
          \YAD@generic@argument@translate{affiliation}%
        }{%
        }%
      }{%
        \ifthenelse{\DTLiseq{\YAD@committeemember@corps}{}}{%
          \YAD@committeemember@affiliation%
        }{%
          \YAD@ifemptyorundef{\YAD@committeemember@sepcorpaffil}{%
            \YAD@if@starts@with@vowel{\YAD@committeemember@affiliation}{\YAD@al}{\YAD@au}\YAD@committeemember@affiliation%
          }{%
            \YAD@committeemember@sepcorpaffil\YAD@committeemember@affiliation%
          }%
        }%
      }%
    }%
  \ifbool{YAD@committeepresident@specified}{%
    &amp;
    % Fonction
    \YAD@reach@file{%
      \ifthenelse{\DTLiseq{\YAD@committeemember@role}{}}{%
        \ifdraft{%
          \YAD@generic@argument@translate{role}%
        }{%
        }%
      }{%
        \ifthenelse{\equal{\YAD@the@staff}{supervisors-in-committee}}{%
        }{%
          \YAD@translation{\YAD@committeemember@role}%
        }%
      }%
    }%
  }{%
  }%
  \DTLiflastrow{%
    \\[.15cm]
  }{%
      \\
    }%
  }%
}%
%
\newcommand*{\YAD@supervisors@tabular}{%
  \small%
  \DTLifdbempty{YAD@staffs}{}{%
    \ifthenelse{\DTLrowcount{YAD@supervisors}&gt;1}{%
      \begin{tabular}[t]{&gt;{\itshape}lll}
    }{%
      \begin{tabular}[t]{&gt;{\itshape}l@{ }ll}
    }%
      \DTLforeach*{YAD@supervisors}{%
          \YAD@committeemember@lastname=lastname,%
          \YAD@committeemember@firstname=firstname,%
          \YAD@committeemember@role=role%
        }{%
          % Nature des membres du jury
          \DTLiffirstrow{%
            \hspace{-\tabcolsep}%
            \normalfont\bfseries%
            \ifYAD@hdr%
            \YAD@translation{supervisedby-hdr} %
            \else%
            \YAD@translation{supervisedby}%
            \fi%
          }{%
          }%
          &amp;
          % PrÃ©nom
          \YAD@reach@file{%
            %
            \ifthenelse{\DTLiseq{\YAD@committeemember@firstname}{}}{%
              \YAD@generic@argument@translate{firstname}%
            }{%
              \YAD@committeemember@firstname%
            }%
          }
          % Nom
          \YAD@reach@file{%
            \ifthenelse{\DTLiseq{\YAD@committeemember@lastname}{}}{%
              \YAD@generic@argument@translate{lastname}%
            }{%
              \textsc{\YAD@committeemember@lastname}%
            }%
          }%
          &amp;
          % Fonction
          \YAD@reach@file{%
            \ifthenelse{\DTLiseq{\YAD@committeemember@role}{}}{%
              \ifdraft{%
                \YAD@generic@argument@translate{role}%
              }{%
              }%
            }{%
              \ifthenelse{\DTLrowcount{YAD@supervisors}&gt;1}{%
                \ifbool{YAD@cosupervisor@or@comonitor}{%
                  \YAD@translation{\YAD@committeemember@role}%
                }{%
                }%
              }{%
              }%
            }%
          }%
          % &amp;
          \DTLiflastrow{%
            \\[.5cm]
          }{%
            \\
          }%
        }%
      \end{tabular}%
    }{%
    }%
  }%
%
\newcommand*{\YAD@committee@tabular}{%
  \small%
  \ifbool{YAD@committeepresident@specified}{%
    \begin{tabularx}{\textwidth}[t]{&gt;{\itshape}ll&gt;{\raggedright\arraybackslash}Xl}
  }{%
    \begin{tabularx}{\textwidth}[t]{&gt;{\itshape}ll&gt;{\raggedright\arraybackslash}X}
  }%
    \ifbool{YAD@committeepresident@specified}{%
      \multicolumn{4}{@{}l}{\bfseries\YAD@translation{committeemembers}}%
    }{%
      \multicolumn{3}{@{}l}{\bfseries\YAD@translation{committeemembers}}%
    }%
    \\[.25cm]
    \DTLforeach*{YAD@staffs}{%
      \YAD@the@staff=YAD@the@staff%
    }{%
      %
      \YAD@display@staff{\YAD@the@staff}%
    }%
  \end{tabularx}%
}%
%    \end{macrocode}
%
% \begin{macro}{\YAD@meta}
%    \begin{macrocode}
\DeclareRobustCommand*\YAD@meta{\YAD@generic@argument}%
%    \end{macrocode}
% \end{macro}
%
% Commande oÃ¹ seront stockÃ©s les logos (avec Ã©crasement Ã&nbsp; chaque
% nouveau logo).
%    \begin{macrocode}
\newcommand*\YAD@logo{}%
%    \end{macrocode}
%
% On crÃ©e une commande crÃ©ant des commandes.
%
%    \begin{macrocode}
\newcommand*{\YAD@create@macro}[2][]{%
%    \end{macrocode}
% CrÃ©ation d'une commande standard
%    \begin{macrocode}
  \ifthenelse{\isempty{#1}}{%
    \csdef{#2}##1{%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le rÃ©sultat de la commande standard
%    \begin{macrocode}
      \csdef{print#2}{%
        \YAD@reach@file{%
          \ifthenelse{\isempty{##1}}{%
            \YAD@generic@argument@translate{#2}%
          }{%
            ##1%
          }%
        }%
      }%
    }%
  }{%
  }%
%    \end{macrocode}
% CrÃ©ation d'une commande de type email
%    \begin{macrocode}
  \ifthenelse{\equal{#1}{email}}{%
    \csdef{#1#2}##1{%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le rÃ©sultat de la commande
% de type email
%    \begin{macrocode}
      \csdef{print#1#2}{%
        \YAD@reach@file{%
          \ifthenelse{\isempty{##1}}{%
            % \ifbool{YAD@nolink}{%
            %   \YAD@generic@argument@translate{#1#2}%
            % }{%
              \YAD@href{mailto:#1.#2@institute.fr}{\YAD@generic@argument@translate{#1#2}}%
            % }%
          }{%
            % \ifbool{YAD@nolink}{%
            %   \YAD@nolinkurl{##1}%
            % }{%
              \YAD@href{mailto:##1}{\YAD@nolinkurl{##1}}%
            % }%
          }%
        }%
      }%
    }%
  }{%
  }%
%    \end{macrocode}
% CrÃ©ation d'une commande de type URL
%    \begin{macrocode}
  \ifthenelse{\equal{#1}{url}}{%
    \csdef{#1#2}##1{%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le rÃ©sultat de type URL
%    \begin{macrocode}
      \csdef{print#1#2}{%
        \YAD@reach@file{%
          \ifthenelse{\isempty{##1}}{%
            % \ifbool{YAD@nolink}{%
            %   \YAD@generic@argument@translate{#1#2}%
            % }{%
              \YAD@url{%
                \YAD@generic@argument@translate{#1#2}%
              }%
            % }%
          }{%
            % \ifbool{YAD@nolink}{%
            %   \YAD@nolinkurl{##1}%
            % }{%
              \YAD@url{##1}%
            % }%
          }%
        }%
      }%
    }%
  }{%
  }%
%    \end{macrocode}
% CrÃ©ation d'une commande pour une entitÃ© (Ã©cole doctorale,
% Ã©tablissement, laboratoire, etc.)
%    \begin{macrocode}
  \ifthenelse{\equal{#1}{entite}}{%
    \expandafter\newcommand\expandafter{\csname #2\endcsname}[2][]{%
%    \end{macrocode}
% CrÃ©ation de la commande contenant l'entitÃ©.
%    \begin{macrocode}
     \csdef{YAD@#2}{##2}%
     \ifthenelse{\isempty{##2}}{%
       \YAD@ClassError[no#2]{%
         Argument obligatoire de \csuse{#2}\space vide%
       }{%
         L'argument obligatoire de la commande \csuse{#2}\MessageBreak%
         est vide (celui-ci doit Ãªtre renseignÃ©).%
       }%
     }{%
     }%
%    \end{macrocode}
% CrÃ©ation de la commande affichant l'entitÃ©.
%    \begin{macrocode}
\csdef{print#2}{%
  \@ifstar{\csuse{YAD@print#2@star}}{\csuse{YAD@print#2@nostar}}%
}%
\csdef{YAD@print#2@star}{%
  \ifthenelse{\isempty{##2}}{%
    \YAD@reach@file{\YAD@generic@argument@translate{#2}}%
  }{%
    \YAD@reach@file{##2}%
  }%
}%
\csdef{YAD@print#2@nostar}{%
  \let\YAD@texte\relax%
  \csdef{YAD@texte}{%
    \ifthenelse{\isempty{##2}}{%
      \YAD@reach@file{\YAD@generic@argument@translate{#2}}%
    }{%
      ##2%
    }%
  }%
  % \boolfalse{YAD@nolink}%
  \yadsetup{##1}%
  \YAD@ifemptyorundef{\cmdKV@YAD@url}{%
    \ifdraft{%
      \YAD@reach@file{%
        \YAD@texte%
      }%
    }{%
      % \ifbool{YAD@nolink}{%
      \YAD@texte%
      % }{%
      %   \YAD@href{www.#2.fr}{\YAD@texte}%
      % }%
    }%
  }{%
    \ifdraft{%
      \YAD@reach@file{%
        \YAD@texte%
      }%
    }{%
      % \ifbool{YAD@nolink}{%
      %   \YAD@texte%
      % }{%
        \YAD@href{\cmdKV@YAD@url}{\YAD@texte}%
      % }%
    }%
  }%
}%
%    \end{macrocode}
% CrÃ©ation de la commande affichant l'adresse de l'entitÃ©
%    \begin{macrocode}
      \csdef{print#2address}{%
        \yadsetup{##1}%
        \YAD@ifemptyorundef{\cmdKV@YAD@address}{%
          \YAD@reach@file{\YAD@generic@argument@translate{address#2}}%
        }{%
          \YAD@reach@file{\cmdKV@YAD@address}%
        }%
        %
      }%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le tÃ©lÃ©phone de l'entitÃ©
%    \begin{macrocode}
      \csdef{print#2telephone}{%
        \yadsetup{##1}%
        \YAD@ifemptyorundef{\cmdKV@YAD@telephone}{%
          \YAD@reach@file{\YAD@generic@argument@translate{telephone#2}}%
        }{%
          \YAD@reach@file{\cmdKV@YAD@telephone}%
        }%
        %
      }%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le fax de l'entitÃ©
%    \begin{macrocode}
      \csdef{print#2fax}{%
        \yadsetup{##1}%
        \YAD@ifemptyorundef{\cmdKV@YAD@fax}{%
          \YAD@reach@file{\YAD@generic@argument@translate{fax#2}}%
        }{%
          \YAD@reach@file{\cmdKV@YAD@fax}%
        }%
        %
      }%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le rÃ©sultat de la commande
% de type email
%    \begin{macrocode}
\csdef{print#2email}{%
  \YAD@reach@file{%
    \YAD@ifemptyorundef{\cmdKV@YAD@email}{%
      % \ifbool{YAD@nolink}{%
      %   \YAD@generic@argument@translate{#2email}%
      % }{%
        \YAD@href{mailto:#2@institute.fr}{\YAD@generic@argument@translate{#2email}}%
      % }%
    }{%
      % \ifbool{YAD@nolink}{%
      %   \YAD@nolinkurl{\cmdKV@YAD@email}%
      % }{%
        \YAD@href{mailto:\cmdKV@YAD@email}{\YAD@nolinkurl{\cmdKV@YAD@email}}%
      % }%
    }%
  }%
}%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le logo de l'entitÃ© (sauf si Ã—nologoÃ— est demandÃ©).
%    \begin{macrocode}
\ifbool{YAD@nologo}{%
      }{%
        \csdef{print#2logo}{%
% %    \end{macrocode}
% % Un avertissement est Ã©mis si le logo de l'Ã©cole doctorale est fourni car
% % celui-ci n'apparaÃ®tra nulle part.
% %    \begin{macrocode}
%         \ifthenelse{\equal{#2}{doctoralschool}}{%
%           \YAD@ClassWarningNoLine{%
%             Le logo de l'Ã©cole doctorale a Ã©tÃ© fourni mais\MessageBreak%
%             il n'apparaÃ®tra nulle part. Le mieux est de le supprimer%
%           }%
%         }{%
%         }%
        \@ifstar{%
        \@tempswatrue%
        \csuse{YAD@starnostar@print#2logo}%
        }{%
        \@tempswafalse%
        \csuse{YAD@starnostar@print#2logo}%
        }%
      }%
      \csdef{YAD@starnostar@print#2logo}{%
        \yadsetup{url=,nologo=false,##1}%
        \ifbool{YAD@nologo}{%
        }{%
          \ifbool{YAD@logo@before}{%
            \hspace{\stretch{1}}%
          }{%
          }%
          \renewcommand*\YAD@logo{%
            \YAD@ifemptyorundef{\cmdKV@YAD@logo}{%
              \YAD@reach@file{\YAD@generic@argument@translate{logo#2}}%
            }{%
              \YAD@reach@file{%
                \includegraphics[height=\cmdKV@YAD@logoheight]{\cmdKV@YAD@logo}%
                \renewcommand*\cmdKV@YAD@logo{}%
              }%
            }%
          }%
          \if@tempswa%
          \else%
          % \ifbool{YAD@nolink}{%
          % \YAD@logo%
          % }{%
          \YAD@ifemptyorundef{\cmdKV@YAD@url}{%
            % \YAD@href{www.#2.fr}{
            \YAD@logo%
            % }%
          }{%
            \YAD@href{\cmdKV@YAD@url}{\YAD@logo}%
          }%
          % }%
          \fi%
          \setlength\cmdKV@YAD@logoheight{\YAD@default@logoheight}%
          \boolfalse{YAD@nologo}%
          \booltrue{YAD@logo@before}%
        }%
      }%
    }%
  }%
}{%
}%
%    \end{macrocode}
% CrÃ©ation d'une commande bilingue
%    \begin{macrocode}
\ifthenelse{\equal{#1}{bilingue}}{%
  \ifthenelse{\isnamedefined{#2}}{%
  }{%
    \csdef{#2}{}%
  }%
  \expandafter\renewcommand\expandafter{\csname #2\endcsname}[2][]{%
%    \end{macrocode}
% CrÃ©ation des commandes pour les mÃ©ta-donnÃ©es du PDF
%    \begin{macrocode}
\ifthenelse{\isempty{##1}}{%
  \csdef{YAD@meta#2}{%
    ##2%
  }%
}{%
  \csdef{YAD@meta#2}{%
    ##2 (##1)%
  }%
}%
\ifthenelse{\isempty{##2}}{%
  \YAD@ClassError[no#2]{%
    Argument obligatoire de \csuse{#2}\space vide%
  }{%
    L'argument obligatoire de la commande \csuse{#2}\MessageBreak%
    est vide (celui-ci doit Ãªtre renseignÃ©).%
  }%
}{%
}%
\ifthenelse{\equal{#2}{title}}{%
  \AddToHook{begindocument/before}{\YAD@hypersetup{pdftitle=\YAD@metatitle}}%
}{%
}%
\ifundef{\YAD@metasubject}{%
  \ifundef{\YAD@metaacademicfield}{%
  }{%
    \AddToHook{begindocument/before}{\YAD@hypersetup{pdfsubject=\YAD@metaacademicfield}}%
  }%
}{%
  \AddToHook{begindocument/before}{\YAD@hypersetup{pdfsubject=\YAD@metasubject}}%
}%
%    \end{macrocode}
% CrÃ©ation de la commande affichant le rÃ©sultat de la commande bilingue
%    \begin{macrocode}
\csdef{print#2}{%
        \YAD@reach@file{%
          \expandafter\IfLanguageName{\YAD@mainlanguage}{%
%    \end{macrocode}
% En langue principale
%    \begin{macrocode}
            \ifthenelse{\isempty{##2}}{%
              \YAD@reach@file{\YAD@generic@argument@translate{#2}}%
            }{%
              \YAD@reach@file{##2}%
            }%
          }{%
%    \end{macrocode}
% En langue secondaire
%    \begin{macrocode}
            \ifthenelse{\isempty{##1}}{%
              \ifbool{YAD@two@titles}{%
                \YAD@ClassError[no#2]{%
                  Argument optionnel de \csuse{#2}\space vide%
                }{%
                  La commande \csuse{#2}\space a Ã©tÃ© utilisÃ©e\MessageBreak%
                  mais avec un argument optionnel vide : celui-ci doit\MessageBreak%
                  Ãªtre soit non vide soit pas utilisÃ©%
                }%
                \YAD@reach@file{\YAD@generic@argument@translate{#2}}%
              }{%
              }%
            }{%
              \YAD@reach@file{##1}%
            }%
          }%
        }%
      }%
      \ifthenelse{\isempty{##1}}{%
      }{%
        \ifthenelse{\equal{#2}{subject}}{%
        }{%
          \booltrue{YAD@two@titles}%
        }%
      }%
    }%
  }{%
  }%
}%
%    \end{macrocode}
%
% DÃ©finition des commandes des donnÃ©es de la thÃ¨se
%
%    \begin{macrocode}
\YAD@create@macro[entite]{pres}%
\YAD@create@macro[entite]{comue}%
\YAD@create@macro[entite]{institute}%
\YAD@create@macro[entite]{coinstitute}%
\YAD@create@macro[entite]{company}%
\YAD@create@macro[entite]{cocompany}%
\YAD@create@macro[entite]{doctoralschool}%
\YAD@create@macro{colophontext}%
\YAD@create@macro[bilingue]{academicfield}%
\YAD@create@macro[bilingue]{speciality}%
\YAD@create@macro[bilingue]{title}%
\YAD@create@macro[bilingue]{subtitle}%
\YAD@create@macro[bilingue]{subject}%
\YAD@create@macro{disclaimertext}%
%    \end{macrocode}
% Commande dÃ©finissant le numÃ©ro d'ordre de la thÃ¨se, tel qu'exigÃ© par certains
% instituts.
% \begin{macro}{\ordernumber}
%    \begin{macrocode}
\newcommand{\ordernumber}{%
  \@ifnextchar[{%
    \YAD@ordernumber@with@argument%
  }{%
    \YAD@ordernumber@without@argument%
  }%]
}%
\newcommand{\YAD@ordernumber@with@argument}[1][]{%
  \csdef{printordernumber}{%
    \ifthenelse{\isempty{#1}}{%
      \YAD@reach@file{%
        \YAD@generic@argument@translate{ordernumber}%
      }%
      \YAD@ClassError{%
        Argument optionnel de \protect\ordernumber\space vide%
      }{%
        La commande \protect\ordernumber\space a Ã©tÃ©
        utilisÃ©e\MessageBreak%
        mais avec un argument optionnel vide : celui-ci doit\MessageBreak%
        Ãªtre soit non vide soit pas utilisÃ©.%
      }%
    }{%
      #1%
    }%
  }%
}%
\newcommand{\YAD@ordernumber@without@argument}{%
  \csdef{printordernumber}{%
    \hspace{2cm}%
  }%
}%
%    \end{macrocode}
% \end{macro}
% Commande dÃ©finissant l'auteur.
% \begin{macro}{\author}
%    \begin{macrocode}
\renewcommand*{\author}[3][]{%
  \ifthenelse{\isempty{#2}}{%
    \newcommand*\YAD@firstname@author{%
      \YAD@generic@argument@translate{firstname}%
    }%
  }{%
    \newcommand*\YAD@firstname@author{%
      #2%
    }%
  }%
  \ifthenelse{\isempty{#3}}{%
    \newcommand*\YAD@lastname@author{%
      \YAD@generic@argument@translate{lastname}%
    }%
  }{%
    \newcommand*\YAD@lastname@author{%
      #3%
    }%
  }%
  \YAD@error@firstlastnames@empty{de l'auteur de la thÃ¨se}{#2}{#3}{\author}%
  \AddToHook{begindocument/before}{\YAD@hypersetup{pdfauthor=\YAD@firstname@author{} \YAD@lastname@author}}%
  \newcommand*\YAD@email@author{%
    #1%
  }%
  \ifthenelse{\isempty{#2}\AND\isempty{#3}}{%
    \newcommand*{\printauthor}{%
      \ifdraft{%
        \YAD@reach@file{%
          \YAD@generic@argument@translate{firstname}
          \YAD@generic@argument@translate{lastname}%
        }%
      }{%
        \ifthenelse{\isempty{#1}}{%
          \YAD@generic@argument@translate{firstname}
          \YAD@generic@argument@translate{lastname}%
        }{%
          \YAD@href{mailto:\YAD@email@author}{%
            \YAD@generic@argument@translate{firstname}
            \YAD@generic@argument@translate{lastname}%
          }%
        }%
      }%
    }%
  }{%
    \newcommand*{\printauthor}{%
      \ifdraft{%
        \YAD@reach@file{\YAD@firstname@author{} \bsc{\YAD@lastname@author}}%
      }{%
        % \ifbool{YAD@nolink}{%
        % \YAD@firstname@author{} \bsc{\YAD@lastname@author}%
        % }{%
        \ifthenelse{\isempty{#1}}{%
          \YAD@firstname@author{} \bsc{\YAD@lastname@author}%
        }{%
          \YAD@href{mailto:\YAD@email@author}{\YAD@firstname@author{} \bsc{\YAD@lastname@author}}%
        }%
        % }%
      }%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\csdef{YAD@checkdate}#1#2#3#4#5{%
  \boolfalse{YAD@valid@day}%
  \boolfalse{YAD@valid@month}%
  \boolfalse{YAD@valid@year}%
  %
  \csxdef{YAD@daydate}{#1}%
  \csxdef{YAD@monthdate}{#2}%
  \csxdef{YAD@yeardate}{#3}%
  % \ifboolexpr{%
  %   bool {YAD@submitted@work}%
  %   or bool {YAD@submitted@work@star}%
  % }{%
  % }{%
    \ifboolexpr{%
      not (test {\IfInteger{\YAD@daydate}})%
    }{%
      \YAD@ClassError[nodate]{%
        Jour de la date de #5 non valide%
      }{%
        La commande \string#4{\YAD@daydate}{\YAD@monthdate}{\YAD@yeardate}\space\MessageBreak%
        n'a pas Ã©tÃ© correctement saisie car le\MessageBreak%
        numÃ©ro de jour (`\YAD@daydate') n'est pas valide :\MessageBreak%
        ce doit Ãªtre un nombre entier entre 1 et 31.%
      }%
    }{%
      \IfDecimal{\YAD@daydate}{%
        \csxdef{YAD@daydate}{\number\integerpart}%
      }{%
      }%
      \ifboolexpr{%
        test {\ifnumless{\YAD@daydate}{1}}%
        or test {\ifnumgreater{\YAD@daydate}{31}}%
      }{%
        \YAD@ClassError[nodate]{%
          Jour de la date de #5 non valide%
        }{%
          La commande \string#4{\YAD@daydate}{\YAD@monthdate}{\YAD@yeardate}\space\MessageBreak%
          n'a pas Ã©tÃ© correctement saisie car le\MessageBreak%
          numÃ©ro de jour (`\YAD@daydate') n'est pas valide :\MessageBreak%
          ce doit Ãªtre un nombre entier entre 1 et 31.%
        }%
      }{%
        \global\booltrue{YAD@valid@day}%
      }%
    }%
    % month
    \ifboolexpr{%
      not (test {\IfInteger{\YAD@monthdate}})%
    }{%
      \YAD@ClassError[nodate]{%
        Mois de la date de #5 non valide%
      }{%
        La commande \string#4{\YAD@daydate}{\YAD@monthdate}{\YAD@yeardate}\space\MessageBreak%
        n'a pas Ã©tÃ© correctement saisie car le\MessageBreak%
        numÃ©ro de mois (`\YAD@monthdate') n'est pas valide :\MessageBreak%
        ce doit Ãªtre un nombre entier entre\MessageBreak%
        1 (janvier) et 12 (dÃ©cembre).%
      }%
    }{%
      \IfDecimal{\YAD@monthdate}{%
        \csxdef{YAD@monthdate}{\number\integerpart}%
      }{%
      }%
      \ifboolexpr{%
        test {\ifnumless{\YAD@monthdate}{1}}%
        or test {\ifnumgreater{\YAD@monthdate}{12}}%
      }{%
        \YAD@ClassError[nodate]{%
          Mois de la date de #5 non valide%
        }{%
          La commande \string#4{\YAD@daydate}{\YAD@monthdate}{\YAD@yeardate}\space\MessageBreak%
          n'a pas Ã©tÃ© correctement saisie car le\MessageBreak%
          numÃ©ro de mois (`\YAD@monthdate') n'est pas valide :\MessageBreak%
          ce doit Ãªtre un nombre entier entre\MessageBreak%
          1 (janvier) et 12 (dÃ©cembre).%
        }%
      }{%
        \global\booltrue{YAD@valid@month}%
      }%
    }%
    % year
    \ifboolexpr{%
      not (test {\IfInteger{\YAD@yeardate}})%
    }{%
      \YAD@ClassError[nodate]{%
        AnnÃ©e de la date de #5 non valide%
      }{%
        La commande \string#4{\YAD@daydate}{\YAD@monthdate}{\YAD@yeardate}\space\MessageBreak%
        n'a pas Ã©tÃ© correctement saisie car l'annÃ©e\MessageBreak%
        (`\YAD@yeardate') n'est pas valide : ce doit Ãªtre\MessageBreak%
        un nombre entier.%
      }%
    }{%
      \global\booltrue{YAD@valid@year}%
    }%
  % }%
}%
%    \end{macrocode}
%
% \begin{macro}{\date}
%    \begin{macrocode}
\csdef{date}#1#2#3{%
  \YAD@checkdate{#1}{#2}{#3}{\date}{soutenance}%
  \ifboolexpr{%
      bool {YAD@valid@day}%
      and bool {YAD@valid@month}%
      and bool {YAD@valid@year}%
    }{%
      \csdef{printdate}{%
        \DTMdisplaydate{#3}{#2}{#1}{}%
      }%
    }{%
      \csdef{printdate}{%
        \YAD@generic@argument@translate{date}%
      }%
    }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\submissiondate}
%    \begin{macrocode}
\csdef{submissiondate}#1#2#3{%
  \YAD@checkdate{#1}{#2}{#3}{\submissiondate}{soumission}%
  \ifboolexpr{%
      bool {YAD@valid@day}%
      and bool {YAD@valid@month}%
      and bool {YAD@valid@year}%
    }{%
      \csdef{printsubmissiondate}{%
        \DTMdisplaydate{#3}{#2}{#1}{}%
      }%
    }{%
      \csdef{printsubmissiondate}{%
        \YAD@generic@argument@translate{submissiondate}%
      }%
    }%
}%
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \YAD@ifemptyorundef{\printdate}{%
    \ifbool{YAD@nodate}{%
    }{%
      \ifboolexpr{%
        bool {YAD@submitted@work}%
        or bool {YAD@submitted@work@star}%
      }{%
      }{%
        \YAD@ClassError[nodate]{%
          Date de soutenance non spÃ©cifiÃ©e%
        }{%
          La commande \protect\date\space n'a pas Ã©tÃ© utilisÃ©e\MessageBreak%
          (celle-ci est requise).%
        }%
      }%
    }%
  }{%
  }%
}%
%    \end{macrocode}
%
% \begin{macro}{\dedication}
%    \begin{macrocode}
\newcommand{\dedication}[1]{%
  \DTLnewrow{dedications}%
  \DTLnewdbentry{dedications}{dedication}{#1}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\frontepigraph}
%    \begin{macrocode}
\newcommand{\frontepigraph}[3][\YAD@mainlanguage]{%
  \DTLnewrow{frontepigraphs}%
  \DTLnewdbentry{frontepigraphs}{epigraphlanguage}{#1}%
  \DTLnewdbentry{frontepigraphs}{epigraph}{#2}%
  \DTLnewdbentry{frontepigraphs}{epigraphauthor}{#3}%
}%
%    \end{macrocode}
% \end{macro}
%
% RÃ©glage nÃ©cessaire sans quoi le titre courant de la nomenclature (si
% le \Package{nomencl} est chargÃ©) n'apparaÃ®t pas
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{nomencl}{%
    \let\YAD@ORI@printnomenclature\printnomenclature%
    \renewcommand{\printnomenclature}{%
      \cleardoublepage%
      \sethead[\thepage][][\nomname]{\nomname}{}{\thepage}\headrule%
      \YAD@ORI@printnomenclature%
    }%
  }{%
  }%
}%
%    \end{macrocode}
%
% \begin{macro}{\YAD@setfoot}
%   DÃ©finition d'une commande affichant un texte fixe en bas de page en cas de
%   version Ã—inprogess(*)Ã— ou Ã—submitted*Ã— de la thÃ¨se.
%    \begin{macrocode}
\ifboolexpr{%
  bool {YAD@inprogress@work}%
  or bool {YAD@inprogress@work@star}%
}{%
  \newcommand*{\YAD@setfoot}{%
    \footrule%
    \setfoot{}{\textsc{\translate{lbl-inprogressfoottext} \today}}{}%
  }%
}{%
  \ifbool{YAD@submitted@work@star}{%
    \newcommand*{\YAD@setfoot}{%
      \footrule%
      \YAD@ifemptyorundef{\printsubmissiondate}{%
        \setfoot{}{\textsc{\translate{lbl-submittedfoottext} \today}}{}%
      }{%
        \setfoot{}{\textsc{\translate{lbl-submittedfoottext} \printsubmissiondate}}{}%
      }%
    }%
  }{%
    \newcommand*{\YAD@setfoot}{}%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pagestyle}
%   RedÃ©finition permettant d'Ã©viter de devoir ajouter
%   \lstinline|\cleardoublepage| avant chaque la commande
%   \lstinline|\pagestyle| fournie par le package \package{titlesec}
%   (cet ajout est pour l'instant nÃ©cessaire pour que les entÃªtes
%   aux frontiÃ¨res des chapitres non numÃ©rotÃ©s ne soient pas
%   erronÃ©s).
%    \begin{macrocode}
\pretocmd{\pagestyle}{\cleardoublepage}{}{}%
%    \end{macrocode}
% \end{macro}
%
% RedÃ©finition de la commande Ã—\tableofcontentsÃ— de sorte qu'elle admette un
% argument optionnel permettant d'afficher une table des matiÃ¨res supplÃ©mentaire
% jusqu'Ã&nbsp; un niveau donnÃ©. Cette commande, qui s'appuie sur le \Package{etoc},
% est exprimÃ©e en les mÃªme termes que le \Package{tocvsec2} (dÃ©sormais non
% chargÃ©). On lui applique le style de page propre Ã&nbsp; la partie liminaire du
% document, notamment dÃ©but de la prise en compte des chapitres et sections
% (numÃ©rotÃ©s ou pas) dans la table des matiÃ¨res.
%
% \begin{macro}{\tableofcontents}
%    \begin{macrocode}
        \AfterEndPreamble{%
          \let\YAD@ORI@tableofcontents\tableofcontents%
          \let\YAD@ORI@etoctableofcontents\etoctableofcontents%
          \let\YAD@ORI@localtableofcontents\localtableofcontents%
          \renewcommand{\tableofcontents}{%
            \booltrue{YAD@tableofcontents@used}%
            \pagestyle{preliminary}%
            \YAD@phantomsection%
            % \renewcommand{\contentsname}{\cmdKV@YAD@name}
            \@ifnextchar[{\tableofcontents@YAD@with@argument}{\tableofcontents@YAD@without@argument}%]
          }%
          \newcommand\tableofcontents@YAD@without@argument{%
            \YAD@globalstyle
            \YAD@computenumwidths\relax%
            \etoctableofcontents%
            \etocsetnexttocdepth{\YAD@tocdepth}%
            \let\cmdKV@YAD@depth\YAD@tocdepth%
            \let\cmdKV@YAD@name\contentsname%
            \YAD@localstyle % pour les local TOCs qui suivent
            \ifbool{YAD@mainmatter}%
            {%
              \pagestyle{mainmatter}%
            }{%
            }%
            \ifbool{YAD@backmatter}%
            {%
              \pagestyle{backmatter}%
            }{%
            }%
          }%
          \newcommand\tableofcontents@YAD@with@argument[1][]{%
            \yadsetup{#1}%
            \etocifunknownlevelTF {\cmdKV@YAD@depth}
            {%
              \YAD@ClassWarningNoLine{%
                La valeur (`\cmdKV@YAD@depth') passÃ©e Ã&nbsp; la clÃ© `depth'\MessageBreak%
                en argument de la commande \string\tableofcontents\space n'est pas\MessageBreak%
                un des niveaux de sectionnement connus :\MessageBreak%
                `part', `chapter', `section', `subsection',\MessageBreak%
                `subsubsection', `paragraph', `subparagraph', `none' et `all'.\MessageBreak%
                Le niveau `\YAD@tocdepth' va Ãªtre utilisÃ© Ã&nbsp; la place%
              }%
              \let\cmdKV@YAD@depth\YAD@tocdepth
            }{%
            }%
            \YAD@globalstyle
            \etocsetnexttocdepth{\cmdKV@YAD@depth}%
            \YAD@computenumwidths\relax% note: Ã&nbsp; effet global
            \etocsetnexttocdepth{\cmdKV@YAD@depth}% on doit le rÃ©pÃ©ter, car c'est un truc Ã&nbsp; un coup seulement
            \etoctableofcontents%
            \etocsettocdepth{\YAD@tocdepth}%
            \let\cmdKV@YAD@depth\YAD@tocdepth%
            \let\cmdKV@YAD@name\contentsname%
            \YAD@localstyle % pour les local TOCs qui suivent
            \ifbool{YAD@mainmatter}%
            {%
              \pagestyle{mainmatter}%
            }{%
            }%
            \ifbool{YAD@backmatter}%
            {%
              \pagestyle{backmatter}%
            }{%
            }%
          }%
        }%
%    \end{macrocode}
% \end{macro}
%
% On crÃ©e la macro Ã—\YAD@setsecnumdepthÃ—, analogue Ã&nbsp; Ã—\@setseccntt@cÃ— du
% \Package{tocvsec2}, qui fixe la valeur du compteur Ã—secnumdepthÃ— selon
% l'argument donnÃ© sous la forme du nom d'une commande de sectionnement
%    \begin{macrocode}
        \newcommand{\YAD@setsecnumdepth}[1]{%
        \newif\if@YAD@knownsect%
        \ifthenelse{\equal{#1}{none}}{%
        \setcounter{secnumdepth}{-10}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{part}}{%
        \setcounter{secnumdepth}{-1}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{chapter}}{%
        \setcounter{secnumdepth}{0}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{section}}{%
        \setcounter{secnumdepth}{1}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{subsection}}{%
        \setcounter{secnumdepth}{2}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{subsubsection}}{%
        \setcounter{secnumdepth}{3}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{paragraph}}{%
        \setcounter{secnumdepth}{4}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{subparagraph}}{%
        \setcounter{secnumdepth}{5}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \ifthenelse{\equal{#1}{all}}{%
        \setcounter{secnumdepth}{100}%
        \@YAD@knownsecttrue%
        }{%
        }%
        \if@YAD@knownsect%
        \else%
        \setcounter{secnumdepth}{3}%
        \YAD@ClassWarningNoLine{%
        La valeur (`\YAD@secnumdepth') passÃ©e Ã&nbsp; la clÃ© `secnumdepth'\MessageBreak%
        en argument de la commande \string\documentclass\space n'est
        pas\MessageBreak%
        un des niveaux de sectionnement connus (`part', `chapter',\MessageBreak%
        `section', `subsection', `subsubsection', `paragraph',\MessageBreak%
        `subparagraph', `none' et `all').\MessageBreak%
        Le niveau `subsection' va Ãªtre utilisÃ©\MessageBreak%
        Ã&nbsp; la place%
        }%
        \fi%
        }
%    \end{macrocode}
%
% Globalement dans le document, la table des matiÃ¨res et la
% numÃ©rotation des paragraphes vont jusqu'aux sous-sections.
%    \begin{macrocode}
      \etocsettocdepth{\YAD@tocdepth}%
      \AddToHook{begindocument}{%
        % \yadsetup{#1}%
      \YAD@setsecnumdepth{\YAD@secnumdepth}%
      }
      % \renewcommand{\setcounter}[2]{}%
      %
%    \end{macrocode}
%
% DÃ©finition des styles de pages (basÃ©s sur le \Package{titleps}, chargÃ© par le
% \Package{titlesec} avec l'option Ã—titlepsÃ—).
%
% \begin{macro}{\YAD@chapter@header}
% DÃ©finition de titres courants
%    \begin{macrocode}
\DeclareRobustCommand{\YAD@chapter@header}{%
  \ifthechapter{%
    \MakeUppercase\chaptertitlename\ \thechapter.
  }{%
  }%
  \chaptertitle%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@section@header}
%    \begin{macrocode}
\DeclareRobustCommand{\YAD@section@header}{%
  \ifthesection{%
    \thesection.
  }{%
  }%
  \sectiontitle%
}%
%    \end{macrocode}
% \end{macro}
% Par dÃ©faut, au dÃ©but du document rien n'est numÃ©rotÃ© et les chapitres ne
% dÃ©butent pas par des tables des matiÃ¨res locales.
%    \begin{macrocode}
  \AddToHook{begindocument}{%
    \setcounter{secnumdepth}{-10}%
    \frontmatter%
    \boolfalse{YAD@localtocs}%
  }%
%    \end{macrocode}
%
% Code de dÃ©bogage pour localiser les styles de pages appliquÃ©s.
%    \begin{macrocode}
% \RequirePackage{background}
% \xapptocmd{\pagestyle}{%
%   \SetBgContents{#1}
%   \SetBgScale{2}
%   \SetBgAngle{0}
%   \SetBgOpacity{1}
%   \SetBgColor{blue}
%   \SetBgPosition{current page.south west}
%   \SetBgHshift{3cm}
%   \SetBgVshift{1cm}
% }{}{}%
%    \end{macrocode}
%
% DÃ©finition du style de page des titres
%    \begin{macrocode}
\newpagestyle{titles}[]{%
%    \end{macrocode}
% Au dÃ©but du document, donc Ã&nbsp; partir de sa ou ses pages de titre,
% aucun Ã©lÃ©ment de structuration n'est numÃ©rotÃ© ni ne figure dans la
% table des matiÃ¨res
%    \begin{macrocode}
  % \settocdepth{none}%
  \setcounter{secnumdepth}{-10}%
  \ifdraft{%
      \newgeometry{
      centering,
      nomarginpar,
      bottom=1cm,
      top=1cm,
      headheight=\YAD@max@logoheight,
      margin=0.5cm,
      tmargin=\YAD@max@logoheight+1cm
      }%
  }{%
      \newgeometry{
      centering,
      nomarginpar,
      bottom=1cm,
      top=1cm,
      headheight=\YAD@max@logoheight,
      hmargin=2cm,
      includeall
      }%
  }%
  \sethead[]%
  []%
  []%
  {%
    \ifdef{\printpreslogo}{%
      \printpreslogo%
    }{%
    }%
    \ifdef{\printcomuelogo}{%
      \printcomuelogo%
    }{%
    }%
    \ifdef{\printinstitutelogo}{%
      \printinstitutelogo%
    }{%
    }%
    \ifdef{\printcoinstitutelogo}{%
      \printcoinstitutelogo%
    }{%
    }%
    \ifdef{\printcompanylogo}{%
      \printcompanylogo%
    }{%
    }%
  }%
  {}%
  {}%
  \setfootrule{0pt}%
  \setfoot{}{}{}%
}%
%    \end{macrocode}
%
% DÃ©finition du style de page de la partie prÃ©-prÃ©liminaire:
% gÃ©omÃ©trie restaurÃ©e mais toujours pas de titres courants
%    \begin{macrocode}
\newpagestyle{prepreliminary}[]{%
  \sethead{}{}{}%
  \setfoot{}{}{}%
  \setheadrule{0pt}%
  \setfootrule{0pt}%
%    \end{macrocode}
% Dans la partie prÃ©-prÃ©liminaire, aucun Ã©lÃ©ment de structuration n'est
% numÃ©rotÃ©, les titres courants sont absents et la profondeur de la table des
% matiÃ¨res est fixÃ©e Ã&nbsp; son niveau par dÃ©faut (sous-sections)
%    \begin{macrocode}
  \setcounter{secnumdepth}{-10}%
  % \YAD@setfoot%
}%
%    \end{macrocode}
% DÃ©finition du style de page de la partie prÃ©liminaire: dÃ©but
% de l'insertion des titres courants
%    \begin{macrocode}
\newpagestyle{preliminary}[]{%
  \sethead[\thepage]%
  []%
  [\YAD@chapter@header]%
  {%
    \ifthenelse{%
      \equal{\sectiontitle}{}%
    }{%
      \YAD@chapter@header%
    }{%
      \YAD@section@header%
    }%
  }%
  {}%
  {\thepage}%
  \headrule%
%    \end{macrocode}
% Dans la partie prÃ©liminaire, aucun Ã©lÃ©ment de structuration n'est
% numÃ©rotÃ© et la profondeur de la table des matiÃ¨res est fixÃ©e Ã&nbsp; son
% niveau par dÃ©faut (sous-sections)
%    \begin{macrocode}
  \setcounter{secnumdepth}{-10}%
  \YAD@setfoot%
}%
%    \end{macrocode}
% DÃ©finition du style de page de la partie principale
%    \begin{macrocode}
\newpagestyle{mainmatter}[]{%
  \sethead[\thepage]%
  []%
  [\YAD@chapter@header]%
  {%
    \ifthenelse{%
      \equal{\sectiontitle}{}%
    }{%
      \YAD@chapter@header%
    }{%
      \YAD@section@header%
    }%
  }%
  {}%
  {\thepage}%
  \headrule%
%    \end{macrocode}
% Dans la partie principale, la profondeur de la table des matiÃ¨res
% est fixÃ©e Ã&nbsp; son niveau par dÃ©faut (sous-sections).
%    \begin{macrocode}
  \YAD@setsecnumdepth{\YAD@secnumdepth}%
  \YAD@setfoot%
}%
%    \end{macrocode}
% Extension de la commande Ã—\mainmatterÃ— de sorte qu'elle applique le style de
% page Ã—mainmatterÃ— et que les chapitres qui s'y trouvent dÃ©butent
% automatiquement par des tables des matiÃ¨res locales.
%    \begin{macrocode}
\xapptocmd{\mainmatter}{%
  \booltrue{YAD@mainmatter@used}%
  \booltrue{YAD@mainmatter}%
  \pagestyle{mainmatter}%
  \ifbool{YAD@localtocs@classoption}%
  {%
    \booltrue{YAD@localtocs}%
  }{%
  }%
  \ifthenelse{\equal{\YAD@interligne}{single}}{%
    \singlespacing%
  }{%
    \ifthenelse{\equal{\YAD@interligne}{double}}{%
      \doublespacing%
    }{%
      \onehalfspacing%
    }%
  }%
}{}{}%
%    \end{macrocode}
% VÃ©rification, en fin de document, de l'usage de la commande Ã—\mainmatterÃ— et
% Ã©mission d'une erreur si Ã§a n'est pas le cas.
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \ifboolexpr{%
    bool {YAD@mainmatter@used}%
  }{%
  }{%
    \YAD@ClassError*{%
      Commande \protect\mainmatter\space non utilisÃ©e%
    }{%
      La commande \protect\mainmatter\space introduisant la partie principale
      du document\MessageBreak%
      n'a pas Ã©tÃ© utilisÃ©e. Celle-ci est requise.%
    }%
  }%
}%
%    \end{macrocode}
% Pour que les bibliographies locales apparaissent automatiquement Ã&nbsp; chaque fin de
% chapitre, la commande Ã—\chapterÃ— est redÃ©finie de maniÃ¨re Ãªtre prÃ©cÃ©dÃ©e par
% l'insertion de la bibliographie locale (Ã—\printlocalbibsÃ—) du, donc, chapitre
% prÃ©cÃ©dent (affichÃ©e seulement si celle-ci n'est pas vide). Ceci fonctionne
% bien, sauf :
% \begin{itemize}
% \item pour les chapitres sÃ©parÃ©s par des commandes intermÃ©diaires (Ã—\partÃ—,
%   Ã—\mainmatterÃ—, Ã—\appendixÃ—, etc.)
% \item en fin de document (Ã—\enddocumentÃ—).
% \end{itemize}
% Il est donc nÃ©cessaire que ces commandes commencent donc elles-mÃªmes par
% l'insertion de la bibliographie locale du chapitre prÃ©cÃ©dent
% (Ã—\printlocalbibsÃ—), commande assurant que les chapitres suivant
% (Ã©ventuellement) ces commandes ne l'afficheront pas en double.
% \begin{macro}{\appendix}
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \xpretocmd{\part}{%
    \printlocalbibs{}%
  }{}{}%
  \pretocmd{\mainmatter}{%
    \printlocalbibs{}%
    \cleardoublepage%
  }{}{}%
  \pretocmd{\appendix}{%
    \printlocalbibs{}%
    \cleardoublepage%
  }{}{}%
  \pretocmd{\backmatter}{%
    \printlocalbibs{}%
    \cleardoublepage%
  }{}{}%
  \pretocmd{\enddocument}{%
    \printlocalbibs{}%
  }{}{}%
}
%    \end{macrocode}
% Extension de la commande Ã—\appendixÃ— de sorte que les chapitres d'annexe
% soient correctement nommÃ©s.
%    \begin{macrocode}
  \apptocmd{\appendix}{%
    \renewcommand\chaptername{\appendixname}%
    \singlespacing%
  }{}{}%
%    \end{macrocode}
%    \end{macro}
% DÃ©finition du style de page de la partie finale
%    \begin{macrocode}
\newpagestyle{backmatter}[]{%
  \singlespacing%
  \sethead[\thepage]%
  []%
  [\YAD@chapter@header]%
  {%
    \ifthenelse{%
      \equal{\sectiontitle}{}%
    }{%
      \YAD@chapter@header%
    }{%
      \YAD@section@header%
    }%
  }%
  {}%
  {\thepage}%
  \headrule%
%    \end{macrocode}
% Dans la partie finale, rien n'est numÃ©rotÃ©
%    \begin{macrocode}
  \YAD@phantomsection%
  \setcounter{secnumdepth}{-10}%
  \YAD@bookmarksetup{startatroot}%
  \YAD@setfoot%
}%
%    \end{macrocode}
% Extension de la commande Ã—\backmatterÃ— de sorte qu'elle applique le style de
% page Ã—backmatterÃ— et que les chapitres qui s'y trouvent ne dÃ©butent pas par
% des tables des matiÃ¨res locales.
% \begin{macro}{\backmatter}
%    \begin{macrocode}
\xapptocmd{\backmatter}{%
  \pagestyle{backmatter}%
  \booltrue{YAD@backmatter}%
  \boolfalse{YAD@localtocs}%
}{}{}%
%    \end{macrocode}
% \end{macro}
% DÃ©finition du style de page de la partie \textquote{4\ieme{} de
% couverture} (\emph{blub} en anglais).
%    \begin{macrocode}
\newpagestyle{backcover}[]{%
  \singlespacing%
  \setlength{\footskip}{35pt}%
  \setfootrule{0pt}%
  \setfoot[%
  \YAD@laboratory@abstract@page%
  ][][]{}{}{}%
  \sethead[]%
  []%
  []%
  {}%
  {}%
  {}%
%    \end{macrocode}
% Dans la partie \textquote{4\ieme{} de couverture}, aucun Ã©lÃ©ment
% de structuration n'est numÃ©rotÃ©
%    \begin{macrocode}
  \setcounter{secnumdepth}{-10}%
}%
%    \end{macrocode}
%
% \begin{macro}{\printlaboratory}
%    \begin{macrocode}
\newcommand*{\printlaboratory}[2][]{%
  \YAD@ifemptyorundef{#2}{%
    \YAD@reach@file{\YAD@generic@argument@translate{laboratory}}%
    \ifbool{YAD@nolaboratory}{%
    }{%
      \YAD@ClassError[nolaboratory]{%
        Nom du laboratoire de la thÃ¨se non spÃ©cifiÃ© ou vide%
      }{%
        La commande \protect\laboratory\space n'a pas Ã©tÃ© utilisÃ©e\MessageBreak%
        (celle-ci est requise) ou son 1er argument est vide\MessageBreak%
        (celui-ci doit Ãªtre renseignÃ©).%
      }%
    }%
  }{%
    \ifdraft{%
      \YAD@reach@file{%
        #2%
      }%
    }{%
      \ifboolexpr{%
        test {\expandafter\ifstrempty\expandafter{#1}}
        or %
        test {\ifdefstring{\YAD@laboratory@nonamelink}{true}}%
      }{%
        #2%
      }{%
        \YAD@href{#1}{#2}%
      }%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\printlaboratoryaddress}
%    \begin{macrocode}
\newcommand*{\printlaboratoryaddress}[1]{%
  \ifundef{#1}{%
    \YAD@reach@file{\YAD@generic@argument@translate{laboratoryaddress}}%
    \ifbool{YAD@nolaboratoryaddress}{%
    }{%
      \YAD@ClassError[nolaboratoryaddress]{%
        Adresse du laboratoire non spÃ©cifiÃ©e ou vide%
      }{%
        La commande \protect\laboratory\space n'a pas Ã©tÃ© utilisÃ©e\MessageBreak%
        (celle-ci est requise) ou son 2e argument est vide\MessageBreak%
        (celui-ci doit Ãªtre renseignÃ©).%
      }%
    }%
  }{%
    \YAD@reach@file{#1}%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\maketitle}
% Commande de la page de titre
%    \begin{macrocode}
\renewcommand{\maketitle}[1][]{%
  \booltrue{YAD@maketitle@used}%
  \yadsetup{#1}%
  \setlength{\fboxsep}{10pt}%
  \setlength{\YAD@titleboxwidth}{\linewidth-2\fboxsep-2\fboxrule}%
%    \end{macrocode}
% Appel du style de page propre au(x) titre(s)
%    \begin{macrocode}
  \pagestyle{titles}%
  \renewcommand*{\do}[1]{%
%    \end{macrocode}
% Chaque nouvelle page de titre commence en page impaire.
%    \begin{macrocode}
    \cleardoublepage%
%    \end{macrocode}
% On passe dans la langue choisie en option (en franÃ§ais si rien n'est
% spÃ©cifiÃ©).
%    \begin{macrocode}
\begingroup%
\expandafter\selectlanguage\expandafter{##1}%
% \YAD@ifemptyorundef{\YAD@frametitle@set}{%
%   \gdef\YAD@frametitle{\cmdKV@YAD@frametitle}%
% }{%
%   \gdef\YAD@frametitle{\YAD@frametitle@set}%
% }%
  \begin{lrbox}{\YAD@titlebox}
    \ifthenelse{\equal{\cmdKV@YAD@frametitle}{none}}{%
    }{%
      \tcbset{colback=white,boxsep=3pt,boxrule=0.4pt,arc=0mm}%
      \ifthenelse{\equal{\cmdKV@YAD@frametitle}{shadowbox}}{%
        \tcbset{enhanced,drop shadow southeast={black,opacity=1}}%
      }{%
        \ifthenelse{\equal{\cmdKV@YAD@frametitle}{ovalbox}}{%
          \tcbset{arc=3mm}%
        }{%
          \ifthenelse{\equal{\cmdKV@YAD@frametitle}{fbox}}{%
          }{%
            \tcbset{code={\expandafter\pgfkeysalsofrom{\cmdKV@YAD@frametitle}}}%
          }%
        }%
      }%
      \begin{tcolorbox}
    }%
    \noindent%
    \centering%
    \begin{minipage}{\linewidth-2\fboxsep-2\fboxrule}
      % \onehalfspacing%
      \noindent%
      \ifthenelse{\equal{\cmdKV@YAD@frametitle}{none}}{%
      }{%
        \ifYAD@hdr
        \YAD@translation{thesistitle-hdr}%
        \else%
        \YAD@translation{thesistitle}%
        \fi
      }%
      \par%
      \centering%
      \Huge\bfseries%
      \YAD@ifemptyorundef{\printtitle}{%
        \YAD@generic@argument@translate{title}%
        \ifbool{YAD@notitle}{%
        }{%
          \YAD@ClassError[notitle]{%
            Titre de la thÃ¨se non spÃ©cifiÃ©%
          }{%
            La commande \protect\title\space n'a pas Ã©tÃ© utilisÃ©e\MessageBreak%
            (celle-ci est requise) ou son argument obligatoire est vide\MessageBreak%
            (celui-ci doit Ãªtre renseignÃ©).%
          }%
        }%
      }{%
        \printtitle%
      }%
      \ifundef{\printsubtitle}{%
      }{%
        \ifdraft{}{%
          \vskip0.5em%
          % \vspace*{\stretch{.15}}%
        }%
        \par%
        \centering%
        \Large\printsubtitle%
      }%
    \end{minipage}%
    \ifthenelse{\equal{\cmdKV@YAD@frametitle}{none}}{%
    }{%
    \end{tcolorbox}%
  }%
  \end{lrbox}%
  \settototalheight{\YAD@titleboxheight}{\YAD@titlebox}%
  \setlength{\YAD@otherboxheight}{0.3\paperheight-\YAD@titleboxheight}%
%    \end{macrocode}
% On met en page les divers Ã©lÃ©ments des titres.
%    \begin{macrocode}
  %\YAD@astuce@expressioncle%
  \noindent%
  \ifcsdef{printordernumber}{%
%    \end{macrocode}
% S'il est demandÃ©, le numÃ©ro d'ordre de la thÃ¨se n'est affichÃ© que sur la
% 1\iere{} page du document : 1\iere{} de couverture s'il y a, page de titre en
% langue principale sinon.
%    \begin{macrocode}
  \newcommand\YAD@printedordernumber{%
    \itshape%
    \sffamily%
    \YAD@translation{ordernumber}%
    \IfLanguageName{french}{%
      \FBcolonspace%
    }{%
    }: \printordernumber%
  }
  \ifdraft{}{\vspace*{\stretch{1}}}%
  \ifboolexpr{%
    bool {YAD@cover@page}%
    or (bool {YAD@nofrontcover} and test {\IfLanguageName{\YAD@mainlanguage}})%
  }{%
    % \vspace*{\stretch{1}}%
    \raggedleft{%
      \YAD@printedordernumber%
    }%
  }{%
  }%
  \ifdraft{}{\vspace*{\stretch{.5}}}%
  % \vspace*{\stretch{.5}}%
  \par%
}{%
}%
    % \begin{minipage}[c][\YAD@otherboxheight][c]{\YAD@titleboxwidth}
    %   \ifdraft{}{\vspace*{\stretch{.25}}}%
    \begin{center}
      \ifbool{YAD@noinstitute}{%
      }{%
        \YAD@ifemptyorundef{\printinstitute}{%
          \YAD@generic@argument@translate{institute}%
          \YAD@ClassError[noinstitute]{%
            Institut de la thÃ¨se non spÃ©cifiÃ©%
          }{%
            La commande \protect\institute\space n'a pas Ã©tÃ©
            utilisÃ©e\MessageBreak%
            (celle-ci est requise) ou son argument obligatoire est
            vide\MessageBreak%
            (celui-ci doit Ãªtre renseignÃ©).%
          }%
        }{%
          \YAD@translation{institute} \textbf{\textsc{\Large\printinstitute}}%
        }%
        \ifundef{\printcoinstitute}{%
        }{%
          \ifdraft{}{\vspace*{\stretch{.5}}}%
          % \vspace*{\stretch{.5}}%
          \par%
          \YAD@translation{coinstitute} \textbf{\textsc{\Large\printcoinstitute}}%
        }%
      }%
      \ifundef{\printcompany}{%
      }{%
        \ifdraft{}{\vspace*{\stretch{.5}}}%
        % \vspace*{\stretch{.5}}%
        \par%
        \YAD@translation{company} \textbf{\textsc{\Large\printcompany}}%
      }%
      \ifboolexpr{%
        bool {YAD@nodoctoralschool}%
        or bool {YAD@hdr}%
      }{%
      }{%
        \ifdraft{}{\vspace*{\stretch{1.5}}}%
        % \vspace*{\stretch{1.5}}%
        \par%
        \YAD@translation{doctoralschool}
        \YAD@ifemptyorundef{\printdoctoralschool}{%
          \YAD@generic@argument@translate{doctoralschool}%
          \YAD@ClassError[nodoctoralschool]{%
            Ã‰cole doctorale de la thÃ¨se non spÃ©cifiÃ©e%
          }{%
            la commande \protect\doctoralschool\space n'a pas Ã©tÃ©
            utilisÃ©e\MessageBreak%
            (celle-ci est requise) ou son argument obligatoire est
            vide\MessageBreak%
            (celui-ci doit Ãªtre renseignÃ©).%
          }%
        }{%
          \textbf{\printdoctoralschool}%
        }%
      }%
%    \end{macrocode}
%
% Si une Ã©cole doctorale est spÃ©cifiÃ©e alors que la thÃ¨se est une HDR, un
% warning est Ã©mis.
%    \begin{macrocode}
      \ifbool{YAD@hdr}{%
        \YAD@ifemptyorundef{\printdoctoralschool}{%
        }{%
          \YAD@ClassWarningNoLine{%
            Une Ã©cole doctorale a Ã©tÃ© spÃ©cifiÃ©e mais elle ne\MessageBreak%
            figurera nulle part : les HDR ne sont pas prÃ©parÃ©es\MessageBreak%
            sous l'Ã©gide d'Ã©coles doctorales (cf. \MessageBreak%
            https://www.legifrance.gouv.fr/loda/id/JORFTEXT000000298904)%
          }%
        }%
      }{%
      }%
%    \end{macrocode}
%
%    \begin{macrocode}
      \ifbool{YAD@nolaboratory}{%
      }{%
        \ifdraft{}{\vspace*{\stretch{.5}}}%
        % \vspace*{\stretch{.5}}%
        \par%
        \YAD@translation{universitydepartment}
        \ifdefstring{\YAD@main@laboratory@nonamelink}{true}{%
          \textbf{\printlaboratory{\YAD@main@laboratory@name}}%
        }{%
          \textbf{\printlaboratory[\YAD@main@laboratory@url]{\YAD@main@laboratory@name}}%
        }%
      }%
      \ifdraft{}{\vspace*{\stretch{1.5}}}%
      % \vspace*{\stretch{1.5}}%
      \par%
      {\large%
        \ifYAD@hdr%
        \YAD@translation{thesisdefendedby-hdr} %
        \else%
        \YAD@translation{thesisdefendedby} %
        \fi%
        \YAD@ifemptyorundef{\printauthor}{%
          \YAD@generic@argument@translate{author}%
          \ifbool{YAD@noauthor}{%
          }{%
            \YAD@ClassError[noauthor]{%
              Auteur de la thÃ¨se non spÃ©cifiÃ©%
            }{%
              La commande \protect\author\space n'a pas Ã©tÃ© utilisÃ©e (celle-ci
              est requise)\MessageBreak%
              ou ses 2 premiers arguments obligatoires sont vides\MessageBreak%
              (ceux-ci doivent Ãªtre renseignÃ©s).%
            }%
          }%
        }{%
          \textbf{\printauthor}%
        }%
        \ifboolexpr{%
          bool {YAD@submitted@work}%
          or bool {YAD@submitted@work@star}%
        }{%
          % \ifdraft{}{\vspace*{\stretch{1}}}%
          % \par%
          % \YAD@translation{estimateddefensedate}
          % \YAD@ifemptyorundef{\printdate}{%
          %   \YAD@generic@argument@translate{date}%
          % }{%
          %   \textbf{\printdate}%
          % }%
        }{%
          \ifbool{YAD@nodate}{%
          }{%
            \ifdraft{}{\vspace*{\stretch{1}}}%
            % \vspace*{\stretch{1}}%
            \par%
            \YAD@translation{defendedon}
            \YAD@ifemptyorundef{\printdate}{%
              \YAD@generic@argument@translate{date}%
            }{%
              \textbf{\printdate}%
            }%
          }%
        }%
      }%
      \ifYAD@hdr%
      \else%
      \ifbool{YAD@noaim}{%
      }{%
        \ifdraft{}{\vspace*{\stretch{1}}}%
        % \vspace*{\stretch{1}}%
        \par%
        \YAD@translation{aim}%
        \ifundef{\printinstitute}{%
          \YAD@generic@argument@translate{institute}%
        }{%
          \printinstitute*%
        }%
        \ifundef{\printcoinstitute}{%
        }{%
          \YAD@translation{aimand}%
          \printcoinstitute*%
        }%
      }%
      \fi%
      \ifdraft{}{\vspace*{\stretch{1}}}%
      % \vspace*{\stretch{1}}%
      \ifbool{YAD@noacademicfield}{%
      }{%
        \par%
        \large%
        \YAD@translation{academicfield}
        %
        \YAD@ifemptyorundef{\printacademicfield}{%
          \YAD@generic@argument@translate{academicfield}%
          \ifbool{YAD@noacademicfield}{%
          }{%
            \YAD@ClassError[noacademicfield]{%
              Champ disciplinaire de la thÃ¨se non spÃ©cifiÃ©%
            }{%
              La commande \protect\academicfield\space n'a pas Ã©tÃ© utilisÃ©e
              (celle-ci est requise)\MessageBreak%
              ou son argument obligatoire est vide (celui-ci doit Ãªtre renseignÃ©).%
            }%
          }%
        }{%
          \textbf{\printacademicfield}%
        }%
        \ifundef{\printspeciality}{%
        }{%
          \ifdraft{}{\vspace*{\stretch{.5}}}%
          % \vspace*{\stretch{.5}}%
          \par%
          \large%
          \YAD@translation{speciality} \textbf{\printspeciality}%
        }%
      }%
    \end{center}
  % \end{minipage}%
  \vspace*{\stretch{1}}%
  \begin{center}
    \ifthenelse{\equal{\cmdKV@YAD@frametitle}{none}}{%
    }{%
      \ifdraft{}{\vspace*{\stretch{2}}}%
      % \vspace*{\stretch{2}}%
    }{%
      \ifdraft{}{\vspace*{\stretch{.25}}}%
      % \vspace*{\stretch{.25}}%
    }%
    \usebox{\YAD@titlebox}%
    % \ifdraft{}{\vspace*{\stretch{2}}}%
    \vspace*{\stretch{2}}%
  \end{center}
%    \end{macrocode}
% Affichage des directeurs de thÃ¨se et du jury
%    \begin{macrocode}
  \noindent%
  \begin{minipage}[c][\YAD@otherboxheight][c]{\textwidth}
    \YAD@supervisors@tabular%
    \par%
    \ifboolexpr{%
      bool {YAD@submitted@work}%
      or bool {YAD@submitted@work@star}%
    }{%
      \vphantom{\YAD@committee@tabular}%
    }{%
      \YAD@committee@tabular%
    }%
    \ifdraft{}{\vspace*{\stretch{.1}}}%
    % \vspace*{\stretch{.1}}%
  \end{minipage}%
  \ifthenelse{\equal{\cmdKV@YAD@frametitle}{none}}{%
  }{%
    % \ifdraft{}{\vspace*{\stretch{2}}}%
    \vspace*{\stretch{2}}%
  }{%
  }%
  \ifbool{YAD@supervisor@specified}{%
  }{%
    \ifbool{YAD@nosupervisor}{%
    }{%
      \YAD@ClassError*[nosupervisor]{%
        Directeur de thÃ¨se non spÃ©cifiÃ©%
      }{%
        La commande \protect\supervisor\space n'a pas Ã©tÃ© utilisÃ©e\MessageBreak%
        (celle-ci est requise) ou ses arguments obligatoires sont
        vides\MessageBreak%
        (ceux-ci doivent Ãªtre renseignÃ©s).%
      }%
    }%
  }%
%    \end{macrocode}
% On repasse Ã&nbsp; la langue par dÃ©faut
%    \begin{macrocode}
\endgroup%
%    \end{macrocode}
% On insÃ¨re le code pour l'Ã©ventuel colophon
%    \begin{macrocode}
\ifthenelse{\equal{\YAD@colophon@location}{verso-frontcover}}{%
  \YAD@insert@colophon%
}{%
}%
%    \end{macrocode}
% Maintenant que la 1\iere{} page de titre (celle de 1\iere{} de couverture)
% a Ã©tÃ© crÃ©Ã©e, le boolÃ©en Ã—YAD@cover@pageÃ— est faux.
%    \begin{macrocode}
\boolfalse{YAD@cover@page}%
%    \end{macrocode}
% On gÃ©nÃ¨re une page de titre dans la langue principale puis dans la
% langue secondaire.
%    \begin{macrocode}
}%
\expandafter\docsvlist{\YAD@mainlanguage}%
\ifbool{YAD@two@titles}{%
  \booltrue{YAD@second@title}%
  \ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
    \ifbool{YAD@nofrontcover}{%
      \docsvlist{english}%
    }{%
      \docsvlist{french,english}%
    }%
  }{%
    \ifbool{YAD@nofrontcover}{%
      \docsvlist{french}%
    }{%
      \docsvlist{english,french}%
    }%
  }%
}{%
}%
\ifthenelse{\equal{\cmdKV@YAD@frametitle}{shadowbox}}{%
  \let\tcb@shadow@prepare=\origtcb@shadow@prepare%
}{%
}%
\expandafter\selectlanguage\expandafter{\YAD@mainlanguage}%
\restoregeometry%
\pagestyle{preliminary}%
}%
%    \end{macrocode}
% \end{macro}
%
% Si la commande Ã—\maketitleÃ— n'a pas Ã©tÃ© utilisÃ©e, une erreur est Ã©mise (en
% version finale).
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \ifboolexpr{%
    bool {YAD@maketitle@used}%
    or bool {YAD@nomaketitle}%
  }{%
  }{%
    \YAD@ClassError*[nomaketitle]{%
      Commande \protect\maketitle\space non utilisÃ©e%
    }{%
      La commande \protect\maketitle\space n'a pas Ã©tÃ© utilisÃ©e. Celle-ci est
      requise.%
    }%
  }%
}%
%    \end{macrocode}
%
% Le mÃ©moire est, Ã&nbsp; son dÃ©but, automatiquement en style de pages prÃ©liminaires.
%    \begin{macrocode}
\AfterEndPreamble{\pagestyle{preliminary}}%
%    \end{macrocode}
%
% Code pour l'Ã©ventuel colophon
%    \begin{macrocode}
\newcommand{\YAD@insert@colophon}{%
  \ifthenelse{\equal{\YAD@colophon@location}{nowhere}}{%
  }{%
    \ifbool{YAD@colophon}{%
    }{%
      \clearpage
      \vspace*{\stretch{1}}%
      \begin{minipage}{\linewidth}
        \expandafter\selectlanguage\expandafter{\YAD@mainlanguage}%
        \begin{colophon}
          \printcolophontext%
        \end{colophon}
      \end{minipage}
      \vspace*{\stretch{1}}%
      \newpage
      \booltrue{YAD@colophon}%
    }%
  }%
}
%    \end{macrocode}
%
% DÃ©finition de Ã—\keywordsÃ—.
% \begin{macro}{\keywords}
% \begin{macro}{\YAD@metakeywords}
%    \begin{macrocode}
\newcommand{\keywords}[2]{%
  \booltrue{YAD@keywords@used}%
  \def\YAD@mainkeywords{#1}%
  \def\YAD@secondarykeywords{#2}%
  \ifthenelse{\isempty{#1}}{%
  }{%
    \ifthenelse{\isempty{#2}}{%
      \AddToHook{begindocument/before}{\YAD@hypersetup{pdfkeywords={#1}}}%
    }{%
      \AddToHook{begindocument/before}{\YAD@hypersetup{pdfkeywords={#1} ({#2})}}%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\printkeywords}
% DÃ©finition de Ã—\printkeywordsÃ—.
%    \begin{macrocode}
\csdef{printkeywords}{%
  \expandafter\IfLanguageName{\YAD@mainlanguage}{%
    \YAD@ifemptyorundef{\YAD@mainkeywords}{%
      \YAD@generic@argument@translate{keywords}%
    }{%
      \MakeLowercase{\YAD@mainkeywords}%
    }%
  }{%
    \YAD@ifemptyorundef{\YAD@secondarykeywords}{%
      \YAD@generic@argument@translate{keywords}%
    }{%
      \MakeLowercase{\YAD@secondarykeywords}%
    }%
  }%
}%
%    \end{macrocode}
% Ã‰mission d'une erreur si les mots clÃ©s sont vides ou non spÃ©cifiÃ©s.
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \notbool{YAD@keywords@used}{%
    \ifbool{YAD@nokeywords}{%
    }{%
      \YAD@ClassError[nokeywords]{%
        Commande \protect\keywords\space non utilisÃ©e%
      }{%
        La commande \protect\keywords\space n'a pas Ã©tÃ© utilisÃ©e. Celle-ci est
        requise.%
      }%
    }%
  }{%
    \ifdefempty{\YAD@mainkeywords}{%
      \YAD@ClassError[nokeywords]{%
        Mots clÃ©s dans la langue principale non spÃ©cifiÃ©s%
      }{%
        Les mots clÃ©s dans la langue principale\MessageBreak%
        (1er argument de la commande \protect\keywords) n'ont\MessageBreak%
        pas Ã©tÃ© spÃ©cifiÃ©s. Ceux-ci sont requis.%
      }%
    }{%
      \csdef{YAD@metakeywords}{\YAD@mainkeywords} }%
    \ifdefempty{\YAD@secondarykeywords}{%
      \YAD@ClassError[nokeywords]{%
        Mots clÃ©s dans la langue secondaire non spÃ©cifiÃ©s%
      }{%
        Les mots clÃ©s dans la langue secondaire\MessageBreak%
        (2e argument de la commande \protect\keywords) n'ont\MessageBreak%
        pas Ã©tÃ© spÃ©cifiÃ©s. Ceux-ci sont requis.%
      }%
    }{%
      \csdef{YAD@metakeywords}{\YAD@mainkeywords (\YAD@secondarykeywords)}%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\makekeywords}
% Commande de la page de mots clÃ©s.
%    \begin{macrocode}
\csdef{makekeywords}{%
  \@ifstar{\@tempswatrue\csuse{YAD@starnostar@makekeywords}}{\@tempswafalse\csuse{YAD@starnostar@makekeywords}}%
}%
\csdef{YAD@starnostar@makekeywords}{%
%    \end{macrocode}
% Appel du style de page propre Ã&nbsp; la partie prÃ©liminaire
%    \begin{macrocode}
  \pagestyle{prepreliminary}%
  % \YAD@astuce@expressioncle%
  \if@tempswa%
  \else%
  \vspace*{\stretch{1}}%
  \fi
  \begin{flushleft}
    \begin{description}
      \renewcommand*{\do}[1]{%
        \expandafter\selectlanguage\expandafter{##1}%
      \item[\YAD@translation{keywords}\IfLanguageName{french}{\,}{}:]
        \YAD@ifemptyorundef{\printkeywords}{%
          \YAD@generic@argument@translate{keywords}%
        }{%
          \printkeywords%
        }%
      }%
      \expandafter\docsvlist{\YAD@mainlanguage}%
      \ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
        \docsvlist{english}%
      }{%
        \docsvlist{french}%
      }%
    \end{description}
  \end{flushleft}
  \if@tempswa%
  \else%
  \vspace*{\stretch{1}}%
  \fi
  \pagestyle{preliminary}%
  \expandafter\selectlanguage\expandafter{\YAD@mainlanguage}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\laboratory}
%    \begin{macrocode}
\DTLnewdb{laboratories}%
\newcommand{\laboratory}[3][]{%
  \DTLnewrow{laboratories}%
  \dtlexpandnewvalue%
  \yadsetup{%
    #1%
  }%
  \DTLnewdbentry{laboratories}{name}{#2}%
  \DTLnewdbentry{laboratories}{address}{#3}%
  \ifbool{YAD@nolaboratory}{%
  }{%
    \ifthenelse{\isempty{#2}}{%
      \YAD@ClassError[nolaboratory]{%
        Nom du laboratoire de la thÃ¨se vide%
      }{%
        Le 1er argument obligatoire de la commande
        \protect\laboratory\MessageBreak%
        est vide (celui-ci doit Ãªtre renseignÃ©).%
      }%
    }{%
    }%
    \ifthenelse{\isempty{#3}}{%
      \YAD@ClassError[nolaboratory]{%
        Adresse du laboratoire de la thÃ¨se vide%
      }{%
        Le 2e argument obligatoire de la commande
        \protect\laboratory\MessageBreak%
        est vide (celui-ci doit Ãªtre renseignÃ©).%
      }%
    }{%
    }%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@logo}{%
    \DTLnewdbentry{laboratories}{logo}{}%
  }{%
    \DTLnewdbentry{laboratories}{logo}{\cmdKV@YAD@logo}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@logoheight}{%
    \DTLnewdbentry{laboratories}{logoheight}{\YAD@default@logoheight}%
  }{%
    \DTLnewdbentry{laboratories}{logoheight}{\the\cmdKV@YAD@logoheight}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@url}{%
    \DTLnewdbentry{laboratories}{url}{}%
  }{%
    \DTLnewdbentry{laboratories}{url}{\cmdKV@YAD@url}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@telephone}{%
    \DTLnewdbentry{laboratories}{telephone}{}%
  }{%
    \DTLnewdbentry{laboratories}{telephone}{\cmdKV@YAD@telephone}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@fax}{%
    \DTLnewdbentry{laboratories}{fax}{}%
  }{%
    \DTLnewdbentry{laboratories}{fax}{\cmdKV@YAD@fax}%
  }%
  \YAD@ifemptyorundef{\cmdKV@YAD@email}{%
    \DTLnewdbentry{laboratories}{email}{}%
  }{%
    \DTLnewdbentry{laboratories}{email}{\cmdKV@YAD@email}%
  }%
  \ifbool{YAD@nonamelink}{%
    \DTLnewdbentry{laboratories}{nonamelink}{true}%
  }{%
    \DTLnewdbentry{laboratories}{nonamelink}{false}%
  }%
  %
  \DTLgetvalue{\YAD@main@laboratory@name}{laboratories}{1}{\dtlcolumnindex{laboratories}{name}}%
  \DTLgetvalue{\YAD@main@laboratory@address}{laboratories}{1}{\dtlcolumnindex{laboratories}{address}}%
  \DTLgetvalue{\YAD@main@laboratory@url}{laboratories}{1}{\dtlcolumnindex{laboratories}{url}}%
  \DTLgetvalue{\YAD@main@laboratory@nonamelink}{laboratories}{1}{\dtlcolumnindex{laboratories}{nonamelink}}%
  %
  \boolfalse{YAD@nonamelink}%
  \yadsetup{%
    logo=,%
    url=,%
    telephone=,%
    fax=,%
    email=,%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\makelaboratory}
% Commande crÃ©ant la page dÃ©diÃ©e au laboratoire.
%    \begin{macrocode}
\csdef{makelaboratory}{%
  \@ifstar{\@tempswatrue\csuse{YAD@starnostar@makelaboratory}}{\@tempswafalse\csuse{YAD@starnostar@makelaboratory}}%
}%
\csdef{YAD@starnostar@makelaboratory}{%
%    \end{macrocode}
% Appel du style de page propre Ã&nbsp; la partie prÃ©liminaire
%    \begin{macrocode}
  \pagestyle{prepreliminary}%
% \YAD@astuce@expressioncle%
  \if@tempswa%
  \else%
  \vspace*{\stretch{1}}%
  \fi
  \noindent%
  \ifthenelse{\DTLrowcount{laboratories}&gt;1}{%
    \ifYAD@hdr
    \YAD@translation{prepared-at-pl-hdr}%
    \else%
    \YAD@translation{prepared-at-pl}%
    \fi
  }{%
    \ifYAD@hdr
    \YAD@translation{prepared-at-hdr}%
    \else%
    \YAD@translation{prepared-at}%
    \fi
  }%
  \if@tempswa%
  \vspace*{\baselineskip}%
  \else%
  \vspace*{\stretch{.25}}%
  \fi
  \par%
  \ifthenelse{\DTLrowcount{laboratories}&lt;1}{%
    \begin{minipage}[t]{\linewidth-\parindent}
      \YAD@reach@file{\YAD@generic@argument@translate{laboratory}}%
      \\[.1cm]
      \YAD@reach@file{\YAD@generic@argument@translate{laboratoryaddress}}%
    \end{minipage}%
  }{%
  }%
  \DTLforeach*{laboratories}{%
    \YAD@laboratory@name=name,%
    \YAD@laboratory@address=address,%
    \YAD@laboratory@url=url,%
    \YAD@laboratory@logo=logo,%
    \YAD@laboratory@logoheight=logoheight,%
    \YAD@laboratory@telephone=telephone,%
    \YAD@laboratory@fax=fax,%
    \YAD@laboratory@email=email,%
    \YAD@laboratory@nonamelink=nonamelink%
  }{%
    \ifthenelse{\DTLiseq{\YAD@laboratory@logo}{}}{%
      \setlength{\YAD@laboratory@width}{\linewidth-\parindent}%
    }{%
      \setlength{\YAD@laboratory@width}{.625\linewidth-\parindent}%
    }%
    \begin{minipage}[t]{\YAD@laboratory@width}
      \textbf{\printlaboratory[\YAD@laboratory@url]{\YAD@laboratory@name}}%
      \\[.1cm]
      \printlaboratoryaddress{\YAD@laboratory@address}%
      \\[.25cm]
      \begin{tabular}{@{}ll}
        \ifthenelse{\DTLiseq{\YAD@laboratory@telephone}{}}{%
        }{%
          \YAD@translation{phone} &amp; \YAD@reach@file{\YAD@laboratory@telephone} \\%
        }%
        \ifthenelse{\DTLiseq{\YAD@laboratory@fax}{}}{%
        }{%
          \YAD@translation{fax}  &amp; \YAD@reach@file{\YAD@laboratory@fax}      \\%
        }%
        \ifthenelse{\DTLiseq{\YAD@laboratory@email}{}}{%
        }{%
          \YAD@translation{email} &amp;
          \YAD@reach@file{%
            \YAD@ifemptyorundef{\YAD@laboratory@email}{%
              % \ifbool{YAD@nolink}{%
                \YAD@generic@argument@translate{laboratoryemail}%
              % }{%
              %   \YAD@href{mailto:laboratory@institute.fr}{\YAD@generic@argument@translate{laboratoryemail}}%
              % }%
            }{%
              % \ifbool{YAD@nolink}{%
              %   \YAD@nolinkurl{\YAD@laboratory@email}%
              % }{%
                \YAD@href{mailto:\YAD@laboratory@email}{\YAD@nolinkurl{\YAD@laboratory@email}}%
              % }%
            }%
          }%
          \\%
        }%
        \ifthenelse{\DTLiseq{\YAD@laboratory@url}{}}{%
        }{%
          \YAD@translation{website} &amp; % \printlaboratoryurl
          \def\YAD@texteurl{%
            \YAD@ifemptyorundef{\YAD@laboratory@url}{%
              \YAD@reach@file{\YAD@generic@argument@translate{urllaboratory}}%
            }{%
              \YAD@reach@file{\YAD@nolinkurl{\YAD@laboratory@url}}%
            }%
          }%
          \YAD@ifemptyorundef{\YAD@laboratory@url}{%
            % \ifbool{YAD@nolink}{%
            %   \YAD@texteurl%
            % }{%
              % \YAD@href{www.laboratory.fr}{%
                \YAD@texteurl%
              % }%
            % }%
          }{%
            \ifdraft{%
              \YAD@texteurl%
            }{%
              % \ifbool{YAD@nolink}{%
              %   \YAD@nolinkurl{\YAD@laboratory@url}%
              % }{%
                \YAD@url{%
                  \YAD@laboratory@url%
                }%
              % }%
            }%
          }%
        }%
      \end{tabular}%
    \end{minipage}%
    \ifthenelse{\DTLiseq{\YAD@laboratory@logo}{}}{%
    }{%
      \hspace{\stretch{1}}%
      \adjustbox{right=.325\linewidth}{%
        \def\YAD@logo{%
          \YAD@ifemptyorundef{\YAD@laboratory@logo}{%
            \YAD@reach@file{\YAD@generic@argument@translate{logolaboratory}}%
          }{%
            \YAD@reach@file{%
              \includegraphics[height=\YAD@laboratory@logoheight,valign=t]{\YAD@laboratory@logo}%
            }%
          }%
        }%
        \if@tempswa%
        \else%
        % \ifbool{YAD@nolink}{%
        %   \YAD@logo%
        % }{%
        \YAD@ifemptyorundef{\YAD@laboratory@url}{%
          % \YAD@href{www.laboratory.fr}{%
          \YAD@logo%
          % }%
        }{%
          \YAD@href{\YAD@laboratory@url}{\YAD@logo}%
        }%
        % }%
        \fi%
      }%
    }%
    \par%
    \DTLiflastrow{%
      \vspace*{\stretch{1}}%
    }{%
      \if@tempswa%
      \vspace*{\baselineskip}%
      \else%
      \vspace*{\stretch{.25}}%
      \fi%
    }%
    \setlength\cmdKV@YAD@logoheight{\YAD@default@logoheight}%
  }%
  \ifthenelse{\DTLrowcount{laboratories}&lt;1}{%
    \vspace*{\stretch{1}}%
  }{%
  }%
  \pagestyle{preliminary}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{abstract}
%   Environnement de rÃ©sumÃ© crÃ©ant un chapitre non numÃ©rotÃ© avec un
%   intitulÃ© par dÃ©faut pouvant Ãªtre modifiÃ© au moyen d'un argument
%   optionnel. Une seconde occurrence de cet environnement est
%   similaire, mais compose le contenu dans la langue secondaire.
%    \begin{macrocode}
\csgdef{YAD@abstractname@mainlanguage}{\abstractname}%
\csgdef{YAD@abstractname@secondarylanguage}{\abstractname}%
%
\newcommand{\YAD@abstract}[1]{%
  \ifstrempty{#1}{%
    \ifnumcomp{\value{YAD@abstracts}}{&gt;}{0}{%
      \global\booltrue{YAD@second@abstract@empty}%
    }{%
      \global\booltrue{YAD@main@abstract@empty}%
    }%
  }{%
    \begin{minipage}{\linewidth}
      \small%
      #1%
    \end{minipage}%
  }%
}
\newenvironment{abstract}[1][\abstractname]{%
  \global\booltrue{YAD@abstract@used}%
  \ifnumcomp{\value{YAD@abstracts}}{&gt;}{0}{%
    \global\booltrue{YAD@second@abstract@used}%
    \csgdef{YAD@abstractname@secondarylanguage}{#1}%
    \lrbox{\YAD@abstract@secondarylanguage}%
    \expandafter\selectlanguage\expandafter{\YAD@secondarylanguage}%
  }{%
    \csgdef{YAD@abstractname@mainlanguage}{#1}%
    \lrbox{\YAD@abstract@mainlanguage}%
  }%
  \Collect@Body\YAD@abstract%
}{%
  \endlrbox%
  \stepcounter{YAD@abstracts}%
}%
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\YAD@abstract@page}
%   Ã‰lÃ©ments communs aux pages de rÃ©sumÃ©(s) et de 4\ieme{} de couverture.
%    \begin{macrocode}
\newcommand{\YAD@abstract@page}{%
  \bgroup%
  \enlargethispage{2cm}%
  \setlength{\parindent}{0pt}%
  \begin{minipage}{\linewidth}
    \small%
    {%
      \bfseries%
      \YAD@ifemptyorundef{\printtitle}{%
        \YAD@generic@argument@translate{title}%
      }{%
        \textsc{\printtitle}%
      }%
      \ifundef{\printsubtitle}{%
      }{%
        \newline%
        \printsubtitle%
      }%
      \vspace{-.5em}%
      \vspace{\z@}%
      \begin{center}%
        \YAD@abstractname@mainlanguage%
      \end{center}%
    }%
    \par%
    \ifboolexpr{%
      bool {YAD@abstract@used}%
      and not bool {YAD@main@abstract@empty}%
    }{%
      \usebox{\YAD@abstract@mainlanguage}%
    }{%
      \YAD@generic@argument@translate{abstract}%
    }%
    \ifundef{\printkeywords}{%
    }{%
      \vspace{.5em}%
      \begin{description}
      \item[\YAD@translation{keywords}\IfLanguageName{french}{\ifundef{\Fcolonspace}{\FBcolonspace}{\Fcolonspace}}{}:]
        \printkeywords
      \end{description}
    }%
  \end{minipage}%
  \ifbool{YAD@second@abstract@used}{%
    \expandafter\selectlanguage\expandafter{\YAD@secondarylanguage}%
    \\[.5\baselineskip]%
    \YAD@abstract@page@rule%
    \\[.5\baselineskip]%
    \begin{minipage}{\linewidth}
      \small%
      {%
        \bfseries%
        \YAD@ifemptyorundef{\printtitle}{%
          \YAD@generic@argument@translate{title}%
        }{%
          \textsc{\printtitle}%
        }%
        \ifundef{\printsubtitle}{%
        }{%
          \newline%
          \printsubtitle%
        }%
        \vspace{-.5em}%
        \vspace{\z@}%
        \begin{center}%
          \YAD@abstractname@secondarylanguage%
        \end{center}%
      }%
      \par%
      \ifboolexpr{%
        bool {YAD@abstract@used}%
        and not bool {YAD@second@abstract@empty}%
      }{%
        \usebox{\YAD@abstract@secondarylanguage}%
      }{%
        \YAD@generic@argument@translate{abstract}%
      }%
      \ifundef{\printkeywords}{%
      }{%
        \vspace{.5em}%
        \begin{description}
        \item[\YAD@translation{keywords}\IfLanguageName{french}{\ifundef{\Fcolonspace}{\FBcolonspace}{\Fcolonspace}}{}:]
          \textnormal{\printkeywords}
        \end{description}
      }%
    \end{minipage}%
  }{%
  }%
    \\[.5\baselineskip]%
  \YAD@abstract@page@rule%
  % \par%
  % \textbf{\printlaboratory*}%
  % \\%
  % \let\YAD@ORI@doublebackslash\\%
  % \renewcommand{\\}{ -- }%
  % \printlaboratoryaddress%
  % \let\\\YAD@ORI@doublebackslash%
  \egroup%
}%
% \newcommand{\YAD@abstract@page}{%
%   \ifbool{YAD@inprogress@work}{%
%     \setfootrule{0pt}%
%     \setfoot{}{}{}%
%   }{%
%   }%
%   \bgroup%
%   \enlargethispage{2cm}%
%   \setlength{\parindent}{0pt}%
%   \usebox{\YAD@titleabstractkeywords@mainlanguage}%
%   \par%
%   \usebox{\YAD@titleabstractkeywords@secondarylanguage}%
%   \par%
%   \textbf{\printlaboratory*}%
%   \\%
%   \let\YAD@ORI@doublebackslash\\%
%   \renewcommand{\\}{ -- }%
%   \printlaboratoryaddress%
%   \let\\\YAD@ORI@doublebackslash%
%   \egroup%
% }%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@laboratory@abstract@page}
%    \begin{macrocode}
\newcommand{\YAD@laboratory@abstract@page}{%
  \ifnumgreater{\cmdKV@YAD@numlaboratories}{0}{%
    \begin{minipage}[t]{\linewidth}
      \let\YAD@ORI@doublebackslash\\%
      \renewcommand{\\}{ -- }%
      \DTLforeach*{laboratories}{%
        \YAD@laboratory@name=name,%
        \YAD@laboratory@address=address%
      }{%
        \DTLiffirstrow{}{\newline}%
        \textbf{\printlaboratory{\YAD@laboratory@name}}%
        \ifnumgreater{\cmdKV@YAD@numlaboratories}{1}{%
          \\%
        }{%
          \newline%
        }%
        \printlaboratoryaddress{\YAD@laboratory@address}%
        \ifthenelse{\value{DTLrowi}=\cmdKV@YAD@numlaboratories}{\dtlbreak}{}%
      }%
    \end{minipage}%
  }{%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\makeabstract}
% Page de prÃ©sentation (rÃ©sumÃ©s)
%    \begin{macrocode}
\newcommand{\makeabstract}{%
  \pagestyle{preliminary}%
  \bgroup%
  \ifbool{YAD@nomakeabstract}{%
  }{%
    \YAD@alarm@noabstract%
  }%
  \YAD@phantomsection%
  \addcontentsline{toc}{chapter}{\abstractname}%
  \addtolength{\footskip}{6pt minus 6pt}%
  \setfootrule{0pt}%
  \setfoot[][][]{%
    \YAD@laboratory@abstract@page%
  }{}{}%
  \renewcommand{\YAD@chapter@header}{\abstractname}%
  \renewcommand{\YAD@section@header}{\abstractname}%
  \YAD@abstract@page%
  \cleardoublepage%
  \egroup%
%    \end{macrocode}
% La commande de production de la page de rÃ©sumÃ©s Ã©met les erreurs signalant
% l'absence de nom ou d'adresse du laboratoire. Il est donc inutile de les
% Ã©mettre Ã&nbsp; nouveau par la suite donc on met Ã&nbsp; \enquote{vrai} les boolÃ©ens qui
% dÃ©sactivent l'Ã©mission de ces erreurs.
%    \begin{macrocode}
  \YAD@nolaboratorytrue%
  \YAD@nolaboratoryaddresstrue%
%
  \booltrue{YAD@makeabstract@used}%
}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\YAD@abstract@page@rule}
%   Style des filets horizontaux sur la page de prÃ©sentation.
%    \begin{macrocode}
\newcommand{\YAD@abstract@page@rule}[1][black]{\bgroup\color{#1}\noindent\rule[2pt]{\linewidth}{2pt}\egroup}
%    \end{macrocode}
% \end{macro}
%
% Si la commande Ã—\makeabstractÃ— n'a pas Ã©tÃ© utilisÃ©e, une erreur est Ã©mise.
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \ifbool{YAD@makeabstract@used}{%
  }{%
    \ifbool{YAD@nomakeabstract}{%
    }{%
      \YAD@ClassError*[nomakeabstract]{%
        Commande \protect\makeabstract\space non utilisÃ©e%
      }{%
        La commande \protect\makeabstract\space n'a pas Ã©tÃ©\MessageBreak%
        utilisÃ©e. Celle-ci est requise.%
      }%
    }%
  }%
}%
%    \end{macrocode}
%
% Si l'environnement Ã—abstractÃ— n'a pas Ã©tÃ© utilisÃ©, une erreur est Ã©mise.
%    \begin{macrocode}
\newcommand{\YAD@alarm@noabstract}{%
  \ifbool{YAD@abstract@used}{%
    \ifbool{YAD@main@abstract@empty}{%
      \ifnumcomp{\value{YAD@abstracts}}{&gt;}{1}{%
        \YAD@ClassError[noabstract]{%
          Contenu de la 1re occurrence de `abstract' vide%
        }{%
          La 1re occurrence de l'environnement `abstract' a Ã©tÃ©
          utilisÃ©e\MessageBreak%
          avec un contenu vide. Un contenu non vide est requis.%
        }%
      }{%
        \YAD@ClassError[noabstract]{%
          Contenu de l'environnement `abstract' vide%
        }{%
          L'environnement `abstract' a Ã©tÃ© utilisÃ© mais avec un contenu
          vide.\MessageBreak%
          Un contenu non vide est requis.%
        }%
      }%
    }{%
    }%
    \ifbool{YAD@second@abstract@empty}{%
      \YAD@ClassError[noabstract]{%
        Contenu de la 2e occurrence de `abstract' vide%
      }{%
        La 2e occurrence de l'environnement `abstract' a Ã©tÃ©
        utilisÃ©e\MessageBreak%
        avec un contenu vide. Un contenu non vide est requis.%
      }%
    }{%
    }%
  }{%
    \ifbool{YAD@noabstract}{%
    }{%
      \YAD@ClassError[noabstract]{%
        Environnement `abstract' non utilisÃ©%
      }{%
        L'environnement `abstract' n'a pas Ã©tÃ© utilisÃ©. Celui-ci est requis.%
      }%
    }%
  }%
}%
%    \end{macrocode}
%
% \begin{macro}{\makebackcover}
% Ã‰lÃ©ments communs de la page de prÃ©sentation
%    \begin{macrocode}
\newcommand{\makebackcover}{%
  \printlocalbibs{}%
  \pagestyle{backcover}%
%    \end{macrocode}
% On insÃ¨re le code pour l'Ã©ventuel colophon
%    \begin{macrocode}
  \ifthenelse{\equal{\YAD@colophon@location}{recto-backcover}}{%
    \newgeometry{centering,nomarginpar,bottom=1cm,top=1cm,headheight=\YAD@max@logoheight,hmargin=2cm,includeall}%
    \YAD@insert@colophon%
    \restoregeometry%
  }{%
    \YAD@clearspread%
  }%
  \YAD@abstract@page%
}%
%    \end{macrocode}
% \end{macro}
%
% Commande de la page de la ou des dÃ©dicaces
% \begin{macro}{\makededications}
%    \begin{macrocode}
      \csdef{makededications}{%
        \@ifstar{%
          \@tempswatrue\csuse{YAD@starnostar@makededications}%
        }{%
          \@tempswafalse\csuse{YAD@starnostar@makededications}%
        }%
      }%
      \csdef{YAD@starnostar@makededications}{%
      \pagestyle{prepreliminary}%
      \if@tempswa%
      \else%
      \vspace*{\stretch{2}}%
      \fi%
      \DTLifdbempty{dedications}{%
      \YAD@generic@argument@translate{dedications}%
      \YAD@ClassError{%
      \protect\makededications\space utilisÃ©e/\protect\dedication\space non
      utilisÃ©e%
      }{%
      La commande \protect\makededications\space a Ã©tÃ© utilisÃ©e mais la
      commande \protect\dedication,\MessageBreak%
      permettant de prÃ©parer des dÃ©dicaces, n'a pas Ã©tÃ© utilisÃ©e.%
      }%
      }{%
      \begin{flushright}
        \itshape%
        \DTLforeach*{dedications}{%
          \YAD@dedication=dedication%
        }{%
          \YAD@ifemptyorundef{\YAD@dedication}{%
            \YAD@generic@argument@translate{dedication}%
            \YAD@ClassError{%
              DÃ©dicace vide%
            }{%
              L'argument obligatoire d'une commande \protect\dedication\space est
              vide\MessageBreak%
              (celui-ci doit Ãªtre renseignÃ©).%
            }%
          }{%
            \YAD@dedication%
          }%
          \par%
          \DTLiflastrow{%
          }{%
            \if@tempswa%
            \vspace*{\baselineskip}%
            \else%
            \vspace*{\stretch{1}}%
            \fi
          }%
        }%
      \end{flushright}
      }%
      \if@tempswa%
      \else%
      \vspace*{\stretch{2}}%
      \fi
      \pagestyle{preliminary}%
      }%
%    \end{macrocode}
% \end{macro}
%
% Commande de la page de la ou des dÃ©dicaces
% \begin{macro}{\makefrontepigraphs}
%    \begin{macrocode}
      \csdef{makefrontepigraphs}{%
        \@ifstar{%
          \@tempswatrue\csuse{YAD@starnostar@makefrontepigraphs}%
        }{%
          \@tempswafalse\csuse{YAD@starnostar@makefrontepigraphs}%
        }%
      }%
\csdef{YAD@starnostar@makefrontepigraphs}{%
  \patchcmd{\epigraphs}{\qitemlabel}{\qitemlabel\itemsep=1.5\baselineskip}{}{}%
  \pagestyle{prepreliminary}%
  \if@tempswa%
  \else%
  \vspace*{\stretch{2}}%
  \fi
  \DTLifdbempty{frontepigraphs}{%
    \setlength\epigraphrule{0pt}%
    \begin{epigraphs}
      \qitem{\YAD@generic@argument@translate{epigraphs}}{}%
    \end{epigraphs}%
    \YAD@ClassError{%
      \protect\makefrontepigraphs\space utilisÃ©e/\protect\frontepigraph\space
      non utilisÃ©e%
    }{%
      La commande \protect\makefrontepigraphs\space a Ã©tÃ© utilisÃ©e mais la
      commande\MessageBreak%
      \protect\frontepigraph, permettant de prÃ©parer des Ã©pigraphes, n'a pas
      Ã©tÃ© utilisÃ©e.%
    }{%
    }%
  }{%
    \begin{epigraphs}
      \DTLforeach*{frontepigraphs}{%
        \YAD@epigraphlanguage=epigraphlanguage,%
        \YAD@epigraph=epigraph,%
        \YAD@epigraphauthor=epigraphauthor%
      }{%
        \YAD@ifemptyorundef{\YAD@epigraph}{%
          \renewcommand{\YAD@epigraph}{%
            \YAD@generic@argument@translate{epigraph}%
          }%
          \YAD@ClassError{%
            Ã‰pigraphe vide%
          }{%
            L'argument obligatoire d'une commande \protect\frontepigraph\space
            est vide\MessageBreak%
            (celui-ci doit Ãªtre renseignÃ©).%
          }%
        }{%
        }%
        \ifthenelse{\equal{\YAD@mainlanguage}{\YAD@epigraphlanguage}}{%
          \qitem{\YAD@epigraph}{\YAD@epigraphauthor}%
        }{%
          \bgroup%
          \expandafter\selectlanguage\expandafter{\YAD@epigraphlanguage}%
          \qitem{\YAD@epigraph}{\YAD@epigraphauthor}%
          \egroup%
        }%
        \DTLiflastrow{%
        }{%
          \if@tempswa%
          % \vspace*{2cm}%
          \else%
          % \vspace*{\stretch{1}}%
          \fi
        }%
      }%
    \end{epigraphs}
  }%
  \if@tempswa%
  \else%
  \vspace*{\stretch{2}}%
  \fi
  \pagestyle{preliminary}%
}%
%    \end{macrocode}
% \end{macro}
%
%\section{Commandes et styles pour les tables des matiÃ¨res locales}
%
% Les commandes et styles suivants, ainsi que toute la machinerie permettant de
% faire dÃ©buter les chapitres par leurs tables des matiÃ¨res locales s'appuient
% sur le \pkg{etoc} de Jean-FranÃ§ois Burnol (qui a aimablement fourni le code
% suivant).
      %
% Il sera facile de dÃ©placer globalement la table des matiÃ¨res horizontalement
% si nÃ©cessaire.
%    \begin{macrocode}
\def\YAD@leftmargin {0pt}
\def\YAD@rightmargin {2.55em}% like LaTeXâ€™s \@tocrmarg
%    \end{macrocode}
% Ceci est pour les points de conduite :
%    \begin{macrocode}
\newbox\YAD@leaderbox
\def\YAD@leaderboxwidth {0.7777em}% about like what standard classes do
%    \end{macrocode}
% Espacement vertical :
%    \begin{macrocode}
\def\YAD@verysmallvskip {0pt plus .2pt}
\def\YAD@globalmedvskip {1em plus 1pt}
\def\YAD@localmedvskip {.25em plus .25pt}
\def\YAD@bigvskip {2.25em plus 1pt}
%    \end{macrocode}
% Les \enquote{numwidths} pour la composition de la numÃ©rotation des unitÃ©s de
% division. Je ne me souviens pas exactement comment (et pour quelles polices)
% ces chiffres ont Ã©tÃ© choisis. Ils s'avÃ¨rent rapidement trop petits si l'on
% utilise des chiffres romains (tout comme les valeurs par dÃ©faut de la classe
% Ã—bookÃ—, mÃªme si elles sont un peu plus grandes).
%    \begin{macrocode}
\def\YAD@numwidthB {1.5em} % chapter
\def\YAD@numwidthC {2.278em}% section, I think default is 2.3em
\def\YAD@numwidthD {3.056em}% analog in standard class is 3.2em
\def\YAD@numwidthE {3.833em}% analog in standard class is 4.1em
\def\YAD@numwidthF {4.611em}% analog in standard class is 5em
\def\YAD@numwidthG {5.389em}% analog in standard class is 6em
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand\YAD@setlinestyle [2]{% #1= unit, #2= numwidth as macro
  \etocsetstyle{#1}
  {\advance\leftskip#2\relax}
  {%
    \vskip
    \YAD@verysmallvskip\relax
    \leavevmode%
    {\interlinepenalty\@M
      \etocifnumbered
      {%
        \llap{%
          \makebox[#2][l]{%
            \etocnumber%
          }%
        }%
      }{\advance\leftskip-#2\relax}%
      \etocname
      \nobreak\leaders \copy\YAD@leaderbox
      \hfil\makebox[-\parfillskip][r]{\etocpage}%
      \par }%
  }
  {}
  {\advance\leftskip-#2\relax}%
}
%    \end{macrocode}
%    \begin{macrocode}
\newcommand\YAD@globalstyle {% encapsule le style pour les global TOCs
  \etocsettocstyle {%
    \if@twocolumn
    \@restonecoltrue
    \onecolumn
    \else
    \@restonecolfalse
    \fi
    \parindent\z@
    \leftskip\z@skip
    \rightskip\z@skip
    \setbox\YAD@leaderbox\hbox to \YAD@leaderboxwidth{\hss.\hss}%
    \chapter *[\cmdKV@YAD@name]{\noindent\kern\YAD@leftmargin\relax % utilise "pt"...
      \cmdKV@YAD@name%
    }%
    \rightskip \YAD@rightmargin\relax
    \parfillskip -\rightskip % ou une valeur plus petite si dÃ©sirÃ©
    \leftskip \YAD@leftmargin \relax%
  }{%
    \if@restonecol
    \twocolumn
    \fi
    \cleardoublepage%
  }%
  %
  \etocsetstyle{part} {} {\addpenalty {-\@highpenalty}%
    \addvspace \YAD@bigvskip \leavevmode {\large
      \bfseries % utilisation d'un groupe pour limiter le changement de police
      \interlinepenalty\@M \etocifnumbered{\etocnumber\hspace{1em}}{}%
      \etocname \nobreak\hfil\makebox[-\parfillskip][r]{\etocpage}}\par
    \nobreak } {} {}
  %
  \etocsetstyle{chapter} {\advance\leftskip\YAD@numwidthB\relax} {\addpenalty
    {-\@highpenalty }%
    \vskip \YAD@globalmedvskip\relax
    \leavevmode%
    {\interlinepenalty\@M \etocifnumbered
      {\llap{\makebox[\YAD@numwidthB][l]{\bfseries\etocnumber}}}
      {\advance\leftskip-\YAD@numwidthB\relax}%
      \bfseries\etocname
      \nobreak\hfil\makebox[-\parfillskip][r]{\etocpage}\par }%
    \penalty \@highpenalty } {} {\advance\leftskip-\YAD@numwidthB\relax}
  %
  \YAD@setlinestyle {section}{\YAD@numwidthC}%
  \YAD@setlinestyle {subsection}{\YAD@numwidthD}%
  \YAD@setlinestyle {subsubsection}{\YAD@numwidthE}%
  \YAD@setlinestyle {paragraph}{\YAD@numwidthF}%
  \YAD@setlinestyle {subparagraph}{\YAD@numwidthG}%
}
%    \end{macrocode}
% style pour les local TOCs
%    \begin{macrocode}
\let\YAD@addcontentsline\addcontentsline
\newcommand\YAD@localstyle {%
  \etocsettocstyle {%
    \if@twocolumn
    \@restonecoltrue
    \onecolumn
    \else
    \@restonecolfalse
    \fi%
    \setbox\YAD@leaderbox\hbox to \YAD@leaderboxwidth{\hss.\hss}%
    \parindent\z@
    \dimen@ 2.25em % soon to be \leftskip
%    \end{macrocode}
% Nous ne voulons pas que la Ã—sectionÃ— contenant la local TOC soit elle-mÃªme dans
% les TOC (globales ou locales). Pour cela, il suffit de \enquote{relaxer}
% Ã—\addcontentslineÃ—.
%    \begin{macrocode}
    \renewcommand\addcontentsline[3]{}%
    \begingroup
%    \end{macrocode}
% Afin d'Ã©viter le problÃ¨me
% \url{https://github.com/dbitouze/yathesis/issues/81}, nous ne comptons plus
% sur une section non numÃ©rotÃ©e et nous la simulons.
%    \begin{macrocode}
    \vspace{3.5ex plus 1ex minus .2ex}%
      \noindent\hspace{\dimen@}%
      {%
        \normalfont\large\bfseries%
        \translate{lbl-localtocname}%
      }
    \vspace{2.3ex plus .2ex}%
    \par%
    \endgroup
%    \end{macrocode}
% Nous ne voulons pas que l'en-tÃªte contienne le titre de la section prÃ©cÃ©dente
% (factice) au cas oÃ¹ la premiÃ¨re \enquote{vraie} section apparaÃ®trait.
%    \begin{macrocode}
    \sectionmark{}%
%    \end{macrocode}
% Nous rÃ©tablissons le comportement original de Ã—\addcontentslineÃ—.
%    \begin{macrocode}
    \let\addcontentsline\YAD@addcontentsline
    \parskip \z@skip
%    \end{macrocode}
%
% En raison de certains changements dans \Package{parskip}, nous devons ajuster
% l'espace vertical avant le premier filet des locales TOC, selon que ce package
% est chargÃ© ou non (cf. la dÃ©finition de Ã—\YAD@vspace@before@localtoc@ruleÃ—
% ci-dessus).
%
%    \begin{macrocode}
    \vspace{\YAD@vspace@before@localtoc@rule}% somewhat ad hoc
    \leftskip 2.25em \rightskip 4.5em \advance\rightskip-\YAD@rightmargin\relax
    \leavevmode\leaders\hrule\@height\p@\hfill\kern\z@\par
    \rightskip 4.5em
    \parfillskip -\YAD@rightmargin\relax%
  }{%
    \nobreak\vskip-.5\baselineskip
    \leavevmode\leaders\hrule\@height\p@\hfill\kern\z@\par
    \bigskip \if@restonecol \twocolumn \fi
  }
  % %
  \etocsetstyle{section} {%
    \advance\leftskip\YAD@numwidthC\relax%
  } {%
    \addpenalty
    \@secpenalty \etociffirst{}{\addvspace{\YAD@localmedvskip}}%
    \leavevmode {%
      \interlinepenalty\@M \bfseries%
      \etocifnumbered
      {%
        \llap{%
          \makebox[\YAD@numwidthC][l]{\etocnumber}%
        }%
      }
      {%
        \advance\leftskip-\YAD@numwidthC%
      }%
      \etocname\nobreak\hfil\makebox[-\parfillskip][r]{\etocpage}\par%
    }%
    \penalty \@highpenalty%
  }
  {} {%
    \advance\leftskip-\YAD@numwidthC\relax%
  }
  % %
  \YAD@setlinestyle {subsection}{\YAD@numwidthD}%
  \YAD@setlinestyle {subsubsection}{\YAD@numwidthE}%
  \YAD@setlinestyle {paragraph}{\YAD@numwidthF}%
  \YAD@setlinestyle {subparagraph}{\YAD@numwidthG}%
}
%    \end{macrocode}
% Puisque nous ne nous appuyons plus sur une section non numÃ©rotÃ©e pour les ToC
% locales, tout Ã—\labelÃ— ajoutÃ© aprÃ¨s un Ã—\chapitreÃ— fait rÃ©fÃ©rence au compteur
% Ã—etoc@tocidÃ— du \package{etoc} attachÃ© aux ToC locales et, dans le cas oÃ¹
% \package{etoc} est utilisÃ©, nous devons dire Ã&nbsp; Ã—\autorefÃ— de faire rÃ©fÃ©rence
% au chapitre sous-jacent Ã&nbsp; la place.
%    \begin{macrocode}
\newcommand*{\etoc@tocidautorefname}{\MakeLowercase{\chaptername}}%
%    \end{macrocode}
%
%    \begin{macrocode}
\newcommand*\YAD@computenumwidths@ [2] {% #1 pour `etoc' ou `local', #2=pour le \kern
  \begingroup
  \def\YAD@numwidthB {0pt}%
  \def\YAD@numwidthC {0pt}%
  \def\YAD@numwidthD {0pt}%
  \def\YAD@numwidthE {0pt}%
  \def\YAD@numwidthF {0pt}%
  \def\YAD@numwidthG {0pt}%
  \etocsetstyle{part}{}{}{}{}%
  \etocsetstyle{chapter}{}
  {\setbox0\hbox{\bfseries\etocthenumber\kern#2}}
  {\ifdim\wd0&gt;\YAD@numwidthB\edef\YAD@numwidthB{\the\wd0}\fi}{}%
  \etocsetstyle{section}{}
  {\setbox0\hbox{\bfseries\etocthenumber\kern#2}}
  {\ifdim\wd0&gt;\YAD@numwidthC\edef\YAD@numwidthC{\the\wd0}\fi}{}%
  \etocsetstyle{subsection}{}
  {\setbox0\hbox{\etocthenumber\kern#2}}
  {\ifdim\wd0&gt;\YAD@numwidthD\edef\YAD@numwidthD{\the\wd0}\fi}{}%
  \etocsetstyle{subsubsection}{}
  {\setbox0\hbox{\etocthenumber\kern#2}}
  {\ifdim\wd0&gt;\YAD@numwidthE\edef\YAD@numwidthE{\the\wd0}\fi}{}%
  \etocsetstyle{paragraph}{}
  {\setbox0\hbox{\etocthenumber\kern#2}}
  {\ifdim\wd0&gt;\YAD@numwidthF\edef\YAD@numwidthF{\the\wd0}\fi}{}%
  \etocsetstyle{subparagraph}{}
  {\setbox0\hbox{\etocthenumber\kern#2}}
  {\ifdim\wd0&gt;\YAD@numwidthG\edef\YAD@numwidthG{\the\wd0}\fi}{}%
  %
  \etocsettocstyle{}
  {\global\let\YAD@numwidthB\YAD@numwidthB
    \global\let\YAD@numwidthC\YAD@numwidthC
    \global\let\YAD@numwidthD\YAD@numwidthD
    \global\let\YAD@numwidthE\YAD@numwidthE
    \global\let\YAD@numwidthF\YAD@numwidthF
    \global\let\YAD@numwidthG\YAD@numwidthG}%
  \etocnopar
  \csname YAD@ORI@#1tableofcontents\endcsname
  \endgroup
}%
%    \end{macrocode}
%    \begin{macrocode}
\newcommand*\YAD@computenumwidths [1][0.5em]{%
  \YAD@computenumwidths@ {etoc}{#1}%
}
\newcommand*\YAD@computelocalnumwidths [1][0.5em]{%
  \YAD@computenumwidths@ {local}{#1}%
}
%    \end{macrocode}
%
% \section{Machinerie pour les tables des matiÃ¨res locales}
%
% On fournit une commande permettant de dÃ©finir un \enquote{chapeau} qui sera
% insÃ©rÃ© entre les tÃªtes de chapitres et leurs Ã©ventuelles tables des matiÃ¨res
% automatiques.
%
%    \begin{macrocode}
\newcommand{\leadchapter}[1]{%
  \def\YAD@leadchapter{#1}%
}
%    \end{macrocode}
%
% Les tables des matiÃ¨res locales ne sont pas imprimÃ©es si elles sont vides.
%    \begin{macrocode}
\etocchecksemptiness
%    \end{macrocode}
%
% Ajout automatique de tables des matiÃ¨res locales.
%    \begin{macrocode}
\newcommand{\YAD@default@localtoc}{%
  \ifbool{YAD@localtocs}%
  {%
    \bgroup
    \YAD@localstyle%
    \etocifunknownlevelTF {\YAD@localtocsdepth}
    {%
    }{%
      \etocsetnexttocdepth{\YAD@localtocsdepth}%
    }
    \YAD@computelocalnumwidths\relax%
    \etocifunknownlevelTF {\YAD@localtocsdepth}
    {%
    }{%
      \etocsetnexttocdepth{\YAD@localtocsdepth}%
    }
    \localtableofcontents%
    \YAD@globalstyle
    \egroup
  }{%
  }%
}
\newcommand{\YAD@localtoc}{\YAD@default@localtoc}
\newcommand{\stoplocaltocs}{%
  \boolfalse{YAD@localtocs}%
}
\newcommand{\startlocaltocs}{%
  \booltrue{YAD@localtocs}%
}
\newcommand{\nextwithoutlocaltoc}{%
  \renewcommand{\YAD@localtoc}{}%
}
\newcommand{\nextwithlocaltoc}{%
  \renewcommand{\YAD@localtoc}{\YAD@default@localtoc}%
  \booltrue{YAD@localtocs}%
  \booltrue{YAD@nextwithlocaltoc}%
}
\apptocmd{\@makechapterhead}{%
      \YAD@ifemptyorundef{\YAD@leadchapter}{%
      }{%
      \YAD@leadchapter%
      \let\YAD@leadchapter\relax
      }
  \ifbool{YAD@localtocs}%
   {%
    \YAD@localtoc%
    \renewcommand{\YAD@localtoc}{\YAD@default@localtoc}%
    \ifbool{YAD@nextwithlocaltoc}%
    {%
      \boolfalse{YAD@localtocs}%
      \boolfalse{YAD@nextwithlocaltoc}%
      % \boolfalse{YAD@localtocs@classoption}%
    }{%
    }%
  }{%
  }%
}{}{}%
%    \end{macrocode}
%
% Le code pour l'affichage des bibliographies locales, utilisÃ© Ã&nbsp; plusieurs
% endroits, est stockÃ© dans une macro.
%    \begin{macrocode}
\newcommand{\printlocalbibs}{%
  \ifbool{YAD@localbibs}{%
    \ifbool{YAD@localbibs@used}{%
    }{%
%    \end{macrocode}
%
% On n'affiche une bibliographie locale que dans les segments de bibliographie
% autres que celui numÃ©rotÃ© 0 sans quoi la bibliographie globale est suivie
% d'une bibliographie locale contenant toutes les citations insÃ©rÃ©es en dehors
% d'un segment (par exemple en cas de Ã—\nocite{*}Ã— ou de citation par exemple
% dans les Ã©pigraphes).
%    \begin{macrocode}
      \ifnumcomp{\value{refsegment}}{=}{0}{%
      }{%
        \let\YAD@ORI@blx@warn@bibempty\blx@warn@bibempty%
        \def\blx@warn@bibempty{}%
%    \end{macrocode}
% Les bibliographies locales sont composÃ©es en interligne simple
%    \begin{macrocode}
        \bgroup
        \par%
        \singlespacing%
        \YAD@printbibliography@ORI[segment=\therefsegment,heading=YAD@localbibs@heading]%
        \par%
        \egroup%
        \let\blx@warn@bibempty\YAD@ORI@blx@warn@bibempty%
        \booltrue{YAD@localbibs@used}%
      }%
    }%
  }{%
  }%
}%
%    \end{macrocode}
% Dans le cas oÃ¹ l'option Ã—localbibsÃ— est demandÃ©e, on redÃ©finit
% Ã—\includeÃ— en Ã—\inputÃ— pour Ã©viter le Ã—\clearpageÃ— Ã©mis juste avant
% l'inclusion du fichier, sans quoi une bibliographie locale automatiquement
% ajoutÃ©e avant le chapitre suivant, si ce dernier l'est via Ã—\includeÃ—, subit
% un changement de page avant d'Ãªtre affichÃ©e. La commande Ã—\includeonlyÃ—
% est alors inopÃ©rante et on le signale (mais ce signalement n'apparaÃ®t pas si
% cette commande est utilisÃ©e avant Ã—\documentclassÃ—).
%    \begin{macrocode}
      \AddToHook{begindocument/before}{%
      \ifbool{YAD@localbibs}{%
      \let\include\input%
      \if@partsw
      \ClassWarningNoLine{yathesis}{%
      Commande \string\includeonly\space inopÃ©rante lorsque l'option\MessageBreak
      `localbibs' est utilisÃ©e. Le seul moyen de\MessageBreak
      temporairement ne compiler que certains fichiers\MessageBreak
      inclus est alors de temporairement commenter\MessageBreak
      l'inclusion des autres%
      }%
      \fi
      }{%
      }
      }
%    \end{macrocode}
% On redÃ©finit la commande Ã—\chapterÃ— de sorte que, dans un chapitre non
% numÃ©rotÃ© (Ã—\chapter*Ã—) :
% \begin{itemize}
% \item les (sous-(sous-))sections n'aient pas besoin d'Ãªtre Ã©toilÃ©es Ã&nbsp; leur
%   tour pour Ãªtre non numÃ©rotÃ©es ;
% \item il ne soit pas nÃ©cessaire de faire appel aux commandes cryptiques
%   Ã—\addcontentsline{toc}{...}{...}Ã— pour que ce qui est non numÃ©rotÃ© figure
%   dans la (les) table(s) des matiÃ¨res ;
% \item les titres courants soient corrects (par dÃ©faut, les titres courants
%   des chapitres et sections non numÃ©rotÃ©s sont ceux des chapitre et section
%   numÃ©rotÃ©s les prÃ©cÃ©dant) ;
% \item elle dispose d'un argument optionnel supplÃ©mentaire permettant de
%   spÃ©cifier un titre courant diffÃ©rent des titres du texte et de la (des)
%   tables des matiÃ¨res.
% \end{itemize}
%    \begin{macrocode}
% \let\YAD@ORI@chapter\chapter%
\LetLtxMacro{\YAD@ORI@chapter}{\chapter}%
\AfterPreamble{% delay the redefinition when titlesec has done its own
  \renewcommand\chapter{%
    \printlocalbibs{}%
    \boolfalse{YAD@localbibs@used}%
    \cleardoublepage%
    \renewcommand{\sectiontitle}{}%
    \YAD@phantomsection%
    \ifbool{YAD@output@paper}{%
    }{%
      \YAD@bookmarksetup{startatroot}%
    }%
    \@ifstar{\YAD@starred@chapter}{\YAD@unstarred@chapter}%
  }%
  \newcommandtwoopt{\YAD@tmp@chapter}[3][][]{%
    \ifthenelse{\isempty{#1}}{%
      \ifthenelse{\isempty{#2}}{%
        \YAD@ORI@chapter{#3}%
      }{%
        \YAD@ORI@chapter{#3}%
        \chaptermark{#2}%
      }%
    }{%
      \ifthenelse{\isempty{#2}}{%
        \YAD@ORI@chapter[#1]{#3}%
      }{%
        \YAD@ORI@chapter[#1]{#3}%
        \chaptermark{#2}%
      }%
    }%
  }%
  \newcommandtwoopt{\YAD@starred@chapter}[3][][]{%
    \booltrue{YAD@nonnumbered@chapter}%
    \booltrue{YAD@nonnumbered@section}%
    \booltrue{YAD@nonnumbered@subsection}%
    \booltrue{YAD@nonnumbered@subsubsection}%
    \booltrue{YAD@nonnumbered@paragraph}%
    \booltrue{YAD@nonnumbered@subparagraph}%
    \YAD@setsecnumdepth{none}%
    \YAD@tmp@chapter[#1][#2]{#3}%
  }%
%    \end{macrocode}
% La numÃ©rotation des chapitres non Ã©toilÃ©s au niveau initial
% (Ã—\resetsecnumdepth*Ã—) n'est activÃ©e qu'Ã&nbsp; partir de la partie principale
% (Ã—\mainmatterÃ—), sans quoi les (sous-)sections de la partie Ã—\frontmatterÃ—
% sont numÃ©rotÃ©es, alors que rien ne doit l'Ãªtre dans cette partie.
%    \begin{macrocode}
  \newcommandtwoopt{\YAD@unstarred@chapter}[3][][]{%
    \boolfalse{YAD@nonnumbered@chapter}%
    \boolfalse{YAD@nonnumbered@section}%
    \boolfalse{YAD@nonnumbered@subsection}%
    \boolfalse{YAD@nonnumbered@subsubsection}%
    \boolfalse{YAD@nonnumbered@paragraph}%
    \boolfalse{YAD@nonnumbered@subparagraph}%
    \if@mainmatter%
    \YAD@setsecnumdepth{\YAD@secnumdepth}%
    \fi%
    \YAD@tmp@chapter[#1][#2]{#3}%
  }%
%    \end{macrocode}
% On ne veut pas utiliser cette nouvelle dÃ©finition de Ã—\chapter*Ã— pour
% Ã—\tableofcontentsÃ— et les listes similaires.
%    \begin{macrocode}
\xpretocmd{\tableofcontents}{\renewcommand{\YAD@localtoc}{}}{}{}%
\xapptocmd{\tableofcontents}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
\xpretocmd{\listoftables}{\renewcommand{\YAD@localtoc}{}}{}{}%
\xapptocmd{\listoftables}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
\xpretocmd{\listoffigures}{\renewcommand{\YAD@localtoc}{}}{}{}%
\xapptocmd{\listoffigures}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
\ifcsdef{printbibliography}{%
  \xpretocmd{\printbibliography}{\renewcommand{\YAD@localtoc}{}}{}{}%
  \xapptocmd{\printbibliography}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
  }{}%
\ifcsdef{printglossary}{%
  \xpretocmd{\printglossary}{\renewcommand{\YAD@localtoc}{}}{}{}%
  \xapptocmd{\printglossary}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
  }{}%
\ifcsdef{printindex}{%
  \xpretocmd{\printindex}{\renewcommand{\YAD@localtoc}{}}{}{}%
  \xapptocmd{\printindex}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
}{}%
%    \end{macrocode}
% On redÃ©finit la commande Ã—\sectionÃ— de sorte que, comme la commande
% Ã—\chapterÃ—, elle dispose d'un argument optionnel supplÃ©mentaire permettant de
% spÃ©cifier un titre courant diffÃ©rent des titres du texte et de la (des)
% tables des matiÃ¨res.
%    \begin{macrocode}
\LetLtxMacro{\YAD@ORI@section}{\section}%
\renewcommand\section{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@chapter}{%
  }{%
    \YAD@setsecnumdepth{\YAD@secnumdepth}%
  }%
  \fi%
  \@ifstar{\YAD@starred@section}{\YAD@unstarred@section}%
}%
\newcommandtwoopt*{\YAD@tmp@section}[3][][]{%
  \ifthenelse{\isempty{#1}}{%
    \ifthenelse{\isempty{#2}}{%
      \YAD@ORI@section{#3}%
    }{%
      \let\YAD@ORI@sectionmark\sectionmark%
      \renewcommand\sectionmark[1]{}%
      \YAD@ORI@section{#3}%
      \ifbool{YAD@nonnumbered@section}{%
        \YAD@ORI@sectionmark{#2}%
      }{%
        \YAD@ORI@sectionmark{\thesection. #2}%
      }%
      \let\sectionmark\YAD@ORI@sectionmark%
    }%
  }{%
    \ifthenelse{\isempty{#2}}{%
      \YAD@ORI@section[#1]{#3}%
    }{%
      \let\YAD@ORI@sectionmark\sectionmark%
      \renewcommand\sectionmark[1]{}%
      \YAD@ORI@section[#1]{#3}%
      \ifbool{YAD@nonnumbered@section}{%
        \YAD@ORI@sectionmark{#2}%
      }{%
        \YAD@ORI@sectionmark{\thesection. #2}%
      }%
      \let\sectionmark\YAD@ORI@sectionmark%
    }%
  }%
}%
\newcommandtwoopt{\YAD@starred@section}[3][][]{%
  \booltrue{YAD@nonnumbered@section}%
  \booltrue{YAD@nonnumbered@subsection}%
  \booltrue{YAD@nonnumbered@subsubsection}%
  \booltrue{YAD@nonnumbered@paragraph}%
  \booltrue{YAD@nonnumbered@subparagraph}%
  \YAD@setsecnumdepth{none}%
  \YAD@tmp@section[#1][#2]{#3}%
}%
\newcommandtwoopt{\YAD@unstarred@section}[3][][]{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@chapter}{%
  }{%
    \boolfalse{YAD@nonnumbered@section}%
    \boolfalse{YAD@nonnumbered@subsection}%
    \boolfalse{YAD@nonnumbered@subsubsection}%
    \boolfalse{YAD@nonnumbered@paragraph}%
    \boolfalse{YAD@nonnumbered@subparagraph}%
  }%
  \fi%
  \YAD@tmp@section[#1][#2]{#3}%
}%
%    \end{macrocode}
% On redÃ©finit la commande Ã—\subsectionÃ— de sorte que sa version Ã©toilÃ©e dispose
% des mÃªmes facilitÃ©s que les versions Ã©toilÃ©es des commandes Ã—\chapterÃ— et
% Ã—\sectionÃ—.
%    \begin{macrocode}
\LetLtxMacro{\YAD@ORI@subsection}{\subsection}%
\renewcommand\subsection{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@section}{%
  }{%
    \YAD@setsecnumdepth{\YAD@secnumdepth}%
  }%
  \fi%
  \@ifstar{\YAD@starred@subsection}{\YAD@unstarred@subsection}%
}%
\newcommand*{\YAD@tmp@subsection}[2][]{%
  \ifthenelse{\isempty{#1}}{%
    \YAD@ORI@subsection{#2}%
  }{%
    \YAD@ORI@subsection[#1]{#2}%
  }%
}%
\newcommand{\YAD@starred@subsection}[2][]{%
  \booltrue{YAD@nonnumbered@subsection}%
  \booltrue{YAD@nonnumbered@subsubsection}%
  \booltrue{YAD@nonnumbered@paragraph}%
  \booltrue{YAD@nonnumbered@subparagraph}%
  \YAD@setsecnumdepth{none}%
  \YAD@tmp@subsection[#1]{#2}%
}%
\newcommand{\YAD@unstarred@subsection}[2][]{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@section}{%
  }{%
    \boolfalse{YAD@nonnumbered@subsection}%
    \boolfalse{YAD@nonnumbered@subsubsection}%
    \boolfalse{YAD@nonnumbered@paragraph}%
    \boolfalse{YAD@nonnumbered@subparagraph}%
  }%
  \fi%
  \YAD@tmp@subsection[#1]{#2}%
}%
%
\LetLtxMacro{\YAD@ORI@subsubsection}{\subsubsection}%
\renewcommand\subsubsection{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@subsection}{%
  }{%
    \YAD@setsecnumdepth{\YAD@secnumdepth}%
  }%
  \fi%
  \@ifstar{\YAD@starred@subsubsection}{\YAD@unstarred@subsubsection}%
}%
\newcommand*{\YAD@tmp@subsubsection}[2][]{%
  \ifthenelse{\isempty{#1}}{%
    \YAD@ORI@subsubsection{#2}%
  }{%
    \YAD@ORI@subsubsection[#1]{#2}%
  }%
}%
\newcommand{\YAD@starred@subsubsection}[2][]{%
  \booltrue{YAD@nonnumbered@subsubsection}%
  \booltrue{YAD@nonnumbered@paragraph}%
  \booltrue{YAD@nonnumbered@subparagraph}%
  \YAD@setsecnumdepth{none}%
  \YAD@tmp@subsubsection[#1]{#2}%
}%
\newcommand{\YAD@unstarred@subsubsection}[2][]{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@subsection}{%
  }{%
    \boolfalse{YAD@nonnumbered@subsubsection}%
    \boolfalse{YAD@nonnumbered@paragraph}%
    \boolfalse{YAD@nonnumbered@subparagraph}%
  }%
  \fi%
  \YAD@tmp@subsubsection[#1]{#2}%
}%
%
\LetLtxMacro{\YAD@ORI@paragraph}{\paragraph}%
\renewcommand\paragraph{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@subsubsection}{%
  }{%
    \YAD@setsecnumdepth{\YAD@secnumdepth}%
  }%
  \fi%
  \@ifstar{\YAD@starred@paragraph}{\YAD@unstarred@paragraph}%
}%
\newcommand*{\YAD@tmp@paragraph}[2][]{%
  \ifthenelse{\isempty{#1}}{%
    \YAD@ORI@paragraph{#2}%
  }{%
    \YAD@ORI@paragraph[#1]{#2}%
  }%
}%
\newcommand{\YAD@starred@paragraph}[2][]{%
  \booltrue{YAD@nonnumbered@paragraph}%
  \booltrue{YAD@nonnumbered@subparagraph}%
  \YAD@setsecnumdepth{none}%
  \YAD@tmp@paragraph[#1]{#2}%
}%
\newcommand{\YAD@unstarred@paragraph}[2][]{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@subsubsection}{%
  }{%
    \boolfalse{YAD@nonnumbered@paragraph}%
    \boolfalse{YAD@nonnumbered@subparagraph}%
  }%
  \fi%
  \YAD@tmp@paragraph[#1]{#2}%
}%
%
\LetLtxMacro{\YAD@ORI@subparagraph}{\subparagraph}%
\renewcommand\subparagraph{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@paragraph}{%
  }{%
    \YAD@setsecnumdepth{\YAD@secnumdepth}%
  }%
  \fi%
  \@ifstar{\YAD@starred@subparagraph}{\YAD@unstarred@subparagraph}%
}%
\newcommand*{\YAD@tmp@subparagraph}[2][]{%
  \ifthenelse{\isempty{#1}}{%
    \YAD@ORI@subparagraph{#2}%
  }{%
    \YAD@ORI@subparagraph[#1]{#2}%
  }%
}%
\newcommand{\YAD@starred@subparagraph}[2][]{%
  \booltrue{YAD@nonnumbered@subparagraph}%
  \YAD@setsecnumdepth{none}%
  \YAD@tmp@subparagraph[#1]{#2}%
}%
\newcommand{\YAD@unstarred@subparagraph}[2][]{%
  \if@mainmatter%
  \ifbool{YAD@nonnumbered@paragraph}{%
  }{%
    \boolfalse{YAD@nonnumbered@subparagraph}%
  }%
  \fi%
  \YAD@tmp@subparagraph[#1]{#2}%
}%
%    \end{macrocode}
% Si le \Package{floatrow} est chargÃ©, on doit aussi ne pas utiliser cette
% nouvelle dÃ©finition de Ã—\chapter*Ã— pour les listes de flottants personnalisÃ©s
% qui peuvent Ãªtre crÃ©Ã©es.
%    \begin{macrocode}
  \@ifpackageloaded{floatrow}{%
    \xpatchcmd{\float@listhead}{\chapter}{\YAD@ORI@chapter}{}{}%
  }{%
  }%
%    \end{macrocode}
% On doit modifier la commande Ã—\toc@chapterÃ— du \Package{tocbibind} sans quoi
% les Ã©lÃ©ments qu'il ajoute apparaissent en double.
%    \begin{macrocode}
  \@ifpackageloaded{tocbibind}{%
    \renewcommand{\toc@chapter}[1]{%
      \chapter*{#1}\prw@mkboth{#1}%
      % \addcontentsline{toc}{chapter}{#1}% &lt; Suppression par rapport Ã&nbsp; l'original
    }%
  }{%
  }%
%    \end{macrocode}
% Dans le cas oÃ¹ le \Package{listings} est chargÃ©, nous \enquote{hackons} la
% commande Ã—\lstlistoflistingsÃ— afin de rÃ©soudre le problÃ¨me
% \url{https://github.com/dbitouze/yathesis/issues/83}.
%    \begin{macrocode}
      \@ifpackageloaded{listings}{%
      \lst@UserCommand\lstlistoflistings{\bgroup
      \let\contentsname\lstlistlistingname
      \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}%
      \YAD@ORI@tableofcontents \egroup}
      }{%
      }%
    }%
%    \end{macrocode}
% Les parties sont par dÃ©faut numÃ©rotÃ©es.
%    \begin{macrocode}
\xpretocmd{\part}{\YAD@setsecnumdepth{\YAD@secnumdepth}}{}{}%
%    \end{macrocode}
%
% % On crÃ©e une commande crÃ©ant des chapitres. Celle-ci a un argument optionnel,
% % par dÃ©faut Ã©gal Ã&nbsp; Ã—preliminaryÃ— qui dÃ©finit le style de page s'appliquant au
% % chapitre crÃ©Ã©.
% % \begin{macro}{\YAD@create@chapter}
% %    \begin{macrocode}
% \newcommand*{\YAD@create@chapter}[2][preliminary]{%
%   \expandafter\newcommand\expandafter{\csname #2\endcsname}[1][\csuse{YAD@tr#2}]{%
%     \pagestyle{#1}%
%     \expandafter\translatelet\expandafter{\csname YAD@tr#2\endcsname}{lbl-#2}%
%     \chapter[##1]{\YAD@reach@file[\YAD@configuration@file]{##1}}%
%   }%
% }
% %    \end{macrocode}
% % \end{macro}
% %
% % Au moyen de cette commande, on crÃ©e des commandes de chapitres.
% %
% %    \begin{macrocode}
% \YAD@create@chapter{acknowledgements}%
% \YAD@create@chapter{caution}%
% \YAD@create@chapter{foreword}%
% \YAD@create@chapter{preface}%
% \YAD@create@chapter{frenchabstract}%
% %
% \xapptocmd{\frenchabstract}{\booltrue{YAD@frenchabstract@used}}{}{}
% \AddToHook{enddocument}{%
%   \ifbool{YAD@frenchabstract@used}{%
%     \ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
%       \YAD@ClassWarningNoLine{%
%         RÃ©sumÃ© substantiel en franÃ§ais inutile.\MessageBreak%
%         La langue principale de la thÃ¨se Ã©tant le\MessageBreak%
%         franÃ§ais, un rÃ©sumÃ© substantiel en\MessageBreak%
%         franÃ§ais est inutile : vous pouvez supprimer\MessageBreak%
%         la commande \protect\frenchabstract\space et le texte qui s'y\MessageBreak%
%         rapporte%
%       }%
%     }{%
%     }%
%   }{%
%     \ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
%     }{%
%       \YAD@ClassWarningNoLine{%
%         RÃ©sumÃ© substantiel en franÃ§ais rÃ©commandÃ©.\MessageBreak%
%         La langue principale de la thÃ¨se n'etant pas le\MessageBreak%
%         franÃ§ais, un rÃ©sumÃ© substantiel en\MessageBreak%
%         franÃ§ais est rÃ©commandÃ© : vous pouvez en crÃ©er\MessageBreak%
%         un au moyen de \protect\frenchabstract\space (cf. la\MessageBreak%
%         documentation de la classe yat)%
%       }%
%     }%
%   }%
% }%
% %    \end{macrocode}
%
% On dÃ©finit la valeur, en anglais et en franÃ§ais, de la macro Ã—\disclaimertextÃ—
% (anciennement Ã—\disclaimerÃ—) de clause de non-responsabilitÃ© dÃ©finie
% prÃ©cÃ©demment.
%
%    \begin{macrocode}
\disclaimertext{%
  \IfLanguageName{french}{%
    \ifundef{\printinstitute}{%
      L'\YAD@generic@argument@translate{institute}
    }{%
      \YAD@if@starts@with@vowel{\YAD@institute}{L'}{Le }\printinstitute*
    }%
    %
    \ifundef{\printcoinstitute}{%
      n'entend
    }{%
      et
      \YAD@if@starts@with@vowel{\YAD@coinstitute}{l'}{le }\printcoinstitute*
      n'entendent
    }%
    %
    donner aucune approbation ni improbation aux opinions \'emises dans les
    th\`eses : ces opinions devront \^etre consid\'er\'ees comme propres \`a
    leurs auteurs.%
  }{%
    The \printinstitute{}
    %
    \ifundef{\printcoinstitute}{}{and the \printcoinstitute{}}
    %
    neither endorse nor censure authors' opinions expressed in the theses:
    these opinions must be considered to be those of their authors.%
  }%
}%
%    \end{macrocode}
%
% Par souci de compatibilitÃ© ascendante, on dÃ©finit la macro Ã—\disclaimerÃ—
% comme Ã©tant un clone de Ã—\disclaimertextÃ—.
%
%    \begin{macrocode}
\newcommand{\disclaimer}[1]{\disclaimertext{#1}}
%    \end{macrocode}
%
% \begin{macro}{\makedisclaimer}
%    \begin{macrocode}
\csdef{makedisclaimer}{%
  \@ifstar{\@tempswatrue\csuse{YAD@starnostar@makedisclaimer}}{\@tempswafalse\csuse{YAD@starnostar@makedisclaimer}}%
}%
\csdef{YAD@starnostar@makedisclaimer}{%
%    \end{macrocode}
% Appel du style de page propre Ã&nbsp; la partie prÃ©liminaire
%    \begin{macrocode}
  \pagestyle{prepreliminary}%
  \if@tempswa%
  \else%
  \vspace*{\stretch{1}}%
  \fi%
  \printdisclaimertext%
  \if@tempswa%
  \else%
  \vspace*{\stretch{1}}%
  \fi%
  \pagestyle{preliminary}%
}%
%    \end{macrocode}
% \end{macro}
%
% On dÃ©finit la valeur, en anglais et en franÃ§ais, de la macro Ã—\colophonÃ— du colophon.
%
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \colophontext{%
    \IfLanguageName{french}{%
      MÃ©moire de thÃ¨se intitulÃ© \YAD@ifemptyorundef{\printtitle}{%
        \YAD@generic@argument@translate{title}%
      }{%
        \frquote{\printtitle}%
      }, Ã©crit par \YAD@ifemptyorundef{\printauthor}{%
        \YAD@generic@argument@translate{author}%
      }{%
        \printauthor%
      }, achevÃ© le \today{}, composÃ© au moyen du systÃ¨me de prÃ©paration de
      document \YAD@href{https://fr.wikipedia.org/wiki/LaTeX}{\LaTeX{}} et de la
      classe \YAD@href{https://ctan.org/pkg/yathesis}{\textsf{yathesis}}
      dÃ©diÃ©e aux thÃ¨ses prÃ©parÃ©es en France.%
    }{%
      Doctoral dissertation entitled \YAD@ifemptyorundef{\printtitle}{%
        \YAD@generic@argument@translate{title}%
      }{%
        â€œ\printtitleâ€%
      }, written by \YAD@ifemptyorundef{\printauthor}{%
        \YAD@generic@argument@translate{author}%
      }{%
        \printauthor%
      }, completed on \today{}, typeset with the document preparation system
      \YAD@href{https://en.wikipedia.org/wiki/LaTeX}{\LaTeX{}} and the
      \YAD@href{https://ctan.org/pkg/yathesis}{\textsf{yathesis}} class
      dedicated to theses prepared in France.%
    }%
  }%
}
%    \end{macrocode}
%
% % Le contenu de l'environnement Ã—introductionÃ— est collectÃ© dans la macro
% % Ã—\YAD@introductionÃ— pour tester s'il est vide.
% % \begin{macro}{\YAD@introduction}
% %    \begin{macrocode}
% \newcommand{\YAD@introduction}[1]{%
%   \ifthenelse{\isempty{#1}}{%
%     \global\booltrue{YAD@introduction@empty}%
%     \YAD@generic@argument@translate{introduction}%
%   }{%
%     #1%
%   }%
% }
% %    \end{macrocode}
% % \end{macro}
% %
% % \begin{environment}{introduction}
% %   Environnement d'introduction gÃ©nÃ©rale numÃ©rotÃ©e, qui permet de
% %   masquer l'appel du style de page Ã—mainmatterÃ— chargÃ© avant
% %   qu'elle ne commence. La numÃ©rotation des paragraphes y est fixÃ©e
% %   Ã&nbsp; son niveau par dÃ©faut (par dÃ©faut sous-sections).
% %    \begin{macrocode}
% \newenvironment{introduction}[1][\YAD@trintroduction]{%
%   \YAD@setsecnumdepth{\YAD@secnumdepth}%
%   \YAD@introduction@begin[#1]%
%   \Collect@Body\YAD@introduction%
% }{%
%   \YAD@introduction@end%
% }%
% %    \end{macrocode}
% % \end{environment}
% % Appel du style de page propre Ã&nbsp; la partie principale du document,
% % notamment dÃ©but de la numÃ©rotation des chapitres, chargÃ© avant
% % l'environnement Ã—introductionÃ—.
% %    \begin{macrocode}
% \BeforeBeginEnvironment{introduction}{\pagestyle{mainmatter}}
% %    \end{macrocode}
% %
% % \begin{environment}{introduction*}
% %   Environnement d'introduction gÃ©nÃ©rale \emph{non} numÃ©rotÃ©e, qui
% %   permet de masquer l'appel du style de page Ã—mainmatterÃ— chargÃ©
% %   avant qu'elle ne commence.
% %    \begin{macrocode}
% \newenvironment{introduction*}[1][\YAD@trintroduction]{%
%   \setcounter{secnumdepth}{-10}%
%   \YAD@introduction@begin[#1]%
%   \Collect@Body\YAD@introduction%
% }{%
%   \YAD@introduction@end%
% }%
% %    \end{macrocode}
% % \end{environment}
% % Au dÃ©but de l'environnement, appel du style de page propre Ã&nbsp; la
% % partie introductive du document. Ã€ la fin de l'environnement,
% % numÃ©rotation des paragraphes est fixÃ©e Ã&nbsp; son niveau par dÃ©faut
% % (sous-sections).
% %    \begin{macrocode}
% \BeforeBeginEnvironment{introduction*}{\pagestyle{mainmatter}}
% \AfterEndEnvironment{introduction*}{%
%   \YAD@setsecnumdepth{\YAD@secnumdepth}%
% }%
% %    \end{macrocode}
% %
% % \begin{macro}{\@introduction@begin}
% %   Commande de dÃ©but d'environnement commune Ã&nbsp; Ã—introductionÃ— et Ã&nbsp;
% %   Ã—introduction*Ã—.
% %    \begin{macrocode}
% \newcommand{\YAD@introduction@begin}[1][\YAD@trintroduction]{%
%   \translatelet\YAD@trintroduction{lbl-introduction}%
%   \global\booltrue{YAD@introduction@used}%
%   \chapter[#1]{\YAD@reach@file[\YAD@configuration@file]{#1}}
% }%
% %    \end{macrocode}
% % \end{macro}
% %
% % \begin{macro}{\@introduction@end}
% %   Commande de fin d'environnement commune Ã&nbsp; Ã—introductionÃ— et Ã&nbsp;
% %   Ã—introduction*Ã—.
% %    \begin{macrocode}
% \newcommand{\YAD@introduction@end}{%
%   \cleardoublepage%
% }%
% %    \end{macrocode}
% % \end{macro}
% %
% % Si l'environnement Ã—introductionÃ— n'a pas Ã©tÃ© utilisÃ©, une erreur est Ã©mise
% % (car la commande Ã—mainmatterÃ— n'aura alors pas Ã©tÃ© insÃ©rÃ©e).
% %    \begin{macrocode}
% \AddToHook{enddocument}{%
%   \ifbool{YAD@introduction@used}{%
%     \ifbool{YAD@introduction@empty}{%
%       \YAD@ClassWarningNoLine{%
%         L'environnement `introduction' a Ã©tÃ© utilisÃ©\MessageBreak%
%         avec un contenu vide.\MessageBreak%
%         Un contenu non vide est requis%
%       }%
%     }{%
%     }%
%   }{%
%     \ifYAD@nointroduction%
%     \else%
%     \YAD@ClassWarningNoLine{%
%       L'environnement `introduction' n'a pas Ã©tÃ©\MessageBreak%
%       utilisÃ©. Celui-ci est requis%
%     }%
%     \fi%
%   }%
% }
% %    \end{macrocode}
% %
% % Le contenu de l'environnement Ã—conclusionÃ— est collectÃ© dans la macro
% % Ã—\YAD@conclusionÃ— pour tester s'il est vide.
% % \begin{macro}{\YAD@conclusion}
% %    \begin{macrocode}
% \newcommand{\YAD@conclusion}[1]{%
%   \ifthenelse{\isempty{#1}}{%
%     \global\booltrue{YAD@conclusion@empty}%
%     \YAD@generic@argument@translate{conclusion}%
%   }{%
%     #1%
%   }%
% }
% %    \end{macrocode}
% % \end{macro}
% %
% % \begin{environment}{conclusion}
% %   Environnement de conclusion gÃ©nÃ©rale numÃ©rotÃ©e.
% %    \begin{macrocode}
% \newenvironment{conclusion}[1][\YAD@trconclusion]{%
%   \YAD@setsecnumdepth{\YAD@secnumdepth}%
%   \YAD@conclusion@begin[#1]%
%   \Collect@Body\YAD@conclusion%
% }{%
%   \YAD@conclusion@end%
% }%
% %    \end{macrocode}
% % \end{environment}
% % Appel du style de page propre Ã&nbsp; la partie conclusion gÃ©nÃ©rale du
% % document, notamment pour s'assurer que celle-ci va figurer au plus
% % haut niveau des signets, chargÃ© avant l'environnement
% % Ã—conclusionÃ—.
% %    \begin{macrocode}
% \BeforeBeginEnvironment{conclusion}{%
%   \YAD@phantomsection%
%   \YAD@setsecnumdepth{\YAD@secnumdepth}%
%   \YAD@bookmarksetup{startatroot}%
% }%
% \AfterEndEnvironment{conclusion}{\appendix}
% %    \end{macrocode}
% %
% % \begin{environment}{conclusion*}
% %   Environnement d'conclusion gÃ©nÃ©rale \emph{non} numÃ©rotÃ©e, qui
% %   permet de masquer l'appel du style de page Ã—conclusion-generaleÃ—
% %   chargÃ© avant qu'elle ne commence.
% %    \begin{macrocode}
% \newenvironment{conclusion*}[1][\YAD@trconclusion]{%
%   \setcounter{secnumdepth}{-10}%
%   \YAD@conclusion@begin[#1]%
%   \Collect@Body\YAD@conclusion%
% }{%
%   \YAD@conclusion@end%
% }%
% %    \end{macrocode}
% % \end{environment}
% % Appel du style de page propre Ã&nbsp; la partie conclusion gÃ©nÃ©rale du
% % document, notamment pour s'assurer que celle-ci va figurer au plus
% % haut niveau des signets, chargÃ© avant l'environnement
% % Ã—conclusion*Ã—.
% %    \begin{macrocode}
% \BeforeBeginEnvironment{conclusion*}{%
%   \YAD@phantomsection%
%   \YAD@setsecnumdepth{\YAD@secnumdepth}%
%   \YAD@bookmarksetup{startatroot}%
% }%
% \AfterEndEnvironment{conclusion*}{%
%   \appendix%
%   \YAD@setsecnumdepth{\YAD@secnumdepth}%
% }%
% %    \end{macrocode}
% %
% % \begin{macro}{\@conclusion@begin}
% %   Commande de dÃ©but d'environnement commune Ã&nbsp; Ã—conclusionÃ— et Ã&nbsp;
% %   Ã—conclusion*Ã—.
% %    \begin{macrocode}
% \newcommand{\YAD@conclusion@begin}[1][\YAD@trconclusion]{%
%   \translatelet\YAD@trconclusion{lbl-conclusion}%
%   \global\booltrue{YAD@conclusion@used}%
%   \chapter[#1]{\YAD@reach@file[\YAD@configuration@file]{#1}}
% }%
% %    \end{macrocode}
% % \end{macro}
% %
% % \begin{macro}{\@conclusion@end}
% %   Commande de fin d'environnement commune Ã&nbsp; Ã—conclusionÃ— et Ã&nbsp;
% %   Ã—conclusion*Ã—.
% %    \begin{macrocode}
% \newcommand{\YAD@conclusion@end}{%
%   \cleardoublepage%
% }%
% %    \end{macrocode}
% % \end{macro}
% %
% % Si l'environnement Ã—conclusionÃ— n'a pas Ã©tÃ© utilisÃ©, une erreur est Ã©mise
% % (car la commande Ã—appendixÃ— n'aura alors pas Ã©tÃ© insÃ©rÃ©e).
% %    \begin{macrocode}
% \AddToHook{enddocument}{%
%   \ifbool{YAD@conclusion@used}{%
%     \ifbool{YAD@conclusion@empty}{%
%       \YAD@ClassWarningNoLine{%
%         L'environnement `conclusion' a Ã©tÃ© utilisÃ©\MessageBreak%
%         avec un contenu vide.\MessageBreak%
%         Un contenu non vide est requis%
%       }%
%     }{%
%     }%
%   }{%
%     \ifYAD@noconclusion%
%     \else%
%     \YAD@ClassError{%
%       L'environnement `conclusion' n'a pas Ã©tÃ©\MessageBreak%
%       utilisÃ©. Celui-ci est requis%
%     }%
%     \fi%
%   }%
% }
% %    \end{macrocode}
%
% On fixe la mÃ©tadonnÃ©e de la langue.
%    \begin{macrocode}
\AddToHook{begindocument}{%
  \ifthenelse{\equal{\YAD@mainlanguage}{french}}{%
    \YAD@hypersetup{pdflang=fr}%
  }{%
    \YAD@hypersetup{pdflang=en}%
  }%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{biblatex}{%
    \defbibheading{YAD@localbibs@heading}[\translate{lbl-localbibname} % (\therefsegment)
    ]{%
      \renewcommand\addcontentsline[3]{}%
      \section*{#1}%
      \let\addcontentsline\YAD@addcontentsline%
    }%
%    \end{macrocode}
%
% RÃ©fÃ©rences bibliographiques des citations formelles (cf. \Package{biblatex}):
%    \begin{macrocode}
    \@ifpackageloaded{csquotes}{%
      \SetCiteCommand{\autocite}%
    }{%
    }%
%    \end{macrocode}
%
% RedÃ©finition de la commande d'insertion de la bibliographie et ce,
% seulement si le \Package{biblatex} est chargÃ©
% \begin{macro}{\printbibliography}
%    \begin{macrocode}
    \let\YAD@printbibliography@ORI\printbibliography%
    \renewcommand{\printbibliography}[1][]{%
      \booltrue{YAD@printbibliography@used}%
      \bgroup
      \par%
      \singlespacing%
      \YAD@printbibliography@ORI[#1]%
%    \end{macrocode}
%
% On introduit un segment de bibliographie vide sans quoi la bibliographie est
% suivie de la bibliographie locale du chapitre prÃ©cÃ©dent (quand il en a une),
% avec en outre un titre courant incorrect sur les pages paires
% (\enquote{CHAPITRE (ou ANNEXE) XXX. Bibliographie du prÃ©sent chapitre}).
%    \begin{macrocode}
      \newrefsegment%
      \endrefsegment%
      \egroup%
    }%
  }{%
%    \end{macrocode}
%
% Si \package{biblatex} non chargÃ© (\package{bibtex} supposÃ©).
%    \begin{macrocode}
    \BeforeBeginEnvironment{thebibliography}{%
      \singlespacing%
    }%
    \AddToHook{env/thebibliography/end}{%
      \clearpage%
    }%
  }%
}%
%    \end{macrocode}
% \end{macro}
%
% On s'assure que, en fin de document, les \enquote{chapitres} et
% \enquote{section} sont non numÃ©rotÃ©s afin d'Ã©viter sur la (ou les ?)
% derniÃ¨re(s) page(s) des titres courants incorrects (comportant
% \enquote{Chapitre XXX. ...} ou \enquote{XXX.XXX} qui ne devraient pas
% apparaÃ®tre si le dernier chapitre du document est non numÃ©rotÃ©).
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \booltrue{YAD@nonnumbered@chapter}%
  \booltrue{YAD@nonnumbered@section}%
}
%    \end{macrocode}
%
% Si la commande Ã—\printbibliographyÃ— n'a pas Ã©tÃ© utilisÃ©e, une erreur est Ã©mise.
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \ifbool{YAD@printbibliography@used}{%
  }{%
    \ifbool{YAD@noprintbibliography}{%
    }{%
      \YAD@ClassError*[noprintbibliography]{%
        Commande \protect\printbibliography\space non utilisÃ©e%
      }{%
        La commande \protect\printbibliography\space n'a pas Ã©tÃ© utilisÃ©e. Celle-ci est
        requise.%
      }%
    }%
  }%
}%
%    \end{macrocode}
%
% Patch du \Package{glossaries}, pour lui appliquer certains
% rÃ©glages s'il est chargÃ© et notamment pour lui adjoindre une liste
% de symboles.
%    \begin{macrocode}
\AddToHook{package/glossaries/after}{%
%    \end{macrocode}
% Si on est en sortie Ã—output=paperÃ— (et pas en sortie Ã—output=paper*Ã—), on
% supprime la barre de navigation des glossaires qui ne sert que par ses liens
% hypertextes et donc \emph{a priori} pas en version imprimÃ©e.
%    \begin{macrocode}
  \ifbool{YAD@output@paper}{%
    \ifbool{YAD@output@paper@star}{%
    }{%
      \renewcommand{\glsnavigation}{}%
    }%
  }{%
  }%
%    \end{macrocode}
% CrÃ©ation d'une commande Ã—\newglssymbolÃ— pour dÃ©finir des symboles,
% dans l'esprit de Ã—\newacronymÃ— (Ã—\newsymbolÃ— ne peut pas Ãªtre
% employÃ©e car elle existe dÃ©jÃ&nbsp; dans le \Package{amsfonts})
%    \begin{macrocode}
  \newcommand{\newglssymbol}[5][]{%
    \@ifpackageloaded{glossaries}{%
%    \end{macrocode}
% Le tri du symbole dans la liste des symboles se fait par dÃ©faut
% sur la clÃ©...
%    \begin{macrocode}
      \ifthenelse{\isempty{#1}}{%
        \newglossaryentry{#2}{%
          type=symbols,%
          symbol={#3},%
          name={#4},%
          description={#5},%
          sort={#2}%
        }%
%    \end{macrocode}
% ... mais peut Ãªtre forcÃ© par l'argument optionnel de Ã—\newglssymbolÃ—
%    \begin{macrocode}
}{%
  \newglossaryentry{#2}{%
    type=symbols,%
    symbol={#3},%
    name={#4},%
    description={#5},%
    sort={#1}%
  }%
}%
}{%
  \ClassError{yathesis}{}{%
    Commande \protect\newglssymbol\space utilisÃ©e sans que 'glossaries' soit
    chargÃ©%
  }{%
    La commande \protect\newglssymbol ne peut Ãªtre\MessageBreak%
    utilisÃ©e que si le package 'glossaries' est chargÃ©%
  }%
}%
}%
%    \end{macrocode}
% On dÃ©finit un nouveau type de style de glossaire, Ã—yadsymbolstyleÃ—.
% \begin{macro}{\yadsymbolstyle}
%    \begin{macrocode}
\newglossarystyle{yadsymbolstyle}{%
  % put the glossary in the itemize environment:
  \renewenvironment{theglossary}%
  {\begin{description}}{\end{description}}%
  % have nothing after \begin{theglossary}:
  \renewcommand*{\glossaryheader}{}%
  % have nothing between glossary groups:
  \renewcommand*{\glsgroupheading}[1]{}%
  \renewcommand*{\glsgroupskip}{}%
  % set how each entry should appear:
  \renewcommand*{\glossentry}[2]{%
  \item[\textmd{\glossentrysymbol{##1}}]
    \glstarget{##1}{\glossentryname{##1}}% the entry name
    \ifthenelse{\equal{\glossentrydesc{##1}}{}}{%
    }{%
      \space (\glossentrydesc{##1})% the description
    }%
    \hfill ##2% the number list in square brackets
  }%
  % set how sub-entries appear:
  \renewcommand*{\subglossentry}[3]{%
    \glossentry{##2}{##3}}%
}%
%    \end{macrocode}
% \end{macro}
%
% La commande Ã—\printsymbolsÃ— est (re)dÃ©finie de sorte que lui soit par dÃ©faut
% appliquÃ© le style Ã—yadsymbolstyleÃ—.
% \begin{macro}{\printsymbols}
%    \begin{macrocode}
\ifundef{\printsymbols}{%
  \newcommand{\printsymbols}[1][]{%
    \printglossary[type=symbols,style=yadsymbolstyle,#1]%
  }%
}{%
  \renewcommand{\printsymbols}[1][]{%
    \printglossary[type=symbols,style=yadsymbolstyle,#1]%
  }%
}%
%    \end{macrocode}
% \end{macro}
% On force le chargement du \Package{glossaries-babel} si le
% \Package{glossaries} l'est, sans quoi les signets des glossaires
% et objets assimilÃ©s ne sont pas correctement traduits.
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{glossaries}{%
    \RequirePackage{glossaries-babel}%
  }{%
  }%
}%
%    \end{macrocode}
% On termine le patch du \Package{glossaries}.
%    \begin{macrocode}
}%
%    \end{macrocode}
%
% Le code suivant,
% (\href{https://texnique.fr/osqa/questions/8358/packages-glossaries-et-yathesis-pepin-de-forme-plurielle-glspl}{aimablement
% fourni par touhami}) permet que, dans le cas d'un mÃ©moire en anglais (option
% Ã—mainlanguage=englishÃ—), les rÃ¨gles s'appliquant aux glossaires et acronymes
% soient bien celles de l'anglais (et non du franÃ§ais).
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \@ifpackageloaded{glossaries}{%
    \IfLanguageName{english}{%
      \makeatletter
      \let\glossariescaptionsenglish\undefined
      \input{glossaries-english.ldf}
      \makeatother
    }{%
    }%
  }{%
  }%
}%
%    \end{macrocode}
%
% \section{Fichiers importÃ©s par la classe}
%
% La \yatcl{} charge les fichiers de configuration locale et de donnÃ©es
% caractÃ©ristiques du document, situÃ©s dans le rÃ©pertoire de configuration.
%
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \ifPDFTeX
  \shorthandon{;:!?}%
  \fi
  \InputIfFileExists{\YAD@configuration@directory/\YAD@configuration@file}%
  {\ClassInfo{yathesis}{%
    Fichier de configuration local \YAD@configuration@file\space
    trouvÃ©%
    }%
  }{%
    % \YAD@ClassWarningNoLine{%
    %   Fichier de configuration local
    %   \YAD@configuration@file\space introuvable%
    % }%
  }%
  \ifPDFTeX
  \shorthandoff{;:!?}%
  \fi
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \ifPDFTeX
  \shorthandon{;:!?}%
  \fi
  \InputIfFileExists{\YAD@configuration@directory/\YAD@characteristics@file}%
  {%
    \ClassInfo{yathesis}{%
      Fichier \YAD@characteristics@file\space des donnees du document trouvÃ©%
    }%
  }%
  {%
    % \YAD@ClassWarningNoLine{%
    %   Fichier \YAD@characteristics@file\space des donnees du titre
    %   introuvable.\MessageBreak%
    %   Le fichier \YAD@characteristics@file\space n'a pas Ã©tÃ© trouvÃ©\MessageBreak%
    %   dans le dossier `\YAD@configuration@directory'.\MessageBreak Ce fichier
    %   \YAD@characteristics@file\space peut faciliter l'usage\MessageBreak de la classe%
    % }%
  }%
  \ifPDFTeX
  \shorthandoff{;:!?}%
  \fi
}%
%    \end{macrocode}
%
% \section{Avertissements}
% \label{cha-yadr}
%
% Si la commande Ã—\tableofcontentsÃ— n'a pas Ã©tÃ© utilisÃ©e, une erreur est Ã©mise.
%    \begin{macrocode}
\AddToHook{enddocument}{%
  \ifbool{YAD@tableofcontents@used}{%
  }{%
    \ifbool{YAD@notableofcontents}{%
    }{%
      \YAD@ClassError*[notableofcontents]{%
        Commande \protect\tableofcontents\space non utilisÃ©e%
      }{%
        La commande \protect\tableofcontents\space n'a pas Ã©tÃ© utilisÃ©e. Celle-ci
        est requise.%
      }%
    }%
  }%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\expression{meta-logopres}{logo PRES}{logo PRES}
\expression{meta-logocomue}{logo ComUE}{logo ComUE}
\expression{meta-logoinstitute}{logo de l'institut}{logo de l'institut}
\expression{meta-institute}{institut principal}{institut principal}
\expression{meta-coinstitute}{institut de cotutelle}{institut de cotutelle}
\expression{meta-logocoinstitute}{logo de l'institut de cotutelle}{logo de l'institut de cotutelle}
\expression{meta-logocompany}{logo de l'entreprise}{logo de l'entreprise}
\expression{meta-doctoralschool}{\'ecole doctorale}{\'ecole doctorale}
\expression{meta-laboratory}{nom du laboratoire}{nom du laboratoire}
\expression{meta-logolaboratory}{logo du laboratoire}{logo du laboratoire}
\expression{meta-author}{pr\'enom et nom de l'auteur}{pr\'enom et nom de l'auteur}
\expression{meta-date}{date de la soutenance}{defense date}
\expression{meta-submissiondate}{date de la soumission}{submission date}
\expression{meta-academicfield}{discipline}{academic field}
\expression{meta-speciality}{sp\'ecialit\'e}{speciality}
\expression{meta-title}{titre du m\'emoire de th\`ese}{thesis title}
\expression{meta-subtitle}{sous-titre du m\'emoire de th\`ese}{thesis subtitle}
\expression{meta-firstname}{Pr\'enom}{Pr\'enom}
\expression{meta-lastname}{Nom}{Nom}
\expression{meta-role}{fonction}{fonction}
\expression{meta-corporation}{corporation}{corporation}
\expression{meta-corps}{corps}{corps}
\expression{meta-affiliation}{affiliation}{affiliation}
\expression{meta-introduction}{introduction}{introduction}%
\expression{meta-conclusion}{conclusion}{conclusion}%
\expression{meta-keywords}{mot(s) cl\'e(s) de la th\`ese}{thesis keyword(s)}
\expression{meta-laboratoryaddress}{adresse du laboratoire}{adresse du laboratoire}
\expression{meta-laboratorytelephone}{t\'el\'ephone du laboratoire}{t\'el\'ephone du laboratoire}
\expression{meta-laboratoryfax}{fax du laboratoire}{fax du laboratoire}
\expression{meta-laboratoryemail}{email du laboratoire}{email du laboratoire}
\expression{meta-urllaboratory}{URL du laboratoire}{URL du laboratoire}
\expression{meta-dedication}{d\'edicace}{dedication}
\expression{meta-dedications}{d\'edicaces}{dedications}
\expression{meta-epigraph}{\'epigraphe}{epigraph}
\expression{meta-epigraphs}{\'epigraphes}{epigraphs}
\expression{meta-abstract}{r\'esum\'e}{abstract}%
\expression{meta-ordernumber}{num\'ero d'ordre}{order number}%
%    \end{macrocode}
%
% Les traductions suivantes sont rassemblÃ©es dans le fichier
% \file{yathesis-translations.tex} qui doit Ãªtre importÃ© dans la classe.
%    \begin{macrocode}
\InputIfFileExists{\YAD@translations@file}{}{%
  \ClassError{%
    Fichier \`YAD@translations@file' non trouvÃ©%
  }{%
    Le fichier \`YAD@translations@file' n'a pas Ã©tÃ© trouvÃ©.\MessageBreak%
    Veuillez vÃ©rifier votre installation de la classe `yathesis'.%
  }%
}
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/class&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;*translations&gt;
%    \end{macrocode}
% Traduction des expressions clÃ©s de la thÃ¨se.
%    \begin{macrocode}
\expression{coinstitute}{}{}%
\expression{company}{}{}%
\expression{institute}{}{}%
\expression{email}{\Email}{\Email}%
\expression{phone}{\Telefon}{\Telefon}%
\expression{fax}{\Fax}{\Fax}%
\expression{caution}{Avertissement}{Caution}%
\expression{localbibname}{Bibliographie du pr\'esent chapitre}{Bibliography of the current chapter}%
\expression{draft}{brouillon}{draft}%
\expression{prepared-at}{Cette th\`ese a \'et\'e pr\'epar\'ee au}{This
  thesis has been prepared at}%
\expression{prepared-at-pl}{Cette th\`ese a \'et\'e pr\'epar\'ee dans les
  laboratoires suivants.}{This thesis has been prepared at the following
  research units.}%
\expression{prepared-at-hdr}{Cette \textsc{hdr} a \'et\'e pr\'epar\'ee au}{This
  habilitation to conduct research has been prepared at}%
\expression{prepared-at-pl-hdr}{Cette \textsc{hdr} a \'et\'e pr\'epar\'ee dans
  les laboratoires suivants.}{This habilitation to conduct research has been
  prepared at the following research units.}%
\expression{juniorresearcher}{charg\'e de recherche}{Junior Researcher}%
\expression{juniorresearcher-female}{charg\'ee de recherche}{\translate[to=English]{lbl-juniorresearcher}}%
\expression{juniorresearcher*}{\translate[to=French]{lbl-juniorresearcher}
  \textsc{hdr}}{\textsc{hdr} \translate[to=English]{lbl-juniorresearcher}}%
\expression{juniorresearcher-female*}{\translate[to=French]{lbl-juniorresearcher-female}
  \textsc{hdr}}{\translate[to=English]{lbl-juniorresearcher*}}%
\expression{cosupervisor}{co-directeur}{Co-Supervisor}%
\expression{cosupervisor-female}{co-directrice}{\translate[to=English]{lbl-cosupervisor}}
\expression{comonitor}{co-encadrant}{Co-Monitor}%
\expression{comonitor-female}{\translate[to=French]{lbl-comonitor}e}{\translate[to=English]{lbl-comonitor}}
\expression{committeemembers}{Composition du jury}{Committee members}%
% \expression{conclusion}{Conclusion}{Conclusion}%
\expression{estimateddefensedate}{Date de soutenance pr\'evue le}{Defense
  date scheduled on}%
\expression{supervisor}{directeur}{Supervisor}%
\expression{supervisor-female}{directrice}{\translate[to=English]{lbl-supervisor}}
\expression{seniorresearcher}{directeur de recherche}{Senior Researcher}%
\expression{seniorresearcher-female}{directrice de recherche}{\translate[to=English]{lbl-seniorresearcher}}%
\expression{supervisors-in-committee}{Directeur de th\`ese}{\translate[to=English]{lbl-supervisor}}%
\expression{supervisors-in-committee-pl}{Directeurs de th\`ese}{\translate[to=English]{lbl-supervisors-in-committee}s}%
\expression{supervisors-in-committee-female}{Directrice de th\`ese}{\translate[to=English]{lbl-supervisors-in-committee}}%
\expression{supervisors-in-committee-pl-female}{%
  Directrices de th\`ese%
}{%
  \translate[to=English]{lbl-supervisors-in-committee-pl}%
}%
\expression{supervisors-in-committee-hdr}{Directeur}{\translate[to=English]{lbl-supervisors-in-committee}}%
\expression{supervisors-in-committee-pl-hdr}{%
  \translate[to=French]{lbl-supervisors-in-committee-hdr}s%
}{%
  \translate[to=English]{lbl-supervisors-in-committee-pl}%
}%
\expression{supervisors-in-committee-hdr-female}{Directrice}{\translate[to=English]{lbl-supervisors-in-committee}}%
\expression{supervisors-in-committee-pl-hdr-female}{%
  \translate[to=French]{lbl-supervisors-in-committee-hdr-female}s%
}{%
  \translate[to=English]{lbl-supervisors-in-committee-pl}%
}%
\expression{academicfield}{Discipline}{Academic Field}%
\expression{doctoralschool}{\'Ecole doctorale}{Doctoral School}%
\expression{aim}{En vue de l'obtention du grade de docteur de l'}{In order
  to become Doctor from }%
\expression{aimand}{ et de l'}{ and from }%
\expression{examiners}{Examinateur}{Examiner}%
\expression{examiners-pl}{\translate[to=French]{lbl-examiners}s}{\translate[to=English]{lbl-examiners}s}%
\expression{examiners-female}{Examinatrice}{\translate[to=English]{lbl-examiners}}%
\expression{examiners-pl-female}{\translate[to=French]{lbl-examiners-female}s}{\translate[to=English]{lbl-examiners-pl}}%
\expression{guests}{Invit\'e}{Guest}%
\expression{guests-pl}{\translate[to=French]{lbl-guests}s}{\translate[to=English]{lbl-guests}s}%
\expression{guests-female}{\translate[to=French]{lbl-guests}e}{\translate[to=English]{lbl-guests}}%
\expression{guests-pl-female}{\translate[to=French]{lbl-guests-female}s}{\translate[to=English]{lbl-guests-pl}}%
\expression{referees}{Rapporteur}{Referee}%
\expression{referees-pl}{\translate[to=French]{lbl-referees}s}{\translate[to=English]{lbl-referees}s}%
\expression{referees-female}{\translate[to=French]{lbl-referees}e}{\translate[to=English]{lbl-referees}}%
\expression{referees-pl-female}{\translate[to=French]{lbl-referees-female}s}{\translate[to=English]{lbl-referees-pl}}%
% \expression{introduction}{Introduction}{Introduction}%
% \expression{mcf}{\textsc{mcf}}{Associate Professor}%
% \expression{mcf*}{\textsc{mcf} \textsc{hdr}}{\textsc{hdr} Associate Professor}%
\expression{associateprofessor}{\textsc{mcf}}{Associate Professor}%
\expression{associateprofessor*}{\textsc{mcf} \textsc{hdr}}{\textsc{hdr} Associate Professor}%
\expression{keywords}{Mots cl\'es}{Keywords}%
\expression{ordernumber}{Num\'ero d'ordre}{Order Number}%
% \expression{preface}{Pr\'eface}{Preface}%
\expression{committeepresident}{pr\'esident du jury}{Committee President}%
\expression{committeepresident-female}{pr\'esidente du jury}{\translate[to=English]{lbl-committeepresident}}%
\expression{professor}{professeur}{Professor}%
\expression{professor-female}{\translate[to=French]{lbl-professor}e}{\translate[to=English]{lbl-professor}}%
\expression{website}{Site}{Web Site}%
\expression{localtocname}{Sommaire du pr\'esent chapitre}{Outline of the current
  chapter}%
\expression{defendedon}{Soutenue le}{Defended on}%
\expression{speciality}{Sp\'ecialit\'e}{Speciality}%
\expression{supervisedby}{Th\`ese dirig\'ee par}{Thesis supervised by}%
\expression{supervisedby-hdr}{Habilitation dirig\'ee par}{Habilitation supervised by}%
\expression{thesisdefendedby}{Th\`ese pr\'esent\'ee par}{Thesis defended by}%
\expression{thesisdefendedby-hdr}{Habilitation \`a diriger les recherches
  pr\'esent\'ee par}{Habilitation to conduct research defended by}%
\expression{thesistitle}{}{}%
\expression{thesistitle-hdr}{}{}%
\expression{inprogress}{travail en cours}{work in progress}%
\expression{universitydepartment}{Unit\'e de recherche}{University Department}%
\expression{versiondate}{Version interm\'ediaire en date du}{Work in progress as
  of}%
\expression{inprogressfoottext}{\translate[to=French]{lbl-versiondate}}{\translate[to=English]{lbl-versiondate}}%
\expression{submittedfoottext}{Version soumise en date du}{Submitted work as
  of}%
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/translations&gt;
%    \end{macrocode}
%
% \section{Fichier de complÃ©tion}
% Maintenant, le \File{yathesis.cwl} pour la complÃ©tion, le contrÃ´le de la syntaxe et la
% coloration dans \texstudio{} des commandes de la \yatCl{} :
%
%    \begin{macrocode}
%&lt;*class-cwl&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
# mode: yathesis.cls
# denisbitouze, 2021-03-23
#
#include:class-book
#include:adjustbox
#include:array
#include:babel
#include:biblatex
#include:bookmark
#include:colophon
#include:csquotes
#include:datatool
#include:datetime2
#include:draftwatermark
#include:environ
#include:epigraph
#include:etoc
#include:etoolbox
#include:fncychap
#include:geometry
#include:graphicx
#include:hypcap
#include:ifdraft
#include:iflang
#include:iftex
#include:letltxmacro
#include:marvosym
#include:morewrites
#include:nonumonpart
#include:pgfopts
#include:setspace
#include:tabularx
#include:tcolorbox
#include:textcase
#include:titlesec
#include:tocbibind
#include:translator
#include:twoopt
#include:xcolor
#include:xifthen
#include:xkeyval
#include:xpatch
#include:xstring
#
# Document class
#
#keyvals:\documentclass/yathesis
mainlanguage=#french,english
secnumdepth=#part,chapter,section,subsection,subsubsection,paragraph,subparagraph
space=#single,onehalf,double
chap-style=#Sonny,Lenny,Glenn,Conny,Rejne,Bjarne,PetersLenny,Bjornstrup,none
fncychap=#Sonny,Lenny,Glenn,Conny,Rejne,Bjarne,PetersLenny,Bjornstrup,none
nofrontcover#true,false
sepcorpaffilfrench=
sepcorpaffilenglish=
version=#inprogress,inprogress*,submitted,submitted*,final,draft
output=#screen,paper,paper*
colophon-location=#verso-frontcover,recto-backcover,nowhere
hdr
numlaboratories=%&lt;âŸ¨nombre de laboratoires affichÃ©sâŸ©%&gt;
localtocs
localtocs/depth=#section,subsection,subsubsection,paragraph,subparagraph
localbibs
localbibs*
10pt
11pt
12pt
leqno
fleqn
oneside
noerror
noauthor
notitle
noacademicfield
nodate
noinstitute
nodoctoralschool
nolaboratory
nolaboratoryaddress
nosupervisor
nomaketitle
nokeywords
noabstract
nomakeabstract
notableofcontents
noprintbibliography
graphicx={%&lt;âŸ¨options du package graphicxâŸ©%&gt;}
adjustbox={%&lt;âŸ¨options du package adjustboxâŸ©%&gt;}
setspace={%&lt;âŸ¨options du package setspaceâŸ©%&gt;}
xcolor={%&lt;âŸ¨options du package xcolorâŸ©%&gt;}
datatool={%&lt;âŸ¨options du package datatoolâŸ©%&gt;}
titlesec={%&lt;âŸ¨options du package titlesecâŸ©%&gt;}
draftwatermark={%&lt;âŸ¨options du package draftwatermarkâŸ©%&gt;}
babel={%&lt;âŸ¨options du package babelâŸ©%&gt;}
datetime2={%&lt;âŸ¨options du package datetime2âŸ©%&gt;}
corps=%&lt;âŸ¨corporationâŸ©%&gt;
role=%&lt;âŸ¨roleâŸ©%&gt;
#endkeyvals
#
\yadsetup{âŸ¨optionsâŸ©%keyvals}#n
#
# Cover and title pages
#
# Author
\author{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\author[âŸ¨emailâŸ©]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
#
# Title, etc.
\title[âŸ¨titre dans la langue secondaireâŸ©%text]{âŸ¨titre dans la langue principaleâŸ©%text}#n
\subtitle[âŸ¨sous-titre dans la langue secondaireâŸ©%text]{âŸ¨sous-titre dans la langue principaleâŸ©%text}#n
\academicfield[âŸ¨discipline dans la langue secondaireâŸ©%text]{âŸ¨discipline dans la langue principaleâŸ©%text}#n
\speciality[âŸ¨spÃ©cialitÃ© dans la langue secondaireâŸ©%text]{âŸ¨spÃ©cialitÃ© dans la langue principaleâŸ©%text}#n
\subject[âŸ¨sujet dans la langue secondaireâŸ©%text]{âŸ¨sujet dans la langue principaleâŸ©%text}#n
#
\title{âŸ¨titreâŸ©%text}#n
\subtitle{âŸ¨sous-titreâŸ©%text}#n
\academicfield{âŸ¨disciplineâŸ©%text}#n
\speciality{âŸ¨spÃ©cialitÃ©âŸ©%text}#n
\subject{âŸ¨sujetâŸ©%text}#n
\date{âŸ¨jourâŸ©}{âŸ¨moisâŸ©}{âŸ¨annÃ©eâŸ©}#n
\submissiondate{âŸ¨jourâŸ©}{âŸ¨moisâŸ©}{âŸ¨annÃ©eâŸ©}#n
#
# Institute and entities
\pres{âŸ¨nom du PRESâŸ©}#n
\comue{âŸ¨nom de la ComUEâŸ©}#n
\institute{âŸ¨nom de l'institutâŸ©%text}#n
\coinstitute{âŸ¨nom de l'institut de cotutelleâŸ©%text}#n
\company{âŸ¨nom de l'entrepriseâŸ©}#n
\doctoralschool{âŸ¨nom de l'Ã©cole doctoraleâŸ©%text}#n
\laboratory{âŸ¨nom du laboratoireâŸ©}{âŸ¨adresse du laboratoireâŸ©}#n
#
\pres[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom du PRESâŸ©}#n
\comue[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom de la ComUEâŸ©}#n
\institute[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom de l'institutâŸ©%text}#n
\coinstitute[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom de l'institut de cotutelleâŸ©%text}#n
\company[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom de l'entrepriseâŸ©}#n
\doctoralschool[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom de l'Ã©cole doctoraleâŸ©%text}#n
#
#keyvals:\pres,\comue,\doctoralschool,\institute,\coinstitute,\company
logo=%&lt;âŸ¨fichier imageâŸ©%&gt;
logoheight=%&lt;âŸ¨hauteurâŸ©%&gt;
url=%&lt;âŸ¨URLâŸ©%&gt;
nologo
#endkeyvals
#
\laboratory[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨nom du laboratoireâŸ©}{âŸ¨adresse du laboratoireâŸ©}#n
#
#keyvals:\laboratory
logo=%&lt;âŸ¨fichier imageâŸ©%&gt;
logoheight=%&lt;âŸ¨hauteurâŸ©%&gt;
url=%&lt;âŸ¨URLâŸ©%&gt;
telephone=%&lt;âŸ¨numÃ©ro de tÃ©lÃ©phoneâŸ©%&gt;
fax=%&lt;âŸ¨numÃ©ro de faxâŸ©%&gt;
email=%&lt;âŸ¨courrielâŸ©%&gt;
nonamelink
#endkeyvals
#
# Committee
\supervisor[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\cosupervisor[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\comonitor[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\referee[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\examiner[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\committeepresident[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\guest[âŸ¨prÃ©cisionsâŸ©%keyvals]{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
#
\supervisor{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\cosupervisor{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\comonitor{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\referee{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\examiner{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\committeepresident{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
\guest{âŸ¨prÃ©nomâŸ©}{âŸ¨nomâŸ©}#n
#
#keyvals:\supervisor,\cosupervisor,\comonitor,\referee,\examiner,\committeepresident,\guest
affiliation=%&lt;âŸ¨affiliationâŸ©%&gt;
professor
seniorresearcher
mcf
mcf*
associateprofessor
associateprofessor*
juniorresearcher
juniorresearcher*
male
female
#endkeyvals
#
# Misc
\ordernumber[âŸ¨numÃ©ro d'ordreâŸ©]#n
\ordernumber#*n
#
# Keywords
\keywords{âŸ¨mots clÃ©s dans la langue principaleâŸ©%text}{âŸ¨mots clÃ©s dans la langue secondaireâŸ©%text}#n
#
# Title
\maketitle
\maketitle[âŸ¨optionsâŸ©%keyvals]
#
#keyvals:\maketitle
nofrontcover
noaim
frametitle=#shadowbox,ovalbox,none,fbox,{âŸ¨autreâŸ©}
#endkeyvals
#
# Preliminary part
#
\colophontext{âŸ¨texteâŸ©%text}#n*
\disclaimertext{âŸ¨clauseâŸ©%text}#n
\makedisclaimer#n
\makedisclaimer*#n
\makekeywords#n
\makekeywords*#n
\makelaboratory#n
\makelaboratory*#n
\dedication{âŸ¨dÃ©dicaceâŸ©%text}#n
\makededications#n
\makededications*#n
\frontepigraph{âŸ¨Ã©pigrapheâŸ©%text}{âŸ¨auteurâŸ©}
\frontepigraph[âŸ¨langueâŸ©]{âŸ¨Ã©pigrapheâŸ©%text}{âŸ¨auteurâŸ©}
\makefrontepigraphs#n
\makefrontepigraphs*#n
\begin{abstract}#n
\begin{abstract}[âŸ¨titre alternatifâŸ©%text]#n*
\end{abstract}#n
\makeabstract#n
\newglssymbol{âŸ¨labelâŸ©%labeldef}{âŸ¨symboleâŸ©}{âŸ¨nomâŸ©}{âŸ¨descriptionâŸ©%text}#n
\newglssymbol[âŸ¨classementâŸ©]{âŸ¨labelâŸ©%labeldef}{âŸ¨symboleâŸ©}{âŸ¨nomâŸ©}{âŸ¨descriptionâŸ©%text}#n
\tableofcontents#n*
\tableofcontents[âŸ¨prÃ©cisionsâŸ©%keyvals]#n*
#
#keyvals:\tableofcontents
depth=#part,chapter,section,subsection,subsubsection,paragraph,subparagraph
name=%&lt;âŸ¨nom de la table des matiÃ¨resâŸ©%&gt;
#endkeyvals
#
# Main part
#
\chapter{âŸ¨titreâŸ©%title}#L1
\chapter*{âŸ¨titreâŸ©%title}#L1
\chapter[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L1
\chapter*[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L1
\chapter[âŸ¨titre alt. pour TdMâŸ©%short title][âŸ¨titre alt. pour entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L1
\chapter*[âŸ¨titre alt. pour TdMâŸ©%short title][âŸ¨titre alt. pour entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L1
\section{âŸ¨titreâŸ©%title}#L2
\section*{âŸ¨titreâŸ©%title}#L2
\section[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L2
\section*[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L2
\section[âŸ¨titre alt. pour TdMâŸ©%short title][âŸ¨titre alt. pour entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L2
\section*[âŸ¨titre alt. pour TdMâŸ©%short title][âŸ¨titre alt. pour entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L2
\subsection{âŸ¨titreâŸ©%title}#L3
\subsection*{âŸ¨titreâŸ©%title}#L3
\subsection[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L3
\subsection*[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L3
\subsubsection{âŸ¨titreâŸ©%title}#L4
\subsubsection*{âŸ¨titreâŸ©%title}#L4
\subsubsection[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L4
\subsubsection*[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L4
\paragraph{âŸ¨titreâŸ©%title}#L5
\paragraph*{âŸ¨titreâŸ©%title}#L5
\paragraph[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L5
\paragraph*[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L5
\subparagraph{âŸ¨titreâŸ©%title}#L6
\subparagraph[âŸ¨titre alt. pour TdM et entÃªteâŸ©%short title]{âŸ¨titreâŸ©%title}#L6
#
# Appendix part
#
# Back matter part
#
\makebackcover
#
# All parts
#
\startlocaltocs
\stoplocaltocs
\nextwithlocaltoc
\nextwithoutlocaltoc
\leadchapter{âŸ¨texteâŸ©%text}
\printsymbols[âŸ¨optionsâŸ©%keyvals]
#
#keyvals:\printsymbols
style=#yadsymbolstyle,âŸ¨autreâŸ©
#endkeyvals
#
# Customization
#
\expression{âŸ¨labelâŸ©%labeldef}{âŸ¨valeur en franÃ§aisâŸ©%text}{âŸ¨valeur en anglaisâŸ©%text}#n*
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/class-cwl&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;*demopkg&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
\RequirePackage{xpatch}
\RequirePackage{xstring}
\RequirePackage{xparse}
\RequirePackage{letltxmacro}
\RequirePackage{xifthen}
\RequirePackage[user,abspage]{zref}
%
\AfterEndPreamble{
  \pretocmd{\tableofcontents@YAD@without@argument}{\cleardoublepage\zlabel{tableofcontents-withoutargument}}{}{}
  \pretocmd{\tableofcontents@YAD@with@argument}{\cleardoublepage\zlabel{tableofcontents-withargument}}{}{}
  \pretocmd{\printcolophontext}{\zlabel{colophon}}{}{}
  \pretocmd{\maketitle}{\zlabel{fr-title}}{}{}%
  \pretocmd{\makedisclaimer}{\cleardoublepage\zlabel{disclaimer}}{}{}
  \pretocmd{\makekeywords}{\cleardoublepage\zlabel{keywords}}{}{}
  \pretocmd{\makelaboratory}{\cleardoublepage\zlabel{laboratory}}{}{}
  \pretocmd{\makededications}{\cleardoublepage\zlabel{dedications}}{}{}
  \pretocmd{\makefrontepigraphs}{\cleardoublepage\zlabel{frontepigraphs}}{}{}
  \pretocmd{\acknowledgements}{\cleardoublepage\zlabel{acknowledgements}}{}{}
  \pretocmd{\caution}{\cleardoublepage\zlabel{caution}}{}{}
  \pretocmd{\makeabstract}{\cleardoublepage\zlabel{abstract}}{}{}
  \pretocmd{\foreword}{\cleardoublepage\zlabel{foreword}}{}{}
  \let\YAD@demo@chapter@ORI\chapter%
  \RenewDocumentCommand\chapter{som}{%
    \IfBooleanTF{#1}
    {
      \ifthenelse{\equal{#3}{Introduction gÃ©nÃ©rale}}{\cleardoublepage\zlabel{introduction}%
      }{%
      }%
      \IfNoValueTF{#2}
      {\YAD@demo@chapter@ORI*{#3}}
      {\YAD@demo@chapter@ORI*[#2]{#3}}%
    }
    {%
      \ifthenelse{\equal{#3}{Introduction gÃ©nÃ©rale}}{\cleardoublepage\zlabel{introduction}%
      }{%
      }%
      \ifthenelse{\equal{#3}{Contexte du chaos du rire}}{\cleardoublepage\zlabel{chapter}%
      }{%
      }%
      \ifthenelse{\equal{#3}{DÃ©veloppement du chaos du rire}}{\zlabel{localbib}%
      }{%
      }%
      \ifthenelse{\equal{#3}{Documents juridiques}}{\cleardoublepage\zlabel{appendix}%
      }{%
      }%
      \IfNoValueTF{#2}
      {\YAD@demo@chapter@ORI{#3}}
      {\YAD@demo@chapter@ORI[#2]{#3}}%
    }
  }
  \ifcsdef{printglossary}{%
    \LetLtxMacro{\YAD@printglossary@ORI}{\printglossary}
    \renewcommand{\printglossary}[1][]{%
      \ifthenelse{\isempty{#1}}{\cleardoublepage\zlabel{printglossary}%
      }{%
      }%
      \YAD@printglossary@ORI[{#1}]%
    }
    \xpretocmd{\printacronyms}{\cleardoublepage\zlabel{printacronyms}}{}{}
    \xpretocmd{\printsymbols}{\cleardoublepage\zlabel{printsymbols}}{}{}
  }{%
  }
  \xpretocmd{\conclusion}{\cleardoublepage\zlabel{conclusion}}{}{}
  \xpretocmd{\conclusion*}{\cleardoublepage\zlabel{conclusion}}{}{}
  \ifcsdef{printbibliography}{%
    \xpretocmd{\printbibliography}{\cleardoublepage\zlabel{printbibliography}}{}{}
    }{}
  \ifcsdef{printindex}{%
    \xpretocmd{\printindex}{\cleardoublepage\zlabel{printindex}}{}{}
  }{}
  \xapptocmd{\makebackcover}{\zlabel{makebackcover}}{}{}
  \let\include\input
}
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/demopkg&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;*samples-templates-latexmkrc&gt;
%    \end{macrocode}
%
%    \begin{macrocode}
$pdf_mode = 1;

$bibtex_use = 1;
$bibtex = 'biber %O %B';

add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' );
add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
add_cus_dep('slo', 'sls', 0, 'makeglossaries');
$clean_ext .= " acr acn alg glo gls glg slo sls slg";
sub makeglossaries {
  my ($base_name, $path) = fileparse( $_[0] );
  pushd $path;
  my $return = system "makeglossaries", $base_name;
  popd;
  return $return;
}

$makeindex = 'texindy -L french -C utf8';

push @generated_exts, 'acn', 'acr', 'alg', 'bbl', 'bcf', 'fls', 'gl*', 'idx',
'ind', 'ist', 'sbl*', 'sl*', 'sym*' ;

$clean_ext .= 'synctex.gz* run.xml tex.bak out bbl bcf fdb_latexmk run tdo listing *~ lo* unq mw' ;
%    \end{macrocode}
%
%    \begin{macrocode}
%&lt;/samples-templates-latexmkrc&gt;
%    \end{macrocode}
%
%
% \end{implementation}
%
\endinput

%%% Local Variables:
%%% mode: doctex
%%% ispell-local-dictionary: "francais"
%%% TeX-command-default: "TeX"
%%% TeX-master: t
%%% End:
</pre></body></html>