Skip to content
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

Merged
merged 12 commits into from
May 7, 2017
Merged

Conversation

ketch
Copy link
Member

@ketch ketch commented Apr 24, 2017

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.

For convenience, a copy of the pdf is attached to this message.

riemann.pdf

ketch added 2 commits April 24, 2017 15:34
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.
@rjleveque
Copy link
Member

The pdf looks great, thanks for getting this going!

I'll add a few comments later and try out the scripts...

ketch added 4 commits April 24, 2017 16:28
* 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.
@ketch
Copy link
Member Author

ketch commented Apr 24, 2017

I added more chapters. If you're experimenting with changing the formatting of the book, it's probably convenient to edit make_chapters.py to include just 1 chapter so that it compiles more quickly.

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).

ketch added 5 commits April 25, 2017 11:00
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.
@rjleveque
Copy link
Member

I suggest closing this in favor of #71.

Also update gitignore.
@ketch
Copy link
Member Author

ketch commented May 7, 2017

Could we just merge this and then merge #71? Then there will be a less massive set of changes to review there.

@ketch ketch changed the title [WIP] Initial effort at compiling book. Initial effort at compiling book. May 7, 2017
@ketch
Copy link
Member Author

ketch commented May 7, 2017

And yes, I'd like to go ahead and merge this.

@rjleveque rjleveque merged commit 2ab7417 into clawpack:master May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants