<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This concerns the TeXShop 5.02 TeX4ht engine rendering of the file Fourier.tex that is in<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>~/Library/TeXShop/New/Demo/Fourier-for-TeXShop</div><div class=""><br class=""></div><div class="">folder. Namely, when its first line is changed to... </div><div class=""><br class=""></div><div class="">% !TEX TS-program = TeX4ht</div><div class=""><br class=""></div><div class="">…and the source Fourier.tex is typeset (consequently, by the new TeX4ht engine, which calls tex4ht), something weird happens to one piece of Sage code in Section 9 “Interactive Experiments,” namely, in the example “A Sage Calculation”:</div><div class=""><br class=""></div><div class=""><div class=""><h4>A Sage Computation</h4></div><div class="">Type your own Sage computation below and click “Evaluate”.</div><div class="">    <div class="compute"><script type="text/x-sage"></div><div class="">u, v = var('u,v')</div><div class="">sage: fx = (3+sin(v)+cos(u))*cos(2*v)</div><div class="">sage: fy = (3+sin(v)+cos(u))*sin(2*v)</div><div class="">sage: fz = sin(u)+2*cos(v)</div><div class="">sage: parametric_plot3d([fx, fy, fz], (u, 0, 2*pi), (v, 0, 2*pi),</div><div class="">....:   frame=False, color="red")</div><div class=""></script></div></div><div class=""><br class=""></div><div class="">Although that’s valid Sage code, when I typeset it with the TeX4ht engine, the html output for the SAge code appears as the following:</div><div class=""><br class=""></div><div class=""><div class="">u, v = var('u,v')</div><div class="">                                                                                  </div><div class="">                                                                                  </div><div class="">sage: fx = (3+sin(v)+cos(u))*cos(2*v)</div><div class="">sage: fy = (3+sin(v)+cos(u))*sin(2*v)</div><div class="">sage: fz = sin(u)+2*cos(v)</div><div class="">sage: parametric_plot3d([fx, fy, fz], (u, 0, 2*pi), (v, 0, 2*pi),</div><div class="">....:   frame=False, color="red”)</div></div><div class=""><br class=""></div><div class="">And then, when I click the Evaluate buttion under that Sage cell, I get an error:</div><div class=""><br class=""></div><div class=""><pre class="sagecell_pyerr" style="margin-top: 0px; margin-bottom: 0px;"><span class="ansi-cyan-fg" style="color: rgb(96, 198, 200);">  File </span><span class="ansi-green-fg" style="color: rgb(0, 162, 80);">"/tmp/ipykernel_1809651/351844888.py"</span><span class="ansi-cyan-fg" style="color: rgb(96, 198, 200);">, line </span><span class="ansi-green-fg" style="color: rgb(0, 162, 80);">8</span>
<span class="ansi-red-fg" style="color: rgb(231, 92, 88);">    Ellipsis.:   frame=False, color="red")</span>
^
<span class="ansi-red-fg" style="color: rgb(231, 92, 88);">SyntaxError</span><span class="ansi-red-fg" style="color: rgb(231, 92, 88);">:</span> invalid syntax</pre><div class=""><br class=""></div></div><div class="">Merely editing that Sage cell in-place directly in the displayed html page so as to delete the two blank lines allows the code to be properly evaluated by SageCell and produce the expected 3D graphical output.</div><div class=""><br class=""></div><div class="">Is this some quirk of TeX4ht?</div><div class=""><br class=""></div><div class="">
<div>—<br class="">Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;">            </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class="">Mobile (413)-427-5334<br class="">503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;">           </span><br class="">Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;">     </span></div><div class=""><br class=""></div><br class="Apple-interchange-newline">

</div>

<br class=""></div></body></html>