-
Notifications
You must be signed in to change notification settings - Fork 99
Home
A mini-wiki to add helpful links and comments for the Riemann book.
-
Can we convert new jupyter notebooks to be able to open them in the old ipython notebook?
Yes -- see http://ipython.org/ipython-doc/3/notebook/nbconvert.html,
ipython nbconvert --to notebook --nbformat 3 mynotebook
-
Will mpld3 remain in future Jupyter notebook releases?
-
http://stackoverflow.com/questions/18823779/ipython-notebook-and-mathjax-labeled-equations
-
Min: Enabling equation numbers is easy with one big caveat: MathJax numbers equations as they render, which means you get weird out-of-order numbers when you are editing equations in the live notebook, unless you reset the index and re-render all markdown every time you edit a single equation. Numbering works fine in a static export, such as on nbviewer. There’s even a PR currently under discussion that would enable it on nbviewer by default.
-
To enable, use this function in the notebook...
from IPython.display import display, Javascript def enable_equation_numbers(): display(Javascript(""" MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS", useLabelIds: true } }, })""")) enable_equation_numbers()
Then in a markdown cell:
\begin{equation} x = 5 \end{equation}
For what we are actually using, see https://github.com/clawpack/riemann_book/wiki/Citations
Older notes:
-
See this link: http://nbviewer.ipython.org/github/HHammond/nbconvert-examples/blob/master/citations/Tutorial.ipynb
-
Cross referencing? Citations between different jpy notebooks.
Fernando: They work as regular markdown links reference text. You can add anchors with standard html syntax, for example to refer to a heading:
### <a name="tith"></a>This is the Heading
then you can link to it as
[interesting](foo.ipynb#tith)
.David: actually, markdown headings are automatically anchors. Just click on the paragraph symbol to get the anchor reference.
We are now using bookbook. See the make_pdf.py
script and riemann.tplx
.
Older notes:
-
Regarding CSS, Min's comment: The HTML and CSS of the notebook display is similarly not a stable or public API. Changing some fonts and colors is reasonably straightforward, but more subtle adjustments of layout or inner items is likely to break, especially as we are planning to completely rewrite how our layout is done with phosphor.
-
To export to pdf for printing as a book? Fernando's suggestions:
-
Export to LaTeX with custom templates and do the heavy-duty customization in LaTeX.
-
See Hans Petter's DocOnce: https://github.com/hplgit/doconce, http://hplgit.github.io/doconce/doc/web/index.html.
-
- Check out the FA16 or master branch and run the script
make_html.py
after editing to indicate the desired set of notebooks. This createsbuild_html
containing the html files. - To post on the webpage, check out the
gh-pages
branch, copy the files frombuild_html
tohtml
directory, commit, and push. They show up at http://www.clawpack.org/riemann_book/.
Interactive javascript GUI's for exploring the phase place are shown on this page and in Acoustics.ipynb, for example.
The code that generates these can be found at http://nbviewer.ipython.org/github/maojrs/ipynotebooks/blob/master/PPlane_GUI.ipynb
- http://nbviewer.ipython.org/github/ketch/teaching-numerics-with-notebooks/blob/master/Styling_notebooks.ipynb
- https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
- https://github.com/nsonnad/base16-ipython-notebook