You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic programming patterns in section 4.4 used ?foo for variables in Scheme and $foo in JS.
That's a great choice, as dollar is the only punctuation char valid in JS identifiers, and alludes to $var syntaxes in shells/Perl/etc. 👍
Alas, in the comparison edition, the dollars confuse MathJax, which apparently processes the whole page, including all JS code :-(
here is a particularly mixed-up example, where same list( is sometimes literal code sometimes italic "math", and underscore in lives_near makes the letter n subscript — and most importantly all the dollars are gone.
The JS-only edition looks fine BTW: https://sourceacademy.org/sicpjs/4.4.1#p20
There code is code, dollars are dollars, all monospace, yet the LATEX="yes" portions do get rendered with KaTeX.
The logic programming patterns in section 4.4 used
?foo
for variables in Scheme and$foo
in JS.That's a great choice, as dollar is the only punctuation char valid in JS identifiers, and alludes to $var syntaxes in shells/Perl/etc. 👍
Alas, in the comparison edition, the dollars confuse MathJax, which apparently processes the whole page, including all JS code :-(
here is a particularly mixed-up example, where same
list(
is sometimes literal code sometimes italic "math", and underscore inlives_near
makes the letter n subscript — and most importantly all the dollars are gone.rendered from this XML:
sicp/xml/chapter4/section4/subsection1.xml
Lines 1676 to 1679 in ca6ce37
(same happens in later subsections 4.4.2 and so on.)
Now, you can't just exclude all Scheme/JS snippets from mathjax processing, cause some are deliberate, like here:
sicp/xml/chapter4/section4/subsection1.xml
Lines 1068 to 1080 in ca6ce37
So it has to depend on
LATEX="yes"
attribute.The text was updated successfully, but these errors were encountered: