Skip to content

Commit 155e1bc

Browse files
committed
DOC: Some updates/fixes
1 parent 0882956 commit 155e1bc

File tree

6 files changed

+42
-34
lines changed

6 files changed

+42
-34
lines changed

doc/code-cells.ipynb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,20 @@
132132
"\"I'm the 'normal' output\""
133133
]
134134
},
135+
{
136+
"cell_type": "markdown",
137+
"metadata": {},
138+
"source": [
139+
"<div class=\"alert alert-info\">\n",
140+
"\n",
141+
"**Note:**\n",
142+
"\n",
143+
"Using the IPython kernel, the order is actually mixed up,\n",
144+
"see https://github.com/ipython/ipykernel/issues/280.\n",
145+
"\n",
146+
"</div>"
147+
]
148+
},
135149
{
136150
"cell_type": "markdown",
137151
"metadata": {},
@@ -240,7 +254,7 @@
240254
"outputs": [],
241255
"source": [
242256
"from IPython.display import Math\n",
243-
"eq = Math(r'\\int_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)')\n",
257+
"eq = Math(r'\\int\\limits_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)')\n",
244258
"eq"
245259
]
246260
},
@@ -271,7 +285,7 @@
271285
"source": [
272286
"%%latex\n",
273287
"\\begin{equation}\n",
274-
"\\int_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)\n",
288+
"\\int\\limits_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)\n",
275289
"\\end{equation}"
276290
]
277291
},
@@ -318,7 +332,7 @@
318332
"(see the [ipython_kernel_config.py](ipython_kernel_config.py) in this directory),\n",
319333
"or in your profile directory\n",
320334
"(typically `~/.ipython/profile_default/ipython_kernel_config.py`).\n",
321-
"If you don't know your IPython profile directory, use this command:\n",
335+
"To find out your IPython profile directory, use this command:\n",
322336
"\n",
323337
" python3 -m IPython profile locate\n",
324338
"\n",

