Comments (12)
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.
nice - OK I opened up executablebooks/jupyter-book#607 to track this in the JB docs
from myst-parser.
Following the new issue!
Cheers.
from myst-parser.
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.
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.
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.
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.
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.
@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.
@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.
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.
that package intrigues me! I'm curious to see how it works!
from myst-parser.
Related Issues (20)
- Create a new release to capture the docutils warnings fixes HOT 2
- Cannot link to RST sections since 0.17.0 HOT 4
- 404 Page not found on "MyST - Markedly Structured Text - Parser" page HOT 1
- inline attribute on hyperlink disappears in LaTeX (but is there in HTML) HOT 1
- Line braks doesn't work. HOT 2
- third occurence of heading with the same title cannot be referenced, `[myst.xref_missing]` HOT 1
- No longer a canonical way to parse a simple snippet HOT 4
- Emit include-read event HOT 1
- Message "inconsistent footnote references in translated message...." HOT 1
- WARNING: 'myst' cross-reference target not found: 'level-4-header-title' [myst.xref_missing] HOT 4
- Equation label of math not work before `make clean` when math_numfig=True HOT 7
- Support sphinx 7.3 - use default config value types HOT 2
- `end-before` parameter thinks it has no argument HOT 3
- More than one target found for 'myst' cross-reference [myst.xref_ambiguous] HOT 2
- $$ equation reference is not identified unless preceded by a blank line HOT 2
- no syntax to create line_block (hardbreak creates paragraph with raw linebreaks) HOT 4
- `## Heading 2` produces `<h1>Heading 2</h1>` HOT 4
- Issue on page /syntax/admonitions.html - In example, class should be space separated not comma HOT 3
- Include directive does not consider parser option HOT 2
- replacement of "." in headings for slugs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myst-parser.