How to create and build your report

Create new environment for generating report

conda create --name report python=3.9
conda activate report

Install jupyter-book

pip install jupyter-book

Create your report from example report

Open a JupyterLab Terminal, make sure you change directory to forces-2021:

cp -R content/learning/example-report/eScienceCourse_2021_AnneFouilloux final_reports/eScienceCourse_2021_FirstnameLastname

Make sure to replace FirstnameLastname. The command above will create a new folder called eScienceCourse_2021_FirstnameLastname.

Customize your report

  • Edit _config.yml to customize:

title                       : My Final Report  # The title of the book. Will be placed in the left navbar.
author                      : Anne Fouilloux  # The author of the book
copyright                   : "2021"  # Copyright year to be placed in the footer
logo                        : logo.png  # A path to the book logo
  • The logo only appears when not using fullscreen mode.

Build your report as HTML

  • A new draft has been created and you can already generate your report

  • Remember to build your report everytime you change anything in your report folder (here eScienceCourse_2021_AnneFouilloux).

jupyter-book build eScienceCourse_2021_AnneFouilloux/ --builder singlehtml

Build PDF report

In a JupyterLab terminal install texlive:

apt-get update -y 

Then:

apt-get install -y  texlive-latex-recommended texlive-latex-extra \
                     texlive-fonts-recommended texlive-fonts-extra \
                     texlive-xetex latexmk

You have all the packages required to generate your pdf:

jupyter-book build eScienceCourse_2021_AnneFouilloux/ --builder pdflatex

Your pdf is in eScienceCourse_2021_AnneFouilloux/_build/latex/report.pdf.

Push your changes to github

  • don’t forget to upload your report to Github.

More customizations