jupyter-book
jupyter-book copied to clipboard
Fail to add index entries and built a general index page using JupyterBook. Need some help!
Fail to add index entries and built a general index page using JupyterBook. Need some help!
I'm trying to add index entries and built a general index page using JupyterBook by doing based on the instructions in https://jupyterbook.org/en/stable/content/content-blocks.html?highlight=index#content-indexes
by doing...
-
1 Create a template book ("myb_q2")
$ jb create myb_q2
-
2 Edit 'myb_q2/notebooks.ipynb'
2.1 create a reference link to general index, use the genindex keyword.
{ref}`using a ref role <genindex>' into notebooks.ipynb <== Not work!!! (not generate a cross-linked link, as shown in the image below)
2.2 add items to your general index with the {index} directive.
```{index} index directive ``` into notebooks.ipynb <== Not work!!! (not generate an index list in the index page, as shown in the image below
- 3 Add the general index to ToC by
3.1 Create a genindex.md file in the root of the book.
$ echo '# Indexxx' > genindex.md
3.2 Add genindex.md in _toc.yml:
format: jb-book root: intro chapters: - file: markdown - file: notebooks - file: markdown-notebooks - file: genindex
- 4 Build a book by running the following command:
$ jb build myb_q2/ --builder pdflatex
After compiling .... In the generated book (pdf), there is a Chapter "Index " in the ToC .... but.......
no index list (empty)!!, , as shown in the image below
Note
I have to run $ jb build myb_q2/ --builder pdflatex
2 times, since an error occurs if this command is run the first time console_output(error-1). No error for the second compile.
expectation I expected an automatically generated indices in Index page.
Do i miss something_
I've attached both the test book (the source files after modifications mentioned above) and the console output after trying to create the pdf (first compile). book_source(zip) Output pdf
--
List your environment
Jupyter Book : 0.13.0 nbconvert : 6.5.0 Sphinx-external-toc : 0.2.4 MyST-Parser : 0.15.2 MyST-NB : 0.13.2 Sphinx Book Theme : 0.8.1 Jupyter-Cache : 0.4.3 NbClient : 0.5.13
Version of Python. : 3.8 OS : MacOS 12.3.1


