Building Locally

Building Locally#

It is often useful to be able to build locally to preview the lectures as they are written. This page details how to build both the html and the pdf files.

Building HTML#

Workflow#

  1. Activate the quantecon environment using conda:

    conda activate quantecon
    

    Warning

    Your software environment may change how the site is built. It is important to use use the quantecon environment to ensure consistent html output.

  2. Build HTML files locally using jb build command

    jb build lectures
    

    or if you are editing files in the lectures folder you can use

    jb build ./
    
  3. You can preview the HTML by following the instructions displayed by jupyter book and open the index.html file located in your _build/html.

    chrome lectures/_build/html/index.html
    

    or if you are editing in the lectures folder

    chrome _build/html/index.html
    
    open lectures/_build/html/index.html
    

    or if you are editing in the lectures folder

    open _build/html/index.html
    

Building PDF#

Note

Your system will need the xelatex latex build system. This is not provided by jupyter-book and assumes that it is installed.

Workflow#

  1. Activate the quantecon environment using conda:

    conda activate quantecon
    

    Warning

    Your software environment may change how the site is built. It is important to use use the quantecon environment to ensure consistent output.

  2. Build PDF book style pdf locally using the pdflatex builder

    jb build lectures --builder=pdflatex
    
  3. You can open the pdf that is located in your _build/latex folder.

    Open the folder _build/latex in a finder window and then double click on the pdf of the book. This pdf is called quantecon-python.pdf for the Intermediate Python website.

    Open the folder _build/latex in a finder window and then double click on the pdf of the book. This pdf is called quantecon-python.pdf for the Intermediate Python website.

    From the terminal you can use open:

    open lectures/_build/latex/quantecon-python.pdf
    

    or if you are editing in the lectures folder

    open _build/latex/quantecon-python.pdf