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 and CUDA 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
- Install rust, which may take a while, via
brew install rust - Install mdbook via
cargo install mdbook --version 0.4.52 --force - Install mdbook-katex plugin via
cargo install mdbook-katex --version 0.9.4 --force - Install mdbook-numeq plugin via
cargo install mdbook-numeq --version 0.4.0 --force - Install mdbook-numthm plugin via
cargo install mdbook-numthm --version 0.2.0 --force - Install mdbook-bib plugin via
cargo install mdbook-bib --version 0.0.6 --force - 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
- Install Rust with rustup from https://www.rust-lang.org/tools/install. On Windows, rustup installs tools into
%USERPROFILE%\.cargo\bin, which is also wherecargo installputs binaries. - Open a new PowerShell or cmd window so the updated PATH takes effect.
- Install mdBook via
cargo install mdbook --version 0.4.52 --force - Install mdbook-katex v0.9.4 by downloading the Windows release binary (
x86_64-pc-windows-gnu.zip) from the mdbook-katex Releases page, then putmdbook-katex.exein a directory on your PATH. A simple choice is%USERPROFILE%\.cargo\bin. - Install mdbook-numeq via
cargo install mdbook-numeq --version 0.4.0 --force - Install mdbook-numthm via
cargo install mdbook-numthm --version 0.2.0 --force - Install mdbook-bib via
cargo install mdbook-bib --version 0.0.6 --force - Init, build, and view the online book following https://rust-lang.github.io/mdBook/cli/index.html.
More useful tools for enhancing the book: https://github.com/rust-lang/mdBook/wiki