-
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
Merged two PRs and added make_html.py #71
Conversation
…tripes. Illustrated in Euler_equations.ipynb where density is colored red to left and blue to right of contact discontinuity.
Also add snapshot_widget option to Traffic_flow.ipynb
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.
* 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.
…amples. Added new function to utils/riemann_tools.py to make simple demo plots and improved setting of x_traj points so stripes are equal width near origin
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.
* master: (23 commits) 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 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. 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 ...
…nges * bookform: rjleveque version for debugging bookbook Apply SIAM book formatting to pdf. 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. Add Preface and fix some issues with bookbook. Improved presentation in Shallow_water.ipynb. Use t=0.2 instead of t=0 for static widget output. Run pdflatex one more time for citations. Remove stray comma from merge. Add 5 more chapters to book. Use report template and update script name. Initial effort at compiling book.
Could we merge #69 and then review this for merging? |
I notice that the stripe plots in the HTML use rasterized images. What's the rationale for going that route? |
I merged #69 and then did a test merge of this branch and it seems to merge without any conflicts. But @ketch should try it out and then merge if all seems ok. Github seems to be flagging mostly a bunch of conflicting metadata changes that merge fine, but maybe because I have nbdime installed? We might have to merge locally and push back to Github rather than using the Merge button? |
@ketch: No good reason for using rasterized images but I'm not sure where
that's being done. If you know how to fix it, please go ahead.
…On Sun, May 7, 2017 at 2:13 AM, David Ketcheson ***@***.***> wrote:
I notice that the stripe plots in the HTML use rasterized images. What's
the rationale for going that route?
|
@ketch: I tried changing from So it doesn't seem easy to make JSAnimations out of vector graphics files, but if you know a way please let me know. Otherwise I will go ahead and merge this in the next day or two so that we can move forward with submitting the proposal. |
To make JSAnimations without rasterizing, I use the images from memory rather than writing them to disk. I did this for instance in the Shallow_tracer notebook; here's an executed version with the animation working: http://nbviewer.jupyter.org/gist/ketch/aa3c953fb06d95cfb2624b5110c0a7ff |
I have a vector-image based HTML-functional animation working and will push something soon (to #73). |
Euler_equations_TammannEOS.ipynb
Outdated
@@ -340,7 +335,23 @@ | |||
"cell_type": "code", | |||
"execution_count": null, | |||
"metadata": { | |||
"collapsed": false | |||
"collapsed": false, | |||
"nbdime-conflicts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like some nbdime merge conflict stuff got included in this commit.
Okay, I closed #73 and I'm just looking over this PR (#71). It seems indeed that somewhere there was a merged that messed things up. For instance, if you look at the first Traffic notebook: you'll see that the velocity figure is duplicated, all the imports are duplicated, and a bunch of changes I made have been reverted. It's going to be very difficult to build on this and try to make sure that we didn't lose any of our previous work. I think that the best path forward is to abandon this PR and put the relevant changes from it into one or more new PRs based off the current master. I'm sorry for being a bit unresponsive and slow to review/merge PRs. I can definitely be more proactive about this now. |
Sorry, I must have messed things up when merging |
This was replaced by #74. |
I merged the PRs #68 and #69 into this one since they were starting to diverge and I wanted to test various changes from each of them together. I suggest we close both of those if @ketch and @maojrs are happy with this one, and then merge this in and move on from there with new PRs.
I added a
make_html.py
to create html files from all the notebooks and put them in a separate directoryriemann_book_files
that can be moved to a website, such as: http://faculty.washington.edu/rjl/riemann_book/Index.htmlThis is far from perfect since much of the rendering is not working properly. See for example the Tammann notebook, which shows many of the problems:
On the other hand the Introduction looks pretty good except for the equation numbers.