doc/installation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"source": [
1616
"# Installation\n",
1717
"\n",
18-
"Note that some packages may be out-of-date.\n",
18+
"Note that some packages may be out of date.\n",
1919
"You can always get the newest `nbsphinx` release from [PyPI](https://pypi.org/project/nbsphinx) (using `pip`).\n",
2020
"If you want to try the latest development version, have a look at the file [CONTRIBUTING.rst](https://github.com/spatialaudio/nbsphinx/blob/master/CONTRIBUTING.rst).\n",
2121
"\n",

doc/markdown-cells.ipynb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
"source": [
7070
"Equations can also be displayed on their own line like this:\n",
7171
"\\begin{equation}\n",
72-
"\\int_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0).\n",
72+
"\\int\\limits_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0).\n",
7373
"\\end{equation}\n",
7474
"\n",
7575
"This can be done by simply using one of the LaTeX math environments, like so:\n",
7676
"\n",
7777
"```\n",
7878
"\\begin{equation}\n",
79-
"\\int_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)\n",
79+
"\\int\\limits_{-\\infty}^\\infty f(x) \\delta(x - x_0) dx = f(x_0)\n",
8080
"\\end{equation}\n",
8181
"```"
8282
]
@@ -441,7 +441,7 @@
441441
"cell_type": "markdown",
442442
"metadata": {},
443443
"source": [
444-
"## Links to Local Files (HTML only)\n",
444+
"## Links to Local Files\n",
445445
"\n",
446446
"Links to local files (other than Jupyter notebooks and other Sphinx source files) are also possible, e.g. [requirements.txt](requirements.txt).\n",
447447
"\n",
@@ -452,7 +452,8 @@
452452
"```\n",
453453
"\n",
454454
"The linked files are automatically copied to the HTML output directory.\n",
455-
"For LaTeX output, no link is created."
455+
"For LaTeX output, links are created,\n",
456+
"but the files are not copied to the target directory."
456457
]
457458
},
458459
{
@@ -461,12 +462,13 @@
461462
"source": [
462463
"## Links to Domain Objects\n",
463464
"\n",
464-
"Links to [Sphinx domain objects](http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html) (such as a Python class or JavaScript function) are also possible. For example: [example_python_function](a-normal-rst-file.rst#example_python_function).\n",
465+
"Links to [Sphinx domain objects](http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html) (such as a Python class or JavaScript function) are also possible. For example:\n",
466+
"[example_python_function()](a-normal-rst-file.rst#example_python_function).\n",
465467
"\n",
466468
"This was created with:\n",
467469
"\n",
468470
"```\n",
469-
"[example_python_function](a-normal-rst-file.rst#example_python_function)\n",
471+
"[example_python_function()](a-normal-rst-file.rst#example_python_function)\n",
470472
"```\n",
471473
"\n",
472474
"This is especially useful for use with the Sphinx [autodoc](http://www.sphinx-doc.org/en/master/ext/autodoc.html) extension!"

doc/orphan.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"source": [
1616
"# An Orphan Notebook (HTML Only)\n",
1717
"\n",
18-
"This means that is doesn't appear in a [toctree](http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree) (see `index.rst`), but other pages can still link to it ...\n",
18+
"This means that it doesn't appear in a [toctree](http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree) (see `index.rst`), but other pages can still link to it ...\n",
1919
"\n",
2020
"* ... from a [Markdown cell of another notebook](markdown-cells.ipynb#Links-to-Other-Notebooks) using\n",
2121
"\n",

doc/subdir/toctree.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
"Multiple `toctree` cells in a row should be fine, though.\n",
6868
"\n",
6969
"The following cell is tagged with `\"nbsphinx-toctree\"` metadata and contains a link to the notebook [yet-another.ipynb](../yet-another.ipynb) and an external link (which will only be visible in the HTML output).\n",
70-
"It also contains a section title which will be used as `toctree` caption."
70+
"It also contains a section title which will be used as `toctree` caption\n",
71+
"(which also will only be visible in the HTML output)."
7172
]
7273
},
7374
{
@@ -84,7 +85,8 @@
8485
"\n",
8586
"[An External Link (HTML only)](https://nbsphinx.readthedocs.io/)\n",
8687
"\n",
87-
"Only the first section title (optional) and links to other sources (and external links) are used, all other cell content is ignored!"
88+
"Only the first section title (optional) and links to other sources (and external links) are used,\n",
89+
"all other cell content (like this very sentence) is ignored!"
8890
]
8991
}
9092
],
@@ -104,9 +106,9 @@
104106
"name": "python",
105107
"nbconvert_exporter": "python",
106108
"pygments_lexer": "ipython3",
107-
"version": "3.5.1+"
109+
"version": "3.7.1"
108110
}
109111
},
110112
"nbformat": 4,
111-
"nbformat_minor": 1
113+
"nbformat_minor": 2
112114
}

doc/usage.ipynb

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"Answer the questions that appear on the screen. In case of doubt, just press the `<Return>` key repeatedly to take the default values.\n",
3030
"\n",
3131
"After that, there will be a few brand-new files in the current directory.\n",
32-
"You'll have to make a few changes to the file named [conf.py](conf.py). You should at least check if those two variables contain the right things:\n",
32+
"You'll have to make a few changes to the file named `conf.py`. You should at least check if those two variables contain the right things:\n",
3333
"\n",
3434
"```python\n",
3535
"extensions = [\n",
@@ -39,20 +39,10 @@
3939
"exclude_patterns = ['_build', '**.ipynb_checkpoints']\n",
4040
"```\n",
4141
"\n",
42-
"Once your `conf.py` is in place, edit the file named `index.rst` and add the file names of your notebooks (with or without the `.ipynb` extension) to the [toctree](http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree) directive.\n",
43-
"\n",
44-
"<div class=\"alert alert-info\">\n",
42+
"For an example, see this project's [conf.py](conf.py) file.\n",
4543
"\n",
46-
"**autosummary bug:**\n",
47-
"\n",
48-
"If you are using the `sphinx.ext.autosummary` Sphinx extension, there is [a bug in Sphinx (below version 1.5)](https://github.com/sphinx-doc/sphinx/issues/2485) which prevents notebooks from being parsed. \n",
49-
"As a work-around you can explicitly list all the files for which autosummary should be ran using the [autosummary_generate](http://www.sphinx-doc.org/en/master/ext/autosummary.html#confval-autosummary_generate) variable in `conf.py`. For example,\n",
50-
"\n",
51-
"```python\n",
52-
"autosummary_generate = ['myfile1.rst', 'myfile2.rst']\n",
53-
"```\n",
54-
"\n",
55-
"</div>"
44+
"Once your `conf.py` is in place, edit the file named `index.rst` and add the file names of your notebooks (with or without the `.ipynb` extension) to the [toctree](http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree) directive.\n",
45+
"For an example, see this project's [index.rst](index.rst) file."
5646
]
5747
},
5848
{
@@ -136,18 +126,16 @@
136126
"cell_type": "markdown",
137127
"metadata": {},
138128
"source": [
139-
"## Automatic Creation of HTML and PDF output on [readthedocs.org](https://readthedocs.org)\n",
129+
"## Automatic Creation of HTML and PDF output on readthedocs.org\n",
140130
"\n",
141131
"There are two different methods, both of which are described below.\n",
142132
"\n",
143-
"In both cases, you'll first have to create an account on https://readthedocs.org/ and connect your Github/Bitbucket account. Instead of connecting, you can also manually add any publicly available Git/Subversion/Mercurial/Bazaar repository.\n",
133+
"In both cases, you'll first have to create an account on https://readthedocs.org/ and connect your GitLab/Github/Bitbucket account. Instead of connecting, you can also manually add any publicly available Git/Subversion/Mercurial/Bazaar repository.\n",
144134
"\n",
145135
"After doing the steps described below, you only have to \"push\" to your repository, and the HTML pages and the PDF file of your stuff are automagically created on readthedocs.org. Awesome!\n",
146136
"\n",
147137
"You can even have different versions of your stuff, just use Git tags and branches and select in the readthedocs.org settings (under \"Admin\", \"Versions\") which of those should be created.\n",
148138
"\n",
149-
"If your new versions are not automatically built, go to the \"Settings\" of your Github repository, continue to \"Integrations & services\", and make sure that \"ReadTheDocs\" is listed and activated in the \"Services\" section. If not, use \"Add service\". There is probably a similar thing for Bitbucket and others.\n",
150-
"\n",
151139
"<div class=\"alert alert-info\">\n",
152140
"\n",
153141
"**Note:**\n",
@@ -222,6 +210,7 @@
222210
"**Note:**\n",
223211
"\n",
224212
"Most of the \"Advanced Settings\" on readthedocs.org will be ignored if you have a `readthedocs.yml` file.\n",
213+
"In this file you can control all the settings, see https://docs.readthedocs.io/en/latest/yaml-config.html.\n",
225214
"\n",
226215
"</div>\n",
227216
"\n",
@@ -351,6 +340,7 @@
351340
"\n",
352341
"In the Jupyter Notebook application, you can manually clear all outputs by selecting\n",
353342
"\"Cell\" $\\to$ \"All Output\" $\\to$ \"Clear\" from the menu.\n",
343+
"In JupyterLab, the menu items are \"Edit\" $\\to$ \"Clear All Outputs\".\n",
354344
"\n",
355345
"There are several tools available to remove outputs from multiple files at once without having to open them separately.\n",
356346
"You can even include such a tool as \"clean/smudge filters\" into your Git workflow, which will strip the output cells automatically whenever a Git command is executed.\n",
@@ -381,7 +371,7 @@
381371
"name": "python",
382372
"nbconvert_exporter": "python",
383373
"pygments_lexer": "ipython3",
384-
"version": "3.6.4+"
374+
"version": "3.7.1"
385375
}
386376
},
387377
"nbformat": 4,

0 commit comments

Comments
 (0)