barbagroup / JITcode-MechE

Online learning modules to learn computing in a problem-based context within Mechanical Engineering
MIT License
7 stars 5 forks source link

WIP (Work in Progress) Parabola Notebook #7

Closed ahmadia closed 10 years ago

ahmadia commented 10 years ago

Please don't merge, this is work in progress.

ahmadia commented 10 years ago

Updated. @labarba - feel free to check progress.

I've submitted a pull request to NBViewer so they'll render aligned LaTex environments like \align correctly: https://github.com/ipython/nbviewer/pull/194

But otherwise, this should be rendering correctly: http://nbviewer.ipython.org/github/barbagroup/JITcode-MechE/blob/ahmadia/wip_parabola_notebook/lessons/XX_LessonXX_Particle_on_Parabola.ipynb

gforsyth commented 10 years ago

@ahmadia If you use the mathjax commands instead of LaTeX \align then nbviewer will render the equations properly. I know it's deprecated in actual LaTeX, but just wrapping $$ will render the equation on it's own line and the style sheet will ensure that it's centered.

ahmadia commented 10 years ago

@gforsyth \align is a MathJaX directive :) They've merged my PR upstream in nbviewer, so the next time they reboot the Heroku instance the notebook should render correctly. The notebook itself should work locally, this is just a nbviewer problem.

gforsyth commented 10 years ago

Whoops! Well, nice catch! It did work locally without issue.

On Fri, Feb 21, 2014 at 10:12 AM, Aron Ahmadia notifications@github.comwrote:

@gforsyth https://github.com/gforsyth \align is a MathJaX directive :) They've merged my PR upstream in nbviewer, so the next time they reboot the Heroku instance the notebook should render correctly. The notebook itself should work locally, this is just a nbviewer problem.

Reply to this email directly or view it on GitHubhttps://github.com/barbagroup/JITcode-MechE/pull/7#issuecomment-35738598 .

ahmadia commented 10 years ago

And there was a bug in my PR, so thanks for reminding me to look at it...

ahmadia commented 10 years ago

Upstream bug resolved by IPython and Rackspace folks, equation environments now working in nbviewer.

labarba commented 10 years ago

Could their "fix" be responsible for Nbviewer suddenly rendering my pretty style wrong? The text column now appears stuck to the left, with the code cells off-set to the right on the browser window.

ahmadia commented 10 years ago

I'm guessing that your style was based on a CSS that is now out of sync with the latest IPython, but it could also be Marked using a different class of CSS object for the code fragments (switching pre and code). Unfortunately, since nbviewer is a rolling release, we'll need to update your CSS to work properly. I think it will be a simple fix. Can you raise a new issue for me to track? I assume this is happening on all your notebooks?

ahmadia commented 10 years ago

I've updated the pull request but nbviewer currently looks terrible. I'm pushing a preview to my website.

ahmadia commented 10 years ago

And the preview is now available here: http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.html

You can download the notebook my modifying the URL:http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.ipynb

It is also available in version control here.

labarba commented 10 years ago

I would like to send the URL to Chunlei Liang with a note saying "this is how your homework assignment would look as an online module with Python." He is a reasonable guy, but he just "knows C" and so "teaches C" ... if he sees this before the faculty meeting, he might have some impressions to share.

Agree?

I don't have the time to review it today (still working down my Sunday to-do list, with two proposals to read for review).

I hope they fix the nbviewer soon!


Lorena A. Barba Associate Professor of Mechanical and Aerospace Engineering The George Washington University http://twitter.com/LorenaABarba

On Feb 23, 2014, at 10:08 PM, Aron Ahmadia wrote:

And the preview is now available here:http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.html

You can download the notebook my modifying the URL:http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.ipynb

It is also available in version control here.

ahmadia commented 10 years ago

He's appropriately attributed so I'm happy to share it. Make sure to note that everything to build that notebook is included, even the scripts for generating the presentation-quality diagrams.

I hope they fix the nbviewer soon!

I put in a pull request and it's had two positive reviews from the core developers, so I expect it to be merged in some time early this week. There's a little bit of a lag in getting that switched to production, but the dev managing nbviewer has been very responsive, so, mid-week?

On Sun, Feb 23, 2014 at 10:21 PM, Lorena A. Barba notifications@github.comwrote:

I would like to send the URL to Chunlei Liang with a note saying "this is how your homework assignment would look as an online module with Python." He is a reasonable guy, but he just "knows C" and so "teaches C" ... if he sees this before the faculty meeting, he might have some impressions to share.

Agree?

I don't have the time to review it today (still working down my Sunday to-do list, with two proposals to read for review).

I hope they fix the nbviewer soon!


Lorena A. Barba Associate Professor of Mechanical and Aerospace Engineering The George Washington University http://twitter.com/LorenaABarba

On Feb 23, 2014, at 10:08 PM, Aron Ahmadia wrote:

And the preview is now available here: http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.html

You can download the notebook my modifying the URL: http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.ipynb

It is also available in version control here.

Reply to this email directly or view it on GitHubhttps://github.com/barbagroup/JITcode-MechE/pull/7#issuecomment-35854949 .

ahmadia commented 10 years ago

Fixed!

https://github.com/ipython/nbviewer/issues/200#issuecomment-35894414

On Sun, Feb 23, 2014 at 10:31 PM, Aron Ahmadia aron@ahmadia.net wrote:

He's appropriately attributed so I'm happy to share it. Make sure to note that everything to build that notebook is included, even the scripts for generating the presentation-quality diagrams.

I hope they fix the nbviewer soon!

I put in a pull request and it's had two positive reviews from the core developers, so I expect it to be merged in some time early this week. There's a little bit of a lag in getting that switched to production, but the dev managing nbviewer has been very responsive, so, mid-week?

On Sun, Feb 23, 2014 at 10:21 PM, Lorena A. Barba < notifications@github.com> wrote:

I would like to send the URL to Chunlei Liang with a note saying "this is how your homework assignment would look as an online module with Python." He is a reasonable guy, but he just "knows C" and so "teaches C" ... if he sees this before the faculty meeting, he might have some impressions to share.

Agree?

I don't have the time to review it today (still working down my Sunday to-do list, with two proposals to read for review).

I hope they fix the nbviewer soon!


Lorena A. Barba Associate Professor of Mechanical and Aerospace Engineering The George Washington University http://twitter.com/LorenaABarba

On Feb 23, 2014, at 10:08 PM, Aron Ahmadia wrote:

And the preview is now available here: http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.html

You can download the notebook my modifying the URL: http://aron.ahmadia.net/gwu/parabola_lesson/99_Lesson99_Particle_on_Parabola.ipynb

It is also available in version control here.

Reply to this email directly or view it on GitHubhttps://github.com/barbagroup/JITcode-MechE/pull/7#issuecomment-35854949 .