Skip to content

Commit

Permalink
rerendered doc
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed Nov 8, 2024
1 parent a38bd8e commit 7d5e10f
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 282 deletions.
12 changes: 6 additions & 6 deletions docs/clay_book.emmy_viewers.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h2 data-number="3.1" class="anchored" data-anchor-id="usage"><span class="heade
<div class="sourceClojure">
<div class="sourceCode" id="cb2"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>(mafs/of-x e/sin {<span class="at">:color</span> <span class="at">:blue</span>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id8"><script type="application/x-scittle">(reagent.dom/render [(fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__86247 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:color :blue, :y G__86247}])])] (js/document.getElementById "id8"))</script></div>
<div id="id41"><script type="application/x-scittle">(reagent.dom/render [(fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__86798 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:color :blue, :y G__86798}])])] (js/document.getElementById "id41"))</script></div>
</section>
<section id="a-few-detials-behind-the-scenes" class="level2" data-number="3.2">
<h2 data-number="3.2" class="anchored" data-anchor-id="a-few-detials-behind-the-scenes"><span class="header-section-number">3.2</span> A few detials behind the scenes</h2>
Expand All @@ -246,8 +246,8 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="a-few-detials-behind-the-
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb4"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(reagent.core/with-let</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> [G__86251 (js/Function. <span class="st">"y0001"</span> <span class="st">" return Math.sin(y0001);"</span>)]</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> [mafs.plot/OfX {<span class="at">:y</span> G__86251}])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> [G__86802 (js/Function. <span class="st">"y0001"</span> <span class="st">" return Math.sin(y0001);"</span>)]</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> [mafs.plot/OfX {<span class="at">:y</span> G__86802}])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>By default, it is inferred to be of <code>:kind/emmy-viewers</code>, and is handle accordingly.</p>
<p>Equivalently, we could also handle it more explicitly with <code>:kind/reagent</code>:</p>
Expand All @@ -257,7 +257,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="a-few-detials-behind-the-
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> ~(ev/expand (mafs/of-x e/sin)))]</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> {<span class="at">:html/deps</span> [<span class="at">:emmy-viewers</span>]})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id9"><script type="application/x-scittle">(reagent.dom/render [(clojure.core/fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__86255 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:y G__86255}])])] (js/document.getElementById "id9"))</script></div>
<div id="id42"><script type="application/x-scittle">(reagent.dom/render [(clojure.core/fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__86806 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:y G__86806}])])] (js/document.getElementById "id42"))</script></div>
</section>
<section id="more-examples" class="level2" data-number="3.3">
<h2 data-number="3.3" class="anchored" data-anchor-id="more-examples"><span class="header-section-number">3.3</span> More examples</h2>
Expand All @@ -276,7 +276,7 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="more-examples"><span clas
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> (mafs/inequality</span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a> {<span class="at">:y</span> {:&lt;= shifted :&gt; cos} <span class="at">:color</span> <span class="at">:blue</span>}))))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id10"><script type="application/x-scittle">(reagent.dom/render [(fn [] (reagent.core/with-let [G__86265 (reagent.core/atom [0 0])] [mafs.core/Mafs {:height 400} [mafs.coordinates/Cartesian {}] (reagent.core/with-let [G__86266 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;")] [mafs.plot/OfX {:y (clojure.core/let [psym__85946__auto__ (clojure.core/mapv (clojure.core/deref G__86265) [0])] (clojure.core/fn [x__85947__auto__] (G__86266 [x__85947__auto__] psym__85946__auto__)))}]) [mafs.core/MovablePoint {:atom G__86265, :constrain "horizontal"}] (reagent.core/with-let [G__86267 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;") G__86268 (js/Function. "y0001" " return Math.cos(y0001);")] [mafs.plot/Inequality {:y {:<= (clojure.core/let [psym__85946__auto__ (clojure.core/mapv (clojure.core/deref G__86265) [0])] (clojure.core/fn [x__85947__auto__] (G__86267 [x__85947__auto__] psym__85946__auto__))), :> G__86268}, :color :blue}])]))] (js/document.getElementById "id10"))</script></div>
<div id="id43"><script type="application/x-scittle">(reagent.dom/render [(fn [] (reagent.core/with-let [G__86816 (reagent.core/atom [0 0])] [mafs.core/Mafs {:height 400} [mafs.coordinates/Cartesian {}] (reagent.core/with-let [G__86817 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;")] [mafs.plot/OfX {:y (clojure.core/let [psym__84923__auto__ (clojure.core/mapv (clojure.core/deref G__86816) [0])] (clojure.core/fn [x__84924__auto__] (G__86817 [x__84924__auto__] psym__84923__auto__)))}]) [mafs.core/MovablePoint {:atom G__86816, :constrain "horizontal"}] (reagent.core/with-let [G__86818 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;") G__86819 (js/Function. "y0001" " return Math.cos(y0001);")] [mafs.plot/Inequality {:y {:<= (clojure.core/let [psym__84923__auto__ (clojure.core/mapv (clojure.core/deref G__86816) [0])] (clojure.core/fn [x__84924__auto__] (G__86818 [x__84924__auto__] psym__84923__auto__))), :> G__86819}, :color :blue}])]))] (js/document.getElementById "id43"))</script></div>
<p>Try moving the pink mark. 👆</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb7"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>(<span class="bu">defn</span><span class="fu"> my-fn </span>[x]</span>
Expand All @@ -287,7 +287,7 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="more-examples"><span clas
<div class="sourceClojure">
<div class="sourceCode" id="cb8"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>(plot/of-x {<span class="at">:z</span> my-fn <span class="at">:samples</span> <span class="dv">256</span>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id11"><script type="application/x-scittle">(reagent.dom/render [(fn [] [emmy.mathbox.components.plot/Scene (reagent.core/with-let [G__86273 (js/Function. "y0001" " return - Math.pow(Math.cos(y0001), 2.0) + Math.pow(Math.cos(2.0 * y0001), 2.0);")] [emmy.mathbox.components.plot/OfX {:z G__86273, :samples 256}])])] (js/document.getElementById "id11"))</script></div>
<div id="id44"><script type="application/x-scittle">(reagent.dom/render [(fn [] [emmy.mathbox.components.plot/Scene (reagent.core/with-let [G__86824 (js/Function. "y0001" " return - Math.pow(Math.cos(y0001), 2.0) + Math.pow(Math.cos(2.0 * y0001), 2.0);")] [emmy.mathbox.components.plot/OfX {:z G__86824, :samples 256}])])] (js/document.getElementById "id44"))</script></div>
<div style="background-color:grey;height:2px;width:100%;"></div>
<div><pre><small><small>source: <a href="https://github.com/scicloj/clay/blob/main/notebooks/clay_book/emmy_viewers.clj">notebooks/clay_book/emmy_viewers.clj</a></small></small></pre></div>

Expand Down
Loading

0 comments on commit 7d5e10f

Please sign in to comment.