Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 2.55 KB

README.md

File metadata and controls

39 lines (30 loc) · 2.55 KB

mdBook Source of Physics-Based Simulation

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

  1. Download mdBook binary from https://github.com/rust-lang/mdBook/releases and put it into the root directory of this repository
  2. Install rust, which may take a while. On Mac: brew install rust
  3. Install mdbook-katex plugin via cargo install mdbook-katex
  4. Install mdbook-numeq plugin via cargo install mdbook-numeq
  5. Install mdbook-numthm plugin via cargo install mdbook-numthm
  6. Install mdbook-bib plugin via cargo install mdbook-bib
  7. Add cargo path to PATH via export PATH="/Users/your-user-name/.cargo/bin:$PATH"
  8. Init, build, and view the online book following https://rust-lang.github.io/mdBook/cli/index.html

Windows

  1. Download mdBook binary from https://github.com/rust-lang/mdBook/releases and put mdbook.exe into the root directory of this repository
  2. Install rust using rustup binary installer
  3. Install mdbook-katex plugin following their README's Windows users section. Put mdbook-katex.exe into the root directory of this repository.
  4. Install mdbook-numeq plugin via cargo install mdbook-numeq
  5. Install mdbook-numthm plugin via cargo install mdbook-numthm
  6. Install mdbook-bib plugin via cargo install mdbook-bib
  7. 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