Skip to content

Updating the Index Pages

Joram Soch edited this page Aug 26, 2020 · 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 Table_of_Contents.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 Table of Contents.

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

X.Y.Z. **[Name of the theorem](/P/[shortcut])** <br>

for entering a proof or

X.Y.Z. *[Name of the definition](/D/[shortcut])* <br>

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 Table 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 Table_of_Contents.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:
   - 156 files found in proof directory!
   - 92 files found in definition directory!
1. "Table_of_Contents.md":
   - 156 proofs found in table of contents!
   - 92 definitions found in table of contents!

2a."Proof_by_Number.md":
   - successfully written to disk!
2b."Definition_by_Number.md":
   - successfully written to disk!

3a."Proof_by_Topic.md":
   - successfully written to disk!
3b."Definition_by_Topic.md":
   - successfully written to disk!

4a."Proof_by_Author.md":
   - successfully written to disk!
4b."Definition_by_Author.md":
   - successfully written to disk!

5a."Proofs_without_Source.md":
   - successfully written to disk!
5b."Definitions_without_Source.md":
   - 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 table 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