This online book is developed based on mdBook. The book is fully open-sourced, and we welcome your contributions!
md files of each chapter of the book is in src/
.
Python implementations of certain topics are included as submodules and discussed in the book. Thus, to clone the source with submodules:
git clone --recurse-submodules https://github.com/phys-sim-book/mdbook-src.git
To update submodules:
git submodule update --init --recursive
To generate the online book from the md files:
MacOS
- Download mdBook binary from https://github.com/rust-lang/mdBook/releases and put it into the root directory of this repository
- Install rust, which may take a while. On Mac:
brew install rust
- Install mdbook-katex plugin via
cargo install mdbook-katex
- Install mdbook-numeq plugin via
cargo install mdbook-numeq
- Install mdbook-numthm plugin via
cargo install mdbook-numthm
- Install mdbook-bib plugin via
cargo install mdbook-bib
- Add cargo path to PATH via
export PATH="/Users/your-user-name/.cargo/bin:$PATH"
- Init, build, and view the online book following https://rust-lang.github.io/mdBook/cli/index.html
Windows
- Download mdBook binary from https://github.com/rust-lang/mdBook/releases and put
mdbook.exe
into the root directory of this repository - Install rust using rustup binary installer
- Install mdbook-katex plugin following their README's Windows users section. Put
mdbook-katex.exe
into the root directory of this repository. - Install mdbook-numeq plugin via
cargo install mdbook-numeq
- Install mdbook-numthm plugin via
cargo install mdbook-numthm
- Install mdbook-bib plugin via
cargo install mdbook-bib
- Init, build, and view the online book following https://rust-lang.github.io/mdBook/cli/index.html. For example, you can simply do in a windows cmd:
mdbook.exe serve --open
More useful tools for enhancing the book: https://github.com/rust-lang/mdBook/wiki