Live data from Hacker News

The new Jupyter Book

blog.jupyter.org

21–30 of 69 posts

Re: The new Jupyter Book

#21

When do I use Jupyter Notebook and when do I use Jupyter Book? Do I need both? Which is more LaTeX friendly?

As I understand it, Jupyter Book takes one or more Jupyter Notebooks and converts them into a static "book" output (looks like it primarily targets HTML output but with LaTex/PDF possible)

Re: The new Jupyter Book

#22
post #4

I wish that the notebooks supported Typescript or C# or something I'm more familiar with, out of the box. For C# I have LinqPad, which I'm a huge fan of but never discovered something with similar functionality for typescript. I've seen some open source kernels[0] but I'm not sure about the quality, did anyone try them? Deno core in Jupyter would have been amazing. [0]: https://github.com/jupyter/jupyter/wiki/Jupyter…

For JS and Typescript there’s Quokka, which I haven’t tried and doesn’t really seem to be in the style of a notebook, but might be helpful? https://quokkajs.com/

There is actually a JS adaptor/extension for Jupyter but I found it pretty clunky to use, and since I’m equally comfortable with Python as JS, I just stuck with Python.

For Typescript Stackblitz might be interesting, but it’s not like a notebook, and it’s not a run-locally tool.

Re: The new Jupyter Book

#23

Earlier quoted context omitted.

nbconvert/pandoc is very limited in how it can be extended because it only relies on jinja templating rather than a proper AST. You couldn't achieve a lot of the things that sphinx/jupyter book can now do with that. Trust me I know because, before starting work on https://github.com/executablebooks/MyST-Parser I used the nbconvert/pandoc approach to create https://github.com/chrisjsewell/ipypublish ;-)

This is interesting, so do you think the JupyterBook solution could/should replace nbconvert? I was always a bit frustrated by the way nbconvert pulled in pandoc as a dependency, but then didn't make use of any of its power (pandoc surely has a powerful AST). Instead they re-implemented filters and templates themselves. It struck me that it would have been much cleaner to write a proper 'ipynb > AST' Pandoc reader, a…

pandocs AST is actually a little limited, in terms of extensability, because it has to resove to JSON. The scorreia.com/software/panflute/code.html is a good python API for it.

By contrast sphinx uses docutils AST: https://github.com/live-clones/docutils/blob/master/docutils..., the documentation is not great (working on that) but it is pretty powerful.

Re: The new Jupyter Book

#24

When do I use Jupyter Notebook and when do I use Jupyter Book? Do I need both? Which is more LaTeX friendly?

As I understand it, Jupyter Book takes one or more Jupyter Notebooks and converts them into a static "book" output (looks like it primarily targets HTML output but with LaTex/PDF possible)

Yes that's about right :) The book can contain a mixture if Notebooks and normal markdown files, and also text representations of notebook files (see https://jupyterbook.org/content-types/myst-notebooks.html) The initial focus has been HTML, but now there is work ongoing to create a nice LaTeX/PDF "theme"

Re: The new Jupyter Book

#26

I love the Jupyter ecosystem but it's frustratingly messy sometimes. There's already "nbconvert" built in to Jupyter (lab), built on Pandoc. It's extremely under-documented but it's possible to extend it with templates to generate arbitrary outputs. I've done this to directly generate branded PDF reports via latex. Jupyter Book has a lot of overlap with this feature, but rather than building on nbconvert/pandoc, it s…

The JupyterLab extension system is the biggest offender imo.

"Oh, I need to install the python package and the jupyter extension separately? And there are no breadcrumbs if I install one but not the other? And I have to figure out which versions are mutually compatible with each other and jupyterlab because 'everything latest' sure isn't? And I have to install extensions to get features that used to be built-in? And then I have to explain the install procedure to the person I'm trying to share with, twice, because he didn't believe me the first time? UGGGGGGGHHHHHHHH"

Re: The new Jupyter Book

#27

Earlier quoted context omitted.

nbconvert/pandoc is very limited in how it can be extended because it only relies on jinja templating rather than a proper AST. You couldn't achieve a lot of the things that sphinx/jupyter book can now do with that. Trust me I know because, before starting work on https://github.com/executablebooks/MyST-Parser I used the nbconvert/pandoc approach to create https://github.com/chrisjsewell/ipypublish ;-)

This is interesting, so do you think the JupyterBook solution could/should replace nbconvert? I was always a bit frustrated by the way nbconvert pulled in pandoc as a dependency, but then didn't make use of any of its power (pandoc surely has a powerful AST). Instead they re-implemented filters and templates themselves. It struck me that it would have been much cleaner to write a proper 'ipynb > AST' Pandoc reader, a…

In fact, pandoc now does have an ipynb reader and writer. You can convert between ipynb and any of the formats pandoc supports, and you can manipulate the AST using filters.

Re: The new Jupyter Book

#28
post #10

I don't think there's a better stack in all of scientific computing than Julia + Jupyter Books. Lovin' it.

Julia + Pluto will probably give it a run for the money.

Super neat! It’s like a mash up of Excel and Jupyter, using something that looks similar to functional reactive programming

Re: The new Jupyter Book

#30
post #2

This is a really good move. A lot of people have been offering Jupyter Notebooks along with their Books. This should bring down the effort in getting the book out. An important note though, R world has for something called 'bookdown' for quite sometime and many R developers have used it to write books. https://bookdown.org/ The only worry is that now a lot of data science enthusiasts are going to try to publish their…

I'm personally a huge fan of `mdbook`, which seems to be the Rust equivalent of R's `bookdown`. I've switched out internal documentation over to it from `gitbook`. https://github.com/rust-lang/mdBook

+1 for mdBook, easy to install (as compared to say honkit [0], a gitbook fork, that requires npm). I've recently started using it to generate web version of my ebooks.

[0] https://github.com/honkit/honkit

Post reply on HN