Jupyter Book#


Intro line

Ressources:


Introduction#

β€£ Jupyter Book 101 #


This video walk you through the steps required to start your journey using Jupyter Book. This is personnaly where I started.

β€£ Before to start #

Requirements

  • Knowledge
    • Markdown: this is the synthax you will use to write your book content

  • Softwares
    • Anaconda
    • [Jupyter Lab]
    • Python IDE
    • Command Line Interface (CLI)

Ressources

Examples

  • Turing Way … Good guide for open science

β€£ Create your first book #

Open Jupyter Lab and enter the following command.


jb create bookname/

Note

You can also fork a book created by someone else via Github (link towards templates when created).

This is it! You have just created your first book, now let's explore a bit deeper

Project Structure#

β€£ Folders #

quickstart/
  β”œβ”€β”€ πŸ†• _build
  β”‚   β”œβ”€β”€ exports
  β”‚   β”œβ”€β”€ site
  β”‚   β”‚   β”œβ”€β”€ content
  β”‚   β”‚   β”œβ”€β”€ public
  β”‚   β”‚   └── config.json
  β”‚   β”œβ”€β”€ temp
  β”‚   └── templates
  β”‚       β”œβ”€β”€ site/myst/book-theme
  β”‚       └── tex/myst/arxiv_two_column
  β”œβ”€β”€ images
  β”‚   β”œβ”€β”€ image.png
  β”‚   └── image.gif
  β”œβ”€β”€ 01-paper.md
  β”œβ”€β”€ 02-notebook.ipynb
  β”œβ”€β”€ README.md
  └── πŸ†• myst.yml

Note

Insert real folder structure of this book (show below in dropdown the full ontology map)

Explanation of the different folders etc …

  • _build
  • _static

β€£ Files #

Note

Explain the different files _tocuse grid 2

  • 1 is capture d’ecran de page or page structure
  • gauch is explanation of different section
In Depth Explanation
  • title: title of your book (will appear on the navbar)

  • author: you obviously (will appear in the footer)

  • logo: will appear on the top left (above the left navbar)

  • execute: if you want to force or not the execution of the ipynb files when building the book, can take different value

    • force:

  • latex:

  • bibtex_bibfiles:

  • repository:

  • html:

  • sphinx:

title: Tools
author: <strong>Vincent Deguin</strong> (with ❀️)
logo: _static/Logo/logo_SFTP.png

execute:
  execute_notebooks: force

latex:
  latex_documents:
    targetname: book.tex

bibtex_bibfiles:
  - Biblio/reference.bib

repository:
  url: https://github.com/Deugz/nb-tools  # Online location of your book
  path_to_book: _build/html/  # Optional path to your book, relative to the repository root
  branch: main  # Which branch of the repository should be used when creating links (optional)

html:
  favicon                   : "_static/Logo/logo_SFTP.png"  
  use_edit_page_button      : true
  use_repository_button     : true
  use_issues_button         : true
  use_multitoc_numbering    : false
  extra_navbar              : ""
  extra_footer: |
  
    <br><img class="CC_licence" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by-nc-sa.svg" alt="Licence CC BY NC SA 2"/> 
     
  home_page_in_navbar       : false
  baseurl                   : "https://deugz.github.io/nb-tools/_build/html/"
  comments:
    hypothesis              : true
    utterances              : 
      repo: "https://github.com/Deugz/nb-tools"
  announcement              : "⚠ Work in Progress  ⚠"

sphinx:
  config:
    language: en
    bibtex_reference_style: author_year
    html_show_copyright: false
  extra_extensions:
  - sphinx_design
  - sphinx.ext.intersphinx

The Build Process#

β€£ HTML #


jb build bookname

../_images/2020-10-jb-tech-stack-jupytercon-12m.png

Fig. 5 Source#

In Depth Explanation

Note

Check the difference between the 2

2 options:

  • html

  • pdf

β€£ PDF #

  • via latex

Sphinx#

Comments#



Notes

Page


  • Author: Vincent Deguin;

  • Status: flag alt > πŸ”Ž

  • Reviewed: ❌

  • Updated: 28/05/2023

flag alt >Help




or


flag alt > Patreon