nbsphinx icon indicating copy to clipboard operation
nbsphinx copied to clipboard

Implement nblinkgallery directive

Open adonath opened this issue 1 year ago • 5 comments

This PR addresses issue #651 and includes the following changes:

  • Implement new NbLinkGallery class and nblinkgallery directive
  • Implement GalleryLinks node
  • Adapt doctree_resolve to re-use the GalleryNode for GalleryLinks as well
  • Add minimal docs example to a-normal-rst-file.rst

I consider this still as a draft. I'm happy to receive any comments for improvement, especial reduction of code duplication and improvement of documentation.

adonath avatar Jul 22 '22 18:07 adonath

Thanks, this looks promising!

The HTML result is broken because of an unrelated problem with the bibliography. I'll try to find and report the problem, but in the meantime, you can just remove the bibliography directive during development and it should build fine.

The linkcheck error is also unrelated [UPDATE: error has been fixed].

mgeier avatar Jul 22 '22 22:07 mgeier

Thanks @mgeier for there review! I addressed all of your comments, please let me know if you have further ones. Currently it seems the latex build fails, I'm not sure what to do about this. Can I test the latex build locally?

adonath avatar Jul 29 '22 15:07 adonath

@mgeier Do you have time to look at this again? Thanks!

adonath avatar Aug 03 '22 16:08 adonath

Can I test the latex build locally?

Yes, sure: https://nbsphinx.readthedocs.io/en/0.8.9/contributing.html#building-the-documentation I then normally change to build/sphinx/latex/ and run latexmk -pdf -pv

@mgeier Do you have time to look at this again? Thanks!

I currently have little time and next week I'm on holidays. But after that, I'll have a closer look.

mgeier avatar Aug 04 '22 19:08 mgeier

I've reported the bibliography-related error there: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/309

mgeier avatar Aug 21 '22 12:08 mgeier

@adonath I took the liberty of using your work from here and building upon it in #696, I hope you don't mind!

mgeier avatar Jan 07 '23 21:01 mgeier

Thanks @mgeier! Yes that’s totally fine. For our project I ended up using a different solution so I didn’t give this PR any priority…

adonath avatar Jan 08 '23 23:01 adonath