GithubHelp home page GithubHelp logo

v1ta111 / chapters Goto Github PK

View Code? Open in Web Editor NEW

This project forked from probmods/chapters

0.0 0.0 0.0 4.61 MB

The online textbook Probabilistic Models of Cognition

Home Page: https://probmods.org

JavaScript 94.66% Python 0.35% CSS 2.24% TeX 1.92% Makefile 0.82%

chapters's Introduction

About

Source code for the online book, Probabilistic Models of Cognition.

Source files

Chapters are written in Pandoc-extended Markdown and should have a .md extension. There are three kinds of chapter files:

  • Index. An introduction to the book and a list of all public chapters. Lives in index.md.

  • Public. The main content of the book. The order of chapters is declared inside chapters.txt in the following format:

    generative-models
    conditioning
    patterns-of-inference
    

    (i.e., one filename per line, omit the .md portion)

  • Private. Used for the play space (play-space.md) and any other pages that needn't be in the main content of the book.

I highly recommend reading through the Pandoc Markdown documentation before editing the chapter files. generative-models.md offers a good example of the syntax. One convention is worth mentioning. We use the "fenced" code-block syntax, e.g.,

~~~~ {data-engine="bher" data-exercise="simple-flip"}
(flip (0.5))
~~~~

Within the curly braces, data-engine="bher" specifies that this code block will be run through the bher inference engine (the current choices are webchurch, bher, mit-church, and cosh). This engine property will be injected as a CSS class in the compiled HTML. The data-exercise property indicates the name of the exercise; this is used to organize records in the database of student-run programs. data-exercise is an optional property (in this case, the database won't store runs for this exercise), but if it is declared, it must be unique within the chapter file.

The look and feel of the book is controlled by three files: chapter.template, index.template, and style.css.

Compiling

Use the command:

make all

If you want to compile just some subset of files, you can do:

make generative-models.html conditioning.html mixture-models.html

Some other commands:

  • make clean: Remove all compiled and intermediate files.
  • make rebuild: Do make clean and then make all.
  • make public: Compile only the public chapters.
  • make private: Compile only the private chapters.

Read the Makefile for details

Dependencies

  • Bash
  • Pandoc 1.11.1+
  • Python 2.7+
  • GNU make
  • GNU sed (if you're on OS X, you likely don't have this; try port install gsed)
  • Browserify

Development Notes

TODO

  • Add some directory structure to separate input (Markdown + assets [e.g., images]) from output.

build times (seconds)

single threaded: 10.8, 10.7 -j: 6.8, 6.9

chapters's People

Contributors

longouyang avatar ngoodman avatar feste avatar stuhlmueller avatar juliusc avatar apw avatar undefdev avatar bmabey avatar mhtess avatar qhfgva avatar isnit0 avatar markusq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.