QuantEcon / sphinxcontrib-jupyter

A Sphinx Extension for Generating Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
76 stars 23 forks source link

Support sphinx >= 1.8 #156

Closed chabotsi closed 5 years ago

chabotsi commented 5 years ago

This PR makes sphinx >= 1.8 supported.

The main issue was with math_block. Math nodes do not have a latex attribute anymore with sphinx >= 1.8. Math nodes are now treated as every other node, i.e. a flag is raised when the mode is activated, then the text (content) is written, then the flag is down.

Closing #124

mmcky commented 5 years ago

thanks @chabotsi -- it is great to have this fixed. I will review this today -- but looks good.

Does this mean the minimum compatible version is now 1.8+ if the math_block structure has changed?

chabotsi commented 5 years ago

thank you for you interest in my PR.

Does this mean the minimum compatible version is now 1.8+ if the math_block structure has changed?

Yes… you were definitely right. That was a mistake from me to do that. I suggest new changesets that restore the retro-compatibility. The tests are successful with sphinx 1.7.2 on my computer, and with 1.8.2 and 1.7.9 as shown by Travis.

mmcky commented 5 years ago

thanks @chabotsi -- sorry for my delay. Had a few other projects requiring attention. I will try and take a look at this this week. I really appreciate the PR. Thanks for the contribution!

mmcky commented 5 years ago

I have run this over a larger test set used for building lectures.quantecon.org.

diff-1.7.9v1.8.2.txt

looks like 1.8+ implements references a bit differently and uses a different apostrophe -- no major differences.

Thanks @chabotsi this is great. thanks again!