
The new Jupyter Book - rntc
https://blog.jupyter.org/announcing-the-new-jupyter-book-cbf7aa8bc72e
======
amrrs
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/](https://bookdown.org/)

The only worry is that now a lot of _data science enthusiasts_ are going to
try to publish their Jupyter Notebooks collection as Kindle books!

~~~
thomascgalvin
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](https://github.com/rust-lang/mdBook)

~~~
miguendes
mdBook is nice indeed but it still lacks a proper way to create PDFs.
`bookdown` has a very smooth way to do that. The only thing I don't like is
that is very R centric in terms of syntax for adding tables, graphs and
whatnot. It's not pure markdown.

For things that will be online only mdBook is great.

I'm currently testing honkit which is a gitbook-cli fork and it seems OK.

~~~
faceplanted
> It's not pure markdown.

Be fair, it's not trying to be and not claiming to either.

------
heisenzombie
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 starts from scratch with Sphinx.

Oh well! Keeps things interesting, I suppose!

~~~
chrisjsewell
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](https://github.com/executablebooks/MyST-Parser) I used the
nbconvert/pandoc approach to create
[https://github.com/chrisjsewell/ipypublish](https://github.com/chrisjsewell/ipypublish)
;-)

~~~
heisenzombie
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, and then expose pandoc AST filters and templates.

I was a bit suspicious of moving away from pandoc to sphinx, because sphinx
seems markedly less powerful and general than pandoc. However, you seem to
think it's the opposite! Does Sphinx have an AST? I can't see any reference?

~~~
fiddlosopher
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.

~~~
chrisjsewell
Now use that to replicate the example pages here: [https://myst-
nb.readthedocs.io/en/latest/examples/basic.html...](https://myst-
nb.readthedocs.io/en/latest/examples/basic.html#markdown) and here
[https://jupyterbook.org/interactive/launchbuttons.html](https://jupyterbook.org/interactive/launchbuttons.html),
and let me know how you get on ;-)

------
ehsankia
It's honestly amazing how far this thing that started as ipython has become.
From expanding into notebooks, to multiple languages, to huge collaborative
web-hosted coding applications. I've been a huge fan of iPython from the very
start and I'm always amazed by seeing this project grow.

------
larrywright
In my job I often have to figure out how to solve a problem involving talking
to an API or manipulating data in some way and then sharing that information
with others. Jupyter notebooks make that so easy, it’s the first tool that I
go to. Being able to mix documentation and code, as well as visualizing
output, aligns perfectly with the way I think.

I’m not entirely sure I have a use for this book feature, at least not yet,
but this is a cool addition.

~~~
analog31
I keep my own notes on how to use obscure API features that I've learned, in
Jupyter.

A colleague of mine, when first introduced to Python and Jupyter, remarked
that Jupyter could be a great platform for writing tests.

~~~
carreau
If you have your own notes feel free to suggest docs updates !

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

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

~~~
stabbles
They had a fun talk at JuliaCon 2020:
[https://www.youtube.com/watch?v=IAF8DjrQSSk](https://www.youtube.com/watch?v=IAF8DjrQSSk)
:)

------
egeozcan
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-
kernels](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels)

~~~
vosper
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/](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.

~~~
nsonha
observablehq is the equivalent of jupyter for nodejs. Before that we have
runkit.

------
grenoire
I was just discussing with my friend (who's currently writing his master's
thesis) about how frustrating integrating Python results with LaTeX papers can
be. In my experience (who wrote his master's thesis last year), it was not
necessarily the worst, but it required me to complete my methodology and
presentation _entirely_ before putting things in LaTeX, because otherwise I
would have to spend ridiculous amounts of time updating values that impact
multiple tables and graphs.

I hope this is _it_. LaTeX won't go away anytime soon, but being able to turn
a notebook into a near-finished thesis/book (in TeX) would be a-mazing.

------
tlrobinson
Call me old-fashioned, but I dislike Jupyter notebooks, or really anything
that I can’t easily use with my editor of choice, diffing tools, etc.

Jupyter should just be an editor and execution engine that operates on plain
text code, using specially formatted comments to delineate cells. If I want to
edit it with vim and execute it using plain old Python I should be able to.

~~~
carreau
Well the nice thing is you can, Notebook is just a file format; but many tools
allow you to select a bunch of text or use comments as delimiter and still
execute using Jupyter. JupyterLab text editor does that by default. ANd I've
seen vim plugins for that.

Notebook document are _meant_ to keep output as they are design for research
and where the records of your results are important, but you also don't have
to use ipynbformat with the notebook UI either.

------
Myrmornis
I'm considering choosing something for a writing project with some diagrams
that I might like to be executable / interactive, so that brought me here. It
might be nice if the Jupyter Book and the Executable Book Project web pages
acknowledged a bit more that there are alternatives out there and discussed
the differences. I'm particularly thinking of Observable -- it looks like
Observable has a good article comparing Jupyter to Observable:
[https://observablehq.com/@observablehq/observable-for-
jupyte...](https://observablehq.com/@observablehq/observable-for-jupyter-
users)

------
tsjq
small nitpick : yikes! Jupyter's blog is on Medium :(

~~~
carreau
Yeah, but unfortunately we haven't found anything that allow easy
collaboration with folks who don't know how to use GitHub, and migrating away
from medium is a paiiin. Though if you have a solution, I would be happy to
push for it on the Jupyter side.

~~~
ChaseT
Unsure if you mean solution for migrating or solution for a good alternative
platform, but Ghost has received a decent amount of praise.
[https://ghost.org/vs/medium/](https://ghost.org/vs/medium/)

~~~
carreau
I've seen ghost, the problem is actually migrating the content, and while
there are services they are too expensives for an OSS project, but thanks.

------
xanth
Couldn't find the answer in the docs so I'll ask here; does this support all
the languages that Jupyter does, or does it require kernel specific hooks to
function? I'm specifically interested in producing some C# docs for for our
internal application framework.

------
robinduckett
Is there a Jupyter alternative that's just for JavaScript? Like Observable but
not Observable.

~~~
protoduction
I built Starboard ([https://starboard.gg](https://starboard.gg)), its
interface is similar to Jupyter, but it runs entirely in the browser (which
has pros and cons)

------
sandGorgon
_" MyST Markdown is a superset of Jupyter Markdown (AKA, CommonMark), "_

Hey Jupyter guys, can you please support asciidoc instead of inventing another
MD format.

~~~
carreau
Sorry only 24h per day. Most of the work is volunteer. If you want ascii doc
you'll need to put some elbow grease.

~~~
sandGorgon
asciidoc is independently maintained
[https://asciidoctor.org/docs/asciidoctor.js/](https://asciidoctor.org/docs/asciidoctor.js/)

you will save the effort needed to maintain a new format.

~~~
carreau
Sure, great ! Do you also have a Python binding for nbconvert ? There are
about a dozen places where we render and sanitize markdown can you go add
hooks for asciidoc as well ? There also need to be an option for user to
select the formatting they want, and likely store that in the notebook format
; I guess it will take you only a couple of hours to patch it and translate.
The docs will need fixing as well.

Once you've done it for notebook, can you do it for Lab, VS Code, Nteract,
Cocal, Colaboratory ? Thanks.

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

~~~
heisenzombie
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)

~~~
chrisjsewell
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](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"

~~~
levesque
I mean even for a single notebook the display looks pretty nice. Might
consider using for single notebook books just to avoid dealing with the hassle
of themes and jupyter extensions.

------
electriclove
Anyone have a quick tldr on the differences between Jupyter Lab, Jupyter Book,
and Jupyter Notebooks?

~~~
carreau
Jupyter Notebook = view notebook as a single page – or depending on context,
the document format `.ipynb`. Lab allow you to have panels like an IDE;
Jupyter Book is to publish a collection of .ipynb file as a website.

