Jupyter Book#
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
- Jupyter meet the earth
- To explore and extract information (figures β¦)
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
In Depth Explanation
Note
Check the difference between the 2
2 options:
html
pdf
Implement the one I use
β£ PDF #
- via latex