You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/index.rst
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,16 +372,16 @@ Downloading the code as a script
372
372
--------------------------------
373
373
374
374
Jupyter Sphinx includes 2 roles that can be used to download the code embedded in a document:
375
-
``:jupyter-download:script:`` (for a raw script file) and ``:jupyter-download:notebook:`` or ``:jupyter-download:nb:`` (for
375
+
``:jupyter-download-script:`` (for a raw script file) and ``:jupyter-download-notebook:`` or ``:jupyter-download-nb:`` (for
376
376
a Jupyter notebook).
377
377
378
378
These roles are equivalent to the standard sphinx `download role <https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-download>`__, **except** the extension of the file should not be given.
379
379
For example, to download all the code from this document as a script we
380
380
would use::
381
381
382
-
:jupyter-download:script:`click to download <index>`
382
+
:jupyter-download-script:`click to download <index>`
383
383
384
-
Which produces a link like this: :jupyter-download:script:`click to download <index>`. The target that the role is
384
+
Which produces a link like this: :jupyter-download-nb:`click to download <index>`. The target that the role is
385
385
applied to (``index`` in this case) is the name of the document for which you wish to download
386
386
the code. If a document contains ``jupyter-kernel`` directives with ``:id:`` specified, then
387
387
the name provided to ``:id:`` can be used to get the code for the cells belonging to the
@@ -477,6 +477,7 @@ Release 0.4.0
477
477
- Improve script handling by using ``nbconvert`` directly.
478
478
- Remove deprecated enabling of the extension as ``jupyter_sphinx.execute``.
479
479
- Implement different output priorities in HTML and LaTeX builders. In practice this allows to provide a better fallback in PDF output.
480
+
- Introduce new ``jupyter-download`` syntax compatible with Sphinx≥4, ``jupyter-download-nb``, ``jupyter-download-notebook``, and ``jupyter-download-script``
0 commit comments