Changes I make to the default toc2 options via the Nbextension menu on the Jupyter Notebooks launcher page, seem to not propagate to the export options when using jupyter nbconvert --to html_toc. As I understand it, this is because the default options only indicate which toc metadata should be written to notebooks as they are opened for the first time, but if the notebook is not opened, there is no way for nbconvert to know of these default options since it only reads the metadata from the notebook it is exporting, not anything from the default toc2 options. Is this correctly understood?
I am mainly using JupyterLab, so this is why I am interested in nbconvert knowing about the toc2 options when exporting without actually having opened the .ipynb file in the classic notebook interface.
Fow now, I am adding the metadata manually, something like
via the JupyterLab side panel tab for notebook metadata. This is not at all a lot of work since I only need to do it once per notebook, but I am curious if I am missing an easier and more robust solution. For example, I recently found out about the flag --ExtractOutputPreprocessor.enabled=False, which is great! Are any toc metadata properties exposed in a similar manner?
Mentioning @jfbercher since this is a repo of many different addons and you seem to answer many toc2 related question. Let me know if this is incorrect and I can remove the mention.
Changes I make to the default toc2 options via the Nbextension menu on the Jupyter Notebooks launcher page, seem to not propagate to the export options when using
jupyter nbconvert --to html_toc
. As I understand it, this is because the default options only indicate whichtoc
metadata should be written to notebooks as they are opened for the first time, but if the notebook is not opened, there is no way fornbconvert
to know of these default options since it only reads the metadata from the notebook it is exporting, not anything from the defaulttoc2
options. Is this correctly understood?I am mainly using JupyterLab, so this is why I am interested in
nbconvert
knowing about thetoc2
options when exporting without actually having opened the .ipynb file in the classic notebook interface.Fow now, I am adding the metadata manually, something like
via the JupyterLab side panel tab for notebook metadata. This is not at all a lot of work since I only need to do it once per notebook, but I am curious if I am missing an easier and more robust solution. For example, I recently found out about the flag
--ExtractOutputPreprocessor.enabled=False
, which is great! Are any toc metadata properties exposed in a similar manner?Mentioning @jfbercher since this is a repo of many different addons and you seem to answer many toc2 related question. Let me know if this is incorrect and I can remove the mention.