-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
ipynb -> tex converter #5
Comments
I do plan, eventually, to convert them all to latex/pdf, and nbconvert would have been my first choice. I'd love to offer my assistance. How can I help? I'm fine with being add to the home page. Thanks for the contact! |
Depending on how much you like to dive in code from :
to
We can also just use your book to test and send you the PDFs for comment :-) As for nbviewer, tell me if you want to do a screenshot yourself or if I do, and when you are "ready" to be added (ie so that the url will not change) and I'll take care of the rest when I have some time. |
Cool! I'll probably aim for the former, and let you and @jdfreder know how it goes. with the (permanent) url below. Thanks Matthias! |
It's been a while since there has been any conversation in here. Like @Carreau mentioned I'm adding a PDF/Latex output template powered by Sphinx. I've approached a place in the development where I'm polling different notebook users about the output. Your notebook is absolutely beautiful. It is actually my favorite to show off because of the color scheme you chose for your plots. I'm experimenting with two output styles. I'm looking for feedback on which of the two styles you prefer, why, and any suggestions you may have. The two styles included are,
Note that the images in the output look like they are being scaled up in size. This is because of the DPI setting of matplotlib. Since I converted the file directly from the gallery, the source is unmodified. To adjust DPI settings of the notebook's output, refer to @minrk 's post here – http://mail.scipy.org/pipermail/ipython-user/2011-October/008699.html. As an iPython notebook contributor, your input is not only valued but very influential. Any comments, concerns, or suggestions are greatly appreciated! Thank you in advanced for your feedback. CC: @ellisonbg |
Hi Jonathan, First let me say thank you for making beautiful pdfs of the book. There has been interest in pdf versions, see 1 and 2 plus personal requests, so I think people will be happy to see the great progress here. (Also thanks for the compliments about the book and continued sharing, I appreciate it =) Overall, I preferred the styling of Simple. But I'll go into detail about both:
A few comments overall:
The project looks great, and I'm happy you know how to do this! (I resorted to chrome -> print as pdf, which is pretty tech-less.) Thanks Jonathan. Also, I'll add some code to increase the DPI. |
That would probably be a 1 line template change (and you can inherit from other template so it won't be hard) but I think that by default we should provide a style close to notebook as we'll try to add a "download as PDF" button.
I would also suggest to switch InlineBackend to SVG. nbconvert shoud be able (in the end) to extract svg, convert them to pdf and re-include them. Then they wouldn't be any issues with DPI. Still I'm not sure if alpha channel svg->pdf and all pdfreader support it well. |
Cameron, First of all, we love your notebooks! They are one of the best examples of 1.Default notebook:
A few comments overall:
The shortened hrule is part of the sphinx latex template we are using. In terms of font's you can probably change that in the templates, but we Adjusting the title shouldn't be a problem. The project looks great, and I'm happy you know how to do this! (I resorted
Cheers, Brian
Brian E. Granger |
@Carreau @ellisonbg @jdfreder ok, thanks for the responses and overall project. I am unfamilar with Sphinx templates, but they sounds quite flexible. @Carreau is working on styling for the browser and nbviewer: will these custom styles be auto-generated for nbconvert, or will a seperate sphinx template need to be built? |
No I guess the templates will have to be built. it shoudl be pretty strait But that's really a detail about which nbconvert lib does not care. On Wed, Apr 10, 2013 at 6:12 AM, Cameron Davidson-Pilon <
|
@CamDavidsonPilon Yeah, the styles will have to be written by hand. The current template is special in that it actually inherits directly from the Sphinx source code. In essence, it provides a way of bringing Sphinx Latex capability to iPython Notebooks. Sphinx already supports multiple document formats and two major output types ( a book type and report type ) , all of which are available through NBconvert now. As Sphinx is expanded, the new template will not need to be adjusted to accommodate the new styles... They should just work. What the NBconvert Sphinx-Latex template does is fill the document using Sphinx appropriate Latex commands. The task currently at hand is to tweak how we utilize Sphinx and it's Latex template with our own Latex. When I get some time this week I'll upload some of the other Sphinx styles for you, I think they may use different fonts. I know they do have different header styles at least. Also, Thank you for pointing out the page numbers! They should be working, somewhere along the line I must have managed to break that (Latex can be very ... fragile.) Like @ellisonbg said, the title is not a problem and normally it is set in the metadata of the NB. Since a lot of the NBs in the gallery do not have proper titles (plagued with underscores), I overrode all of them using the titles of the links I found in the gallery. -Jon |
Re the usage of the "In[56]" numbering as references in the text, that really Having latex-like anchors for cells (which markdown cells can reference) would |
Hi,
I love your notebooks on nbconvert.
We are working on the brand new nbconvert to convert IPython noteboko files, and especially latex here , pinging @jdfreder that he is the most involved in the latex converter. I thought this might interest both you to convert to latex, and us to have a nice example to get feedback and refine the settings.
Also, if/when you wish I can also put you on the home page of nbconvert.
The text was updated successfully, but these errors were encountered: