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

Add PDF rendering #577

Open
yuvipanda opened this issue Feb 22, 2016 · 8 comments
Open

Add PDF rendering #577

yuvipanda opened this issue Feb 22, 2016 · 8 comments
Labels
tag:Format Related to input / output formats type:Enhancement A proposed extension to the behavior of the project

Comments

@yuvipanda
Copy link
Contributor

Would be quite cool, but also possibly more taxing on resources (at least for the public viewer).

Maybe could add it, and disable it for the public nbviewer (or just enable it, and disable it if it takes up too much resources?)

@Carreau
Copy link
Member

Carreau commented Feb 22, 2016

Yeah, latex rendering is extremely resource intensive. I think this is more "nbconvert as a remote API" than actually for the nbviewer itself.

@yuvipanda
Copy link
Contributor Author

I agree, but considering how hard latex can be to setup locally for several people, I do think it is a worthwhile thing to do.

@bollwyvl
Copy link
Contributor

Yeah, the other somewhat promising approach (pdf via headless webkit) is
also quite taxing... still digging into it here:
https://github.com/Anaconda-Server/nbbrowserpdf

Fonts are kind of an issue, still working through.

This is germane to one theme of
jupyter/notebook#1123, namely really enhancing
the fixed-page chops of the notebook, potentially with adopting
ProseMirror/Draftjs.

perhaps we make it distributed? nbviewer@home? the search for archival,
reproducible science!

Actually, that's less crazy than it sounds... torrents are a beautiful
model for robust information dissemination. but still doesn't solve it all.
I wonder how the readthedocs guys do it...

On Mon, Feb 22, 2016 at 2:10 PM Yuvi Panda notifications@github.com wrote:

I agree, but considering how hard latex can be to setup locally for
several people, I do think it is a worthwhile thing to do.


Reply to this email directly or view it on GitHub
#577 (comment).

@yuvipanda
Copy link
Contributor Author

@bollwyvl ah, I've been thinking that IPFS (IPFS.io) and notebooks are a great fit :D

@bollwyvl
Copy link
Contributor

Notebooks in spaaaaace!

We're working on an extension for uploading to anaconda.org, but have already discussed renaming it to nb_publish and offering github/gist/s3 uploading... or at least the UI/API hooks!

I think some kind of DHT (or whatever the IPFS merkledag is) publish would be dominate each of those for every aspect save, perhaps apparent security... because torrents are scary 👻 But throw some encryption at it, and it'll be better than putting it in the cloud. More like the Oort cloud.

One could choose to include any of the following:

  • just the notebooks (Index.ipynb)
  • the rendered output (index.html)
  • an environment (environment.yml) (or put that in the notebook)
  • a whole executable environment (docker-compose.yml +/- Dockerfile) (or again, in the notebook)
  • all your data sets (index.hdf5) (definitely by itself... but could just be a light reference to an appropriate kernel-level api)
  • a whole docker image or vm (same)

I don't think nbviewer would get involved in this particular game... but it wouldn't have to :) i imagine a binary (or conda-based) distribution of ipfs would be pretty trivial for most users to adopt that were willing to accept the peer-to-peer model.

then it's just a touch of UI:

  • Hit publish
  • Verify locally (automate)
  • Verify it in the swarm (automate)
  • Hand your link off to your collaborators
  • Be done with it
    • Maybe it lives, but if you ever reconnect to the swarm, it can be restored

For humor, here's a sort of self-IPFS-quining notebook using nbpresent:
https://ipfs.io/ipfs/QmXNmc7L2pnqGo2Y4fFVMdYZkCaCrbfhX1Zj4kNr5hB3eh
(there's a little information theoretical problem built in, but it's close enough)

I've killed my daemon and removed all my creds, and it still appears to be loading, so I'll be interested to see how it lives on.

Fantastic stuff!

@yuvipanda
Copy link
Contributor Author

@bollwyvl :D <3 YES! We should move that conversation off this ticket to somewhere else tho.

@Carreau
Copy link
Member

Carreau commented Feb 26, 2016

ipynbfs ?

@mgeier
Copy link

mgeier commented Apr 23, 2016

@yuvipanda As an alternative to nbviewer, you might want to consider creating PDFs on readthedocs.org. You can use nbsphinx to compile one notebook or several notebooks to PDF via Sphinx. The nice thing is that this can be done automatically on readthedocs.org. You can even execute your notebooks on the server (I think there is a 15-minute maximum runtime, though).

Here's an example for a PDF file created on readthedocs.org: https://media.readthedocs.org/pdf/nbsphinx/latest/nbsphinx.pdf

Note, however, that there is currently a problem: readthedocs/readthedocs.org#2127 (UPDATE: the problem is solved by upgrading to Sphinx >= 1.4).

@parente parente added type:Enhancement A proposed extension to the behavior of the project tag:Format Related to input / output formats labels Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:Format Related to input / output formats type:Enhancement A proposed extension to the behavior of the project
Projects
None yet
Development

No branches or pull requests

5 participants