Skip to content

Updating the Index Pages

Joram Soch edited this page Dec 12, 2025 · 4 revisions

When submitting a proof or definition to "The Book of Statistical Proof" via GitHub, you can optionally also update the index pages of the archive – which consists of two steps.

Step 1: Edit LoC.md

When you have added a proof or definition to your local repository, you may use the sectioning information entered into lines 10-14 of the metadata fields to locate your submission within the List of Contents.

To this end, navigate to the respective position in LoC.md and type

- **[Name of the proof](/P/[shortcut])**

for entering a proof or

- *[Name of the definition](/D/[shortcut])*

for entering a definition.

Step 2: Run update.py

When you have added a proof or definition to your local repository and added this submission to the List of Contents, you can additionally run the Python script update.py. Essentially, this program will do two things:

  1. It will check whether all proof files in the /P/ sub-directory and all definition files in the /D/ sub-directory are manually referenced in LoC.md. If this is not the case, it will throw a warning for each file that is not contained.

  2. It will write all valid proof and definition files into automatically generated index pages:

You should see command-window output similar to the following:

-> StatProofBook Index Generator:
   - 520 files found in proof directory!
   - 226 files found in definition directory!

1a.List of Contents:
   - 520 proofs found in list of contents!
   - 226 definitions found in list of contents!

1b.Table of Contents:
   - generating from list of contents ...
     successfully written to disk!

2a.Proof by Number:
   - successfully written to disk!

2b.Definition by Number:
   - successfully written to disk!

3a.Proof by Topic:
   - successfully written to disk!

3b.Definition by Topic:
   - successfully written to disk!

4a.Proof by Author:
   - successfully written to disk!

4b.Definition by Author:
   - successfully written to disk!

5a.Proofs without Source:
   - successfully written to disk!

5b.Definitions without Source:
   - successfully written to disk!

Once you commit all your changes, these index files will also be updated on the webpage!

Note: Don't worry ...

... if you don't perform both of these steps or any of them. If you choose not to edit the list of contents (Step 1) or run the index page generator (Step 2), this will be taken care of when your submission is merged into the master branch by the administrator (StatProofBook or JoramSoch).

Clone this wiki locally