Notebook printing broken #1339

Closed
fperez opened this Issue Jan 29, 2012 · 6 comments

Comments

Projects
None yet
3 participants
Owner

fperez commented Jan 29, 2012

The print view in the notebook is currently completely broken. As Mark Voorhies pointed out on the list, during the Wijmo menu reorganization it was lost. We should try to restore it asap, b/c I know many people do use printing to generate static pdfs.

Owner

ellisonbg commented Jan 29, 2012

Can you clarify what is broken about it. It was broken, but I spent a good while completely redoing it. I just tested it on a simple page and it worked fine.

Owner

fperez commented Jan 29, 2012

I just double-checked by refreshing, and I'm still seeing the problem; confirmed both in FF and chrome. The print view only shows me one empty cell, no matter what the notebook has. The type of the cell shown is correct (markdown or code) but I only see one cell, and it has no content.

This is on current master, confirmed both with existing notebooks and a newly created one.

Contributor

markvoorhies commented Jan 29, 2012

For commit 93bb469 on Ubuntu 10.04 w/ Firefox 9.01/NoScript (with scripts allowed for localhost and mathjax):
Start kernel with: ipython notebook
Click "new notebook" on dashboard
In new notebook: print "Hello world"
Choose "print view" from notebook menu
--> print view opens in new tab as notebook with one empty cell and no menu bar.

Owner

ellisonbg commented Feb 1, 2012

Fixed in #1361

Contributor

markvoorhies commented Feb 1, 2012

Tested commit 648d2de from #1361 with Firefox 9 on a notebook that prints correctly from the last stable print view version (commit a50ac36). Print view works again =), and "save as web page complete" and "print to pdf" from Firefox both work.

Minor issues :

  • Less-than and greater-than symbols are being double escaped (e.g., to &lt; instead of <) (c.f. markdown source for what I mean)
  • Code cells still have cursors and can be edited/run (I think this is intentional)

So, printing is totally usable as of this commit. Thanks!

Owner

fperez commented Feb 2, 2012

Confirming it appears fixed by #1361, thanks! The print view does remain editable which at some point I think it wasn't, but you've mentioned there was some refactoring needed re. the read-only use, so we can revisit that point later if it works best that way.

I think having the print view be read-only is a valid enhancement request, but not really a bug, so as far as I'm concerned this is fixed.

@fperez fperez closed this in 54c3e06 Feb 2, 2012

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Merge pull request #1361 from ellisonbg/nbissues
A number of bug fixes for notebook issues that had crept up recently with all the major improvements done on multiple fronts.

In closing #1359, we've changed slightly how Math() works: it now unconditionally surrounds its input with $$...$$, so that it always appears in displayed math mode.  We have also introduced a new display object, Latex(), which does *not* add any latex markup, for other constructs beyond simple math expressions.  This change makes Math() friendlier to use in simple cases and means that Math(sympy.latex(foo)) will produce the expected displayed math results without the user having to add any $ markup.

Summary of Fixes:

Fixes #1344: Ctrl + M + L does not toggle line numbering in htmlnotebook.

Fixes #1337: Tab in the notebook after `(` should not indent, only give a tooltip.

Fixes #1339: Notebook printing broken.

Fixes #1348: `Ctrl-m-Ctrl-m` does not switch to markdown cell

Fixes #1359: [sympyprinting] MathJax can't render \root{m}{n}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment