Add a publish button that takes the current "notebook" div and embeds it inside a clean page, ready for printing or saving.
Implement static publishing of HTML notebook.
I won't do the merge because I think @ellisonbg should have a look at it (as well as @minrk) in case you disagree with any of the JS decisions. But I think the functionality is perfect and we should merge this in now before we merge the whole #705, so that when the NB lands it's pretty much fully operational.
One slight tweak I'll make later this evening: not to display the current cell highlight.
htmlnotebook: Suppress cell boundary when publishing.
The save widget should only contain logic and HTML tags related to saving the notebook. There are two options:
I have been trying to keep the header area clear of most things so my initial though is to do 1, but I am open to 2. What do others think?
Also, this capability should be called "Print" as we plan on having "Publish" be something that is richer (with a static URL) and includes a notion of sharing. This is more of a lightweight on the fly printing capability.
:) Actually Stefan had called it print, and I suggested 'publish' after our conversation the other night. But he's actually also started to play with gist upload functionality, so you're right that we should keep the 'publish' name for something else.
However, I don't think that 'print' is the right name, because what this gives is a static html version, that can both be saved to disk or printed. So I wonder if 'View HTML' wouldn't be a better name... Thoughts?
Yes, but just because gmail does it doesn't mean it's right :) Further, in that case they do pop up the print dialog directly, which makes more sense. But I don't want ours to pop up a print dialog automatically, as in many cases you may want this for reasons other than actual printing. So I think we should state what the button does: it gives a static view of the notebook...
Obviously the downside is that people looking to print may do the wrong thing and try to print the active version...
How about calling it 'Print/HTML'? And not popping the print dialog automatically. Then it's clear that's the way to print, but also to get a static html view...
One slight issue I found when testing with the quantum_computing example:
Some math output gets center-aligned. I think I recall there being a tweak to force left alignment somewhere in the notebook.
What about "Print Preview"?
@minrk: Hmm, I don't see any center justified math. Can you give more information or sent me a screen shot?
Note that it's fine in the notebook itself, but multiline equations are centered in the print output:
<img src="http://img685.imageshack.us/img685/7894/screenshot20110817at141.png />
Single-line equations also seem fine.
On Wed, Aug 17, 2011 at 1:28 PM, ellisonbg
What about "Print Preview"?
Long, it will overflow the button even with pretty small fonts...
I'm still +1 on Print/html
Refactor static printing.
I pulled out the printing functionality into printwidget.js, and moved the button to the panel.
The centering of maths is due to MathJax inserting a "text-align: center;" around the maths. Not sure how to override that easily.