Skip to content

Commit

Permalink
Inline math html rendering experiment 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Oct 26, 2023
1 parent 2fdbe21 commit e52aa0d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions MD_metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ header-includes:
- <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
- <script defer src="renderMathInElement( document.body, { delimiters:[ {left:'$$', right:'$$', display:true}, {left:'$', right:'$', display:false} ] } );"> </script>
---
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ header-includes:
- <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
- <script defer src="renderMathInElement( document.body, { delimiters:[ {left:'$$', right:'$$', display:true}, {left:'$', right:'$', display:false} ] } );"> </script>
---
<!-- Do NOT modify this file, it is automatically generated -->
# Curious OCaml
Expand Down
4 changes: 2 additions & 2 deletions chapter1/functional-lecture01.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $$ {{{\frac{\,}{a} \tiny{x}} \atop {\text{\textbar}}} \atop {b}} \text{, \ \ or
{{{\frac{\,}{a} \tiny{x}} \atop {\text{\textbar}}} \atop {c}} $$

match any subtree that derives $b$ (or $c$) and can use $a$ (by assumption
$ \frac{\,}{a} \tiny{x}$) although otherwise $a$ might not be warranted.
$\frac{\,}{a} \tiny{x}$) although otherwise $a$ might not be warranted.
For example:

$$ \frac{\frac{\frac{\frac{\frac{\,}{\text{sunny}} \small{x}}{\text{go
Expand Down Expand Up @@ -216,7 +216,7 @@ type int_string_record = {a: int; b: string}
and create its values: `{a = 7; b = "Mary"}`.
* We access the *fields* of records using the dot notation:

`{a=7; b="Mary"}.b = "Mary"`.Recursive expression $ \text{{\texttt{rec}} } x
`{a=7; b="Mary"}.b = "Mary"`.Recursive expression $\text{{\texttt{rec}} } x
\text{{\texttt{=}}} e$ in the table was cheating: `rec` (usually
called `fix`) cannot appear alone in OCaml! It must be part of a definition.

Expand Down
5 changes: 3 additions & 2 deletions old_lectures_as_book.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ header-includes:
- <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
- <script defer src="renderMathInElement( document.body, { delimiters:[ {left:'$$', right:'$$', display:true}, {left:'$', right:'$', display:false} ] } );"> </script>
---
<!-- Do NOT modify this file, it is automatically generated -->
# Curious OCaml
Expand Down Expand Up @@ -116,7 +117,7 @@ $$ {{{\frac{\,}{a} \tiny{x}} \atop {\text{\textbar}}} \atop {b}} \text{, \ \ or
{{{\frac{\,}{a} \tiny{x}} \atop {\text{\textbar}}} \atop {c}} $$

match any subtree that derives $b$ (or $c$) and can use $a$ (by assumption
$ \frac{\,}{a} \tiny{x}$) although otherwise $a$ might not be warranted.
$\frac{\,}{a} \tiny{x}$) although otherwise $a$ might not be warranted.
For example:

$$ \frac{\frac{\frac{\frac{\frac{\,}{\text{sunny}} \small{x}}{\text{go
Expand Down Expand Up @@ -232,7 +233,7 @@ type int_string_record = {a: int; b: string}
and create its values: `{a = 7; b = "Mary"}`.
* We access the *fields* of records using the dot notation:

`{a=7; b="Mary"}.b = "Mary"`.Recursive expression $ \text{{\texttt{rec}} } x
`{a=7; b="Mary"}.b = "Mary"`.Recursive expression $\text{{\texttt{rec}} } x
\text{{\texttt{=}}} e$ in the table was cheating: `rec` (usually
called `fix`) cannot appear alone in OCaml! It must be part of a definition.

Expand Down
Binary file modified pdfs/new_book.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions site/new_book.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script defer src="renderMathInElement( document.body, { delimiters:[ {left:'$$', right:'$$', display:true}, {left:'$', right:'$', display:false} ] } );"> </script>
</head>
<body>
<header id="title-block-header">
Expand Down
13 changes: 8 additions & 5 deletions site/old_lectures_as_book.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script defer src="renderMathInElement( document.body, { delimiters:[ {left:'$$', right:'$$', display:true}, {left:'$', right:'$', display:false} ] } );"> </script>
</head>
<body>
<header id="title-block-header">
Expand Down Expand Up @@ -401,9 +402,10 @@ <h1 id="in-the-beginning-there-was-logos">1 In the Beginning there was
<p>match any subtree that derives <span
class="math inline"><em>b</em></span> (or <span
class="math inline"><em>c</em></span>) and can use <span
class="math inline"><em>a</em></span> (by assumption $ {x}$) although
otherwise <span class="math inline"><em>a</em></span> might not be
warranted. For example:</p>
class="math inline"><em>a</em></span> (by assumption <span
class="math inline">$\frac{\,}{a} \tiny{x}$</span>) although otherwise
<span class="math inline"><em>a</em></span> might not be warranted. For
example:</p>
<p><span class="math display">$$
\frac{\frac{\frac{\frac{\frac{\,}{\text{sunny}} \small{x}}{\text{go
outdoor}}}{\text{playing}}}{\text{happy}}}{\text{sunny} \rightarrow
Expand Down Expand Up @@ -582,8 +584,9 @@ <h2 id="definitions">3.1 Definitions</h2>
class="sourceCode ocaml"><code class="sourceCode ocaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> int_string_record = {a: <span class="dt">int</span>; b: <span class="dt">string</span>}</span></code></pre></div>
<p>and create its values: <code>{a = 7; b = "Mary"}</code>. * We access
the <em>fields</em> of records using the dot notation:</p>
<p><code>{a=7; b="Mary"}.b = "Mary"</code>.Recursive expression $ x e$
in the table was cheating: <code>rec</code> (usually called
<p><code>{a=7; b="Mary"}.b = "Mary"</code>.Recursive expression <span
class="math inline">$\text{{\texttt{rec}} } x \text{{\texttt{=}}}
e$</span> in the table was cheating: <code>rec</code> (usually called
<code>fix</code>) cannot appear alone in OCaml! It must be part of a
definition.</p>
<p><strong>Definitions for expressions</strong> are introduced by rules
Expand Down

0 comments on commit e52aa0d

Please sign in to comment.