#######################################################################################
# A default configuration that will be loaded for all jupyter books
# See the documentation for help and more options:
# https://jupyterbook.org/customize/config.html

#######################################################################################
# Book settings
title                       : Introduction à la Programmation Impérative
author                      : Nicolas M. Thiéry et al.
copyright                   : "2013-2024 Licence libre Creative Commons CC-BY-SA"
#logo                        : logo.png  # A path to the book logo

sphinx:
  config:
    language: 'fr'
    html_extra_path: ['assets']
    todo_include_todos: true
    mathjax3_config:
      tex:
        macros:
          'SI': ['#1\ #2', 2]
          'meter': '\text{m}'
          'per': '/'
          'second': '\text{s}'
          'kilogram': '\text{kg}'
          'squared': '^2'
    latex_elements:
      papersize: 'a4paper'
      extrapackages: |
        \usepackage{multicol}
        \usepackage{etoolbox}
        \usepackage[toc]{multitoc}
      preamble: |
        \geometry{landscape,left=1cm, right=1cm, top=1.75cm, bottom=1.2cm,twoside=false}
        % Pour impression agrafée côté long avec espace alternatif
        % \makeatletter\patchcmd\@outputpage{\topmargin}{\ifodd\count\z@ 0cm\else -2cm\fi}{}{}
        \makeatother
        \renewcommand*{\multicolumntoc}{2}
        \setlength{\columnseprule}{1pt}
        \setlength{\columnsep}{2cm}
      maketitle: |
         \sphinxmaketitle
         \
         \clearpage
         \twocolumn
      tableofcontents: |
        \sphinxtableofcontents
        \pagestyle{empty}
        %\setcounter{page}{1}
        \pagestyle{plain}
        %\twocolumn %\multicols{2}
  extra_extensions:
    - sphinx_proof
    - sphinx.ext.todo
  local_extensions:
    latexonly: 'extensions/'
    semantic: 'extensions/'
    cpp_lexer_aliases: 'extensions/'


repository:
  url                       : https://gitlab.dsi.universite-paris-saclay.fr/Info111/Info111  # The URL to your book's repository
  path_to_book              : ""  # A path to your book's folder, relative to the repository root.
  branch                    : master  # Which branch of the repository should be used when creating links

only_build_toc_files: true

exclude_patterns:
  - .*

parse:
  myst_enable_extensions:  # default extensions to enable in the myst parser. See https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html
    - html_image
    # - amsmath
    - colon_fence
    # - deflist
    - dollarmath
    - html_admonition
    - linkify
    # - replacements
    # - smartquotes
    - substitution

html:
  favicon                   : ""  # A path to a favicon image
  use_edit_page_button      : true  # Whether to add an "edit this page" button to pages. If `true`, repository information in repository: must be filled in
  use_repository_button     : true  # Whether to add a link to your repository button
  # use_issues_button         : true  # Whether to add an "open an issue" button
  use_multitoc_numbering    : false   # Continuous numbering across parts/chapters
  extra_navbar              : Site produit par <a href="https://jupyterbook.org">Jupyter Book</a>  # Will be displayed underneath the left navbar.
  extra_footer              : ""  # Will be displayed underneath the footer.
  google_analytics_id       : ""  # A GA id that can be used to track book views.
  home_page_in_navbar       : true  # Whether to include your home page in the left Navigation Bar
  baseurl                   : "https://Nicolas.thiery.name/Enseignement/Info111/"  # The base URL where your book will be hosted. Used for creating image previews and social links. e.g.: https://mypage.com/mybook/
  comments:
    hypothesis              : false
    utterances              : false

latex:
  latex_documents:
    targetname: info-111.tex

#######################################################################################
# Launch button settings
launch_buttons:
  notebook_interface        : jupyterlab  # The interface interactive links will activate ["classic", "jupyterlab"]
  binderhub_url             : ""  # The URL of the BinderHub (e.g., https://mybinder.org)
  jupyterhub_url            : ""  # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu)
  thebe                     : false  # Add a thebe button to pages (requires the repository to run on Binder)
  colab_url                 : "" # The URL of Google Colab (https://colab.research.google.com)


execute:
  execute_notebooks: false

semantic:
  namespace: https://Nicolas.Thiery.name/Enseignement/Info111
  aim:
  - concept: mathhub.org/smglom/computing/programming-paradigm?imperative-programming
    level: introductory
    programming_language: C++

  symdecls:
    - verbalization: C++
      en: C++
      mathhub: '[smglom/computing]mod?CppLanguage.en?CppLanguage'
    - verbalization: informatique
      en: computer science
      mathhub: '[smglom/cs]mod?computer-science?CS'
    - verbalization: programme (informel)
      en: program (informal)
      mathhub: '[smglom/computing]mod?program?program'
    - verbalization: programme
      en: program
      mathhub: '[smglom/computing]mod?program?program'
    - verbalization: entrée
      en: input (informal)
      mathhub: '[smglom/computing]mod?algorithm?input'
    - verbalization: sortie
      en: output (informal)
      mathhub: '[smglom/computing]mod?algorithm?output'
    - verbalization: entrée standard
      en: standard input
      groups: program
    - verbalization: sortie standard
      en: standard output
      groups: program
    - verbalization: sortie d'erreur
      en: standard error
      groups: program
    - verbalization: assembleur
      en: assembly language
      mathhub: '[smglom/computing]mod?ASM?ASM'
    - verbalization: surcharge de fonction
      en: function overloading
      mathhub: '[smglom/computing]mod?function-overloading?function overloading'
      groups: fonction
    - verbalization: template
      en: template
    - verbalization: espace de nom
      en: namespace
      mathhub: '[smglom/computing]mod?namespace?namespace'
    - verbalization: directive d'inclusion
      en: include directive
      mathhub: '[smglom/computing]mod?include?include'
    - verbalization: entêtes seuls
      en: header only
      mathhub: '[smglom/computing]mod?header-file?header file'
    - verbalization: définition de fonction
      en: function definition
      mathhub: '[smglom/computing]mod?subroutine?function'
      groups: fonction
    - verbalization: signature
      en: function signature
      mathhub: '[smglom/computing]mod?subroutine?signature'
    - verbalization: éditeur de liens
      en: linker
      mathhub: '[smglom/computing]mod?linker'
    - verbalization: fichier source
      en: source file
      # mathhub: '[smglom/computing]mod?executable' TODO
    - verbalization: fichier objet
      en: object file
      # mathhub: '[smglom/computing]mod?executable' TODO
    - verbalization: fichier exécutable
      en: executable file
      mathhub: '[smglom/computing]mod?executable'
    - verbalization: expression
      en: expression
      mathhub: '[smglom/grammar]mod?wfexp?expression'
    - verbalization: syntaxe
      en: syntax
      mathhub: '[smglom/logic]mod?syntax-semantics?syntax'
    - verbalization: sémantique
      en: semantics
      mathhub: '[smglom/logic]mod?syntax-semantics?semantics'
    - verbalization: algorithme
      en: algorithm
      mathhub: '[smglom/computing]mod?algorithm?algorithm'
    - verbalization: expression booléenne
      en: Boolean expression
      mathhub: '[smglom/computing]mod?boolean-type?Boolean expression'
      groups: expression
    - verbalization: condition
      en: condition
      mathhub: '[smglom/computing]mod?condition?condition'
      synonym: expression booléenne
    - verbalization: variable
      en: variable
      mathhub: '[smglom/computing]mod?program-variable?variable'
    - verbalization: type (informel)
      en: type (informal)
      groups: type
    - verbalization: bit
      en: bit
      mathhub: '[smglom/cs]mod?bits?bit'
    - verbalization: octet
      en: byte
      mathhub: '[smglom/cs]mod?bits?byte'
      groups: type
    - verbalization: entier
      en: integer
      mathhub: '[smglom/computing]mod?integer-type?integer'
      groups: type
    - verbalization: réel
      en: float
      mathhub: '[smglom/computing]mod?floating-point-number?float'
      groups: type
    - verbalization: caractère
      en: character
      mathhub: '[smglom/computing]mod?character?character'
      groups: type ordinal
    - verbalization: chaîne de charactères
      en: string
      mathhub: '[smglom/computing]mod?string?string'
      groups: type
    - verbalization: booléen
      en: Boolean type
      mathhub: '[smglom/computing]mod?boolean-type?Boolean'
      groups: type
    - verbalization: type ordinal
      en: ordinal type
      groups: type
    - verbalization: déclaration de variable
      en: variable declaration
      mathhub: '[smglom/gdp]mod?declaration?declaration'
      groups: variable
    - verbalization: fonction (informel)
      en: programming function (informal)
      mathhub: '[smglom/computing]mod?subroutine?function'
      groups: fonction
    - verbalization: fonction
      en: function (programming)
      mathhub: '[smglom/computing]mod?subroutine?function'
    - verbalization: bloc d'instructions
      en: code block
      mathhub: '[smglom/eida]mod?block?code block'
    - verbalization: indentation
      en: indentation
      mathhub: '[smglom/computing]mod?indentation'
    - verbalization: initialisation
      en: initialisation
      mathhub: '[smglom/computing]mod?program-variable?initialize'
      groups: variables
    - verbalization: incrémentation
      en: incrementation
      mathhub: '[smglom/computing]mod?increment'
      groups: opérateur
    - verbalization: compteur
      en: counter
      mathhub: '[smglom/computing]mod?counter?counter'
      groups: boucles for, variables
    - verbalization: accumulateur
      en: accumulator
      groups: boucles for, variables
    - verbalization: terminal
      en: terminal # as in shell
      mathhub: '[smglom/computing]mod?terminal-app?terminal'
    - verbalization: panneau
      en: panel # UI widget
      mathhub: '[smglom/computing]mod?panel?panel'
      groups: jupyter
    - verbalization: variable locale
      en: local variable
      mathhub: '[smglom/computing]mod?local-global?local'
      groups: fonction, variable
    - verbalization: variable globale
      en: global variable
      groups: fonction, variable
    - verbalization: paramètre formel
      en: formal parameter
      mathhub: '[smglom/computing]mod?subroutine?parameter'
    - verbalization: paramètre réel
      groups: fonction
    - verbalization: tableau
      en: homogeneous contiguous array
      mathhub: '[smglom/gdp]mod?array?array'
      groups: collection
    - verbalization: élément
      en: element # of an array or collection
      mathhub: '[smglom/computing]?mod?container?element'
      groups: collection
    - verbalization: indice
      en: array index
      mathhub: '[smglom/eida]mod?array?array index'
      groups: collection
    - verbalization: collection
      en: collection datatype
      mathhub: '[smglom/computing]?mod?container?container'
    - verbalization: auto
      en: auto (c++ keyword)
      groups: type
    - verbalization: pile
      en: stack
      mathhub: '[smglom/computing]mod?stack?stack'
    - verbalization: tas
      en: heap
      mathhub: '[smglom/computing]mod?dynamic-memory-allocation?heap'
    - verbalization: exception
      en: exception
      mathhub: '[smglom/computing]mod?exception?exception'
    - verbalization: exceptions standard
      en: standard exception
      mathhub: '[smglom/computing]mod?exception?exception [smglom/computing]mod?standard-library?standard'
    - verbalization: bon état
      en: good state # for a stream
      mathhub: '[smglom/computing]mod?state?state'
      groups: flux
    - verbalization: mauvais état
      en: bad state # for a stream
      mathhub: '[smglom/computing]mod?state?state'
      groups: flux
    - verbalization: flux sortant
      en: input stream
      mathhub: '[smglom/computing]mod?process?input'
      groups: flux
    - verbalization: flux entrant
      en: output stream
      mathhub: '[smglom/computing]mod?process?output'
      groups: flux
    - verbalization: affectation
      en: assignment
      mathhub: '[smglom/computing]mod?assignment.en?variable assignment'
      groups: variables
    - verbalization: valeur
    - verbalization: type
      en: type
    - verbalization: adresse
      en: address # of a variable
      groups: variable
    - verbalization: boucle while
      en: while loop
      mathhub: '[smglom/computing]/mod?loop?while loop'
      wikidata: Q838101 # while loop
      depends_on: condition
      groups: instruction itérative
    - verbalization: boucle for
      en: for loop
      mathhub: '[smglom/computing]/mod?loop?for loop'
      wikidata: Q838119 # for loop
      groups: instruction itérative
    - verbalization: boucle for each
      en: for each loop
      groups: instruction itérative
    - verbalization: nom versus valeur pour une variable de type chaîne de caractères
      groups: variable, chaîne de caractère
    - verbalization: opérateur sur les entiers
      groups: opérateur, entier
    - verbalization: priorité opérateurs
      groups: opérateur
    - verbalization: opérateur booléen
      groups: opérateur, bool
    - verbalization: instruction conditionnelle
      groups: structure de contrôle
    - verbalization: erreur classique instructions conditionnelles
      groups: instruction conditionnelle
    - verbalization: surcharge_de_fonctions
      groups: fonction
    - verbalization: templates
    - verbalization: mode édition
      groups: jupyter
    - verbalization: mode commande
      groups: jupyter
    - verbalization: instruction itérative
      groups: structure de contrôle
    - verbalization: boucle
      groups: structure de contrôle
      synonym: instruction itérative
    - verbalization: identificateur
      groups: variable
    - verbalization: précision absolue
    - verbalization: précision relative
      groups: fonction
    - verbalization: renvoie
      groups: fonction
    - verbalization: appel de fonction
      groups: fonction
    - verbalization: déclaration de fonction
      groups: fonction
    - verbalization: valeur de retour
      groups: fonction
    - verbalization: par valeur
      groups: fonction
    - verbalization: par référence
      groups: fonction
    - verbalization: procédures
      groups: fonction
    - verbalization: effet de bord
    - verbalization: fonction récursive
      groups: fonction
    - verbalization: valeur composite
      groups: collection
    - verbalization: homogène
      groups: collection
    - verbalization: exception standard
    - verbalization: bla                   # Exemple de symbole
