Closed sheggen closed 3 weeks ago
The question was written incorrectly using a single backquote around the word int where it should be double backquotes. So since single backquotes are in the html, MathJax (more specifically the asciimath parser) interprets that as something it should display as math.
The fix is to update the RST source for the book and correct the markup.
It now parses correctly as int
. Is the RS convention to highlight code (for example, int vs. int
in markdown)? If so, it is not rendering it as inline code, but still wrapping it in MathJax:
Personally, I would prefer to see code parsed differently than regular text, like it is done elsewhere in the book (e.g., ex_2_5 where print
is presented as code):
If not, then the issue is resolved.
The Runestone RST is built on top of Sphinx, which in turn uses restructuredText (docutils). So things like how code is presented are whatever is standard in Sphinx. But that is kind of beside the point, as I'm not working on the RST parts of Runestone anymore, new books are written in PreTeXt, and many old books have been converted. See the httlacs
book on Runestone Academy for the PreTeXt version.
What Course are you in
The bug first appears here: https://runestone.academy/ns/books/published/2024_fall_csc226/SimplePythonData/Input.html
What Page were you on
https://runestone.academy/ns/books/published/2024_fall_csc226/SimplePythonData/Input.html
What is your username
heggens (instructor). First reported by a student though.
Describe the bug The code
int
is being converted to an integral symbol. Right clicking on the symbol reveals there is a math library is in use, as does inspecting the HTML. Less important, there is grammatical issues with the question as well.Traceback N/A
Javascript Errors N/A