Git Product home page Git Product logo

Comments (12)

filippo82 avatar filippo82 commented on May 24, 2024 1

Hi Chris,

thanks for opening this issue. Now that "version 2" of Jupyter Book is out, I've started creating a book. That obviously required me to read about MyST. I must say that it took me longer than I had thought to realized that MyST allows me to use all (or am I wrong?) Sphinx directives inside a Jupyter Book. For example, the MyST documentation shows an example with the code-block directive but it is not referenced anywhere in the documentation. It took me some googling to (find this issue and to) realize that it is the corresponding Sphinx directive.

I agree with you that additional documentation/guidance about the Sphinx directives would be beneficial.

Cheers.

from myst-parser.

choldgraf avatar choldgraf commented on May 24, 2024 1

nice - OK I opened up executablebooks/jupyter-book#607 to track this in the JB docs

from myst-parser.

filippo82 avatar filippo82 commented on May 24, 2024 1

Following the new issue!
Cheers.

from myst-parser.

chrisjsewell avatar chrisjsewell commented on May 24, 2024 1

I wonder if there's some way we could auto-generate a list of directives that are available to a default jupyter-book build...

This will now be achieved in https://github.com/executablebooks/sphinx-ext-autodoc

from myst-parser.

chrisjsewell avatar chrisjsewell commented on May 24, 2024

Note sphinx also has a decent amount of documentation on reStructuredText, so we don't want to repeat too much of what they've already said, but I think a bit more documentation on our end would help.

from myst-parser.

nathancarter avatar nathancarter commented on May 24, 2024

Ordinarily I would just click the thumb under @filippo82 's comment, but that would be far too mild a sentiment. I spent something in the 15-30 minutes time frame looking for the list of directives in the MyST docs only to find nothing, then googled around, and after reading lots of stuff, ended up here, where I find that it's assumed you know rST first and are familiar with directives (!).

The links you're talking about are a 100% must have. In fact, I'd suggest that those links are insufficient, since you're supporting both Markdown and rST, and reading the rST-based docs is confusing for a Markdown native, since the conversion from the one syntax to the other isn't obvious.

But while I'm here and it looks like I'm just complaining, I'll also say that I was super excited to find out today about the existence of the Jupyter-Book project and all this tech like MyST that underlies it, and I'm definitely using it starting today! So thanks for all this great work!

from myst-parser.

chrisjsewell avatar chrisjsewell commented on May 24, 2024

Cheers. I guess the main point in the docs currently with the rST -> MyST comparison is here: https://myst-parser.readthedocs.io/en/latest/using/syntax.html#directives-a-block-level-extension-point.
Happy to receive PR's (even draft ones) of what would be ~minimally a good addition to the documentation to make this clear early on; as a stop gap before adding anything more substantial

from myst-parser.

choldgraf avatar choldgraf commented on May 24, 2024

I think another challenge that we're uncovering is the difference between Jupyter Book docs and myst-parser docs. The myst-parser is a Sphinx tool, and so I think we assume more knowledge about the Sphinx ecosystem for these docs. But, we should then make sure that the Jupyter Book docs do a better job of explaining the usage patterns for somebody that's not familiar with Sphinx.

@nathancarter can you think of a good place where this information would have helped you out in the Jupyter Book docs? I wanna make sure we don't confuse people who haven't used Sphinx/rST!

from myst-parser.

nathancarter avatar nathancarter commented on May 24, 2024

@choldgraf Directives appear in the Jupyter-Book documentation here. I would think it best to put there a link to the full list of directives.

from myst-parser.

choldgraf avatar choldgraf commented on May 24, 2024

@nathancarter it'd be a bit tricky to just add a list of all directives, since they're a combination of default docutils directives, default Sphinx directives, extra sphinx extensions, and Jupyter Book directives, which is why we've tried to just document the major ones through the JB docs.

Maybe one step is to just mention the broader Sphinx ecosystem of directives, mention that many will be written with rST and explain what that means, and note that many of them are documented throughout the JB docs.

I wonder if there's some way we could auto-generate a list of directives that are available to a default jupyter-book build...

from myst-parser.

chrisjsewell avatar chrisjsewell commented on May 24, 2024

I wonder if there's some way we could auto-generate a list of directives that are available to a default jupyter-book build...

I did something like this in https://github.com/chrisjsewell/rst-language-server and have used the result from that to populate the test fixtures in: https://github.com/executablebooks/MyST-Parser/tree/master/tests/test_renderers/fixtures (e.g. sphinx_directives.md, docutils_directives.md), and also to generate the auto-completes in https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight.
BTW Make sure you mention this VS Code extension in jupyter book 😁

from myst-parser.

choldgraf avatar choldgraf commented on May 24, 2024

that package intrigues me! I'm curious to see how it works!

from myst-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.