Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadTheDocs rendering fixes #490

Draft
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

kandersolar
Copy link
Member

@kandersolar kandersolar commented Nov 15, 2023

Follow up to #489. Some of the example notebooks use text wrapped in *** for emphasis, which for some reason results in messed up HTML output. Here an example from Tutorial 1:


image


This PR replaces those triple asterisks with double asterisks, which I think should render as expected. Edit: no they don't. Exploring alternatives...

It also fixes a title underline issue on the examples page.

Some part of the ipynb->HTML conversion process does not like text wrapped in triple asterisks.  In particular, it inserts literal "nbsphinx-math" text into the output.
 For example, a line like this in a markdown cell:

***rvu -vf views\\front.vp -e .01 tutorial_1.oct***

Ends up displaying as the following text (styled bold) when viewing the output HTML:

rvu -vf views:nbsphinx-math:`front`.vp -e .01 tutorial_1.oct

I couldn't find a way to disable this behavior, including trying different/newer versions of nbsphinx and pandoc, so instead I just replace the triple asterisks with double asterisks in the source ipynb files using this command:

 git grep -l '\*\*\*.*\*\*\*' *.ipynb | xargs -d '\n' sed -i 's/\*\*\*/\*\*/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant