-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial effort at compiling book. #69
Conversation
To compile the book, you’ll need to update to the latest pandoc (1.19.2) from https://github.com/jgm/pandoc/releases/tag/1.19.2.1 and install takluyver’s bookbook (with pip). I think you also need to have Clawpack installed for Python 3. Once you have all that, run the shell script: ./make_book.sh The script generates a bunch of new notebook files with numbers in front of them, and those are used to compile the book. You can remove the extra notebooks afterward by doing rm 0?-*.ipynb The set of notebooks to be included, and their order, is determined by the list at the beginning of `make_chapters.py`. For the moment I’ve just included three sample chapters. Cells can be omitted (hidden) in the book output. For instance, the cells with import statements have been hidden. To set a cell to be hidden, open the notebook and select view -> cell toolbar -> tags. Then add the tag ‘hide’ to the desired cell(s). To use the static versions of the widgets, I’m just doing a search and replace. This means that the following code should appear by itself on some line of the notebook: from ipywidgets import interact bookbook expects that each notebook begins with a Markdown cell containing a level-1 header, which will be the chapter title. I removed the messages printed by snapshot_widgets because they are a bit of a nuisance in the book.
The pdf looks great, thanks for getting this going! I'll add a few comments later and try out the scripts... |
* master: Fix a couple more typos. Fix a typo. Don't show delta shocks when t=0. Add exercise regarding low Froude number limit. Add references and notes on large Froude number limit in pressureless flow chapter.
I added more chapters. If you're experimenting with changing the formatting of the book, it's probably convenient to edit Here's a PDF with 8 chapters and about 100 pages: riemann.pdf This is not all the chapters we have drafted, but I think it includes all the ones that are in reasonably polished shape (and some that perhaps are not). |
Cross references are now properly converted from markdown to latex.
* master: Updated nbstripout to remove metadata Merged pull request Editorial changes to Tammann notebook. Added characterisitics Added section in negative pressure Minor changes to examples Put repeated code into a function. Update Docker.md Update Docker.md Minor update to TammannNB Forgot to nbstrip on previous commit Added examples to Euler Tammann NB Updated Tammann book revert dirty notebooks commited by accident Add clawpack to Dockerfile and instructions for pulling from riemann@master Added Dockerfile and Docker.md Added very small versions of the phase plane interactive apps Added interactive pplane html apps
Include preface in pdf. Use \small for code in pdf. Use SVG backend so that graphics are in vector format. Adjust figure and font sizes to work with SVG backend. Plot Riemann solution and phase plane together for nonlinear elasticity. Fix numerous minor issues in notebooks.
I suggest closing this in favor of #71. |
Also update gitignore.
Could we just merge this and then merge #71? Then there will be a less massive set of changes to review there. |
And yes, I'd like to go ahead and merge this. |
To compile the book, you’ll need to update to the latest pandoc (1.19.2) from
https://github.com/jgm/pandoc/releases/tag/1.19.2.1 and install takluyver’s
bookbook (with pip). I think you also need to have Clawpack installed for
Python 3.
Once you have all that, run the shell script:
The script generates a bunch of new notebook files with numbers in front of
them, and those are used to compile the book. You can remove the extra
notebooks afterward by doing
The set of notebooks to be included, and their order, is determined by the list
at the beginning of
make_chapters.py
. For the moment I’ve just includedthree sample chapters.
Cells can be omitted (hidden) in the book output. For instance, the cells with
import statements have been hidden. To set a cell to be hidden, open the
notebook and select view -> cell toolbar -> tags. Then add the tag ‘hide’ to
the desired cell(s).
To use the static versions of the widgets, I’m just doing a search and replace.
This means that the following code should appear by itself on some line of the
notebook:
bookbook expects that each notebook begins with a Markdown cell containing a
level-1 header, which will be the chapter title.
I removed the messages printed by snapshot_widgets because they are a bit of a
nuisance in the book.
For convenience, a copy of the pdf is attached to this message.
riemann.pdf