Skip to content

Commit 1a3aa0a

Browse files
committed
Add ring / asterisk / circled-times operators and math-symbol samples
- \circ (U+2218): reuses the ring contours extracted from Å (same hand-drawn shape used as a diacritic above å/ů), recentred on the math axis. - \ast (U+2217): asterisk outlines translated down to the math axis. - \otimes (U+2297): hand-drawn from the 2034 equations comic via extras/2034_equations_2x__circled_times.png. - Use createChar(cp, name) instead of createMappedChar(cp) when adding Unicode-mapped glyphs in pt6 — createMappedChar leaves unicode=-1 in the SFD and the OTF cmap omits the codepoint (which is why \cdot had been silently falling back to MJXTEX since it was introduced). - Samples: align-eqref (AMS align + tag + eqref, opts into the [tex]/ams package via its `mathjax:` block) and math-symbols-zoo (binops / relations / arrows / delimiters / logic / misc reference).
1 parent 6d779ab commit 1a3aa0a

14 files changed

Lines changed: 35 additions & 4 deletions
265 Bytes
Loading
9.11 KB
Loading
101 Bytes
Loading
-192 Bytes
Loading
32 Bytes
Loading

xkcd-script/samples/mathjax3/formulas.yaml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ deeply-nested-sqrt:
7878
formulas:
7979
- tex: '$$\sqrt{\frac{b^2}{\frac{b^2}{\frac{b^2}{\frac{b^2}{4ac}}}}}$$'
8080

81-
sqrt-pi-short:
82-
formulas:
83-
- tex: '$\sqrt{\pi}$'
84-
8581
piecewise-single:
8682
formulas:
8783
- tex: '$$y = \begin{cases} x & \text{if } x > 0 \end{cases}$$'
@@ -161,6 +157,7 @@ sqrt-digit-radicand:
161157
cellHeight: 80
162158
cellWidth: 280
163159
formulas:
160+
- tex: '$\sqrt{\pi}$'
164161
- tex: '$\sqrt{5}$'
165162
- tex: '$\sqrt{2}$'
166163
- tex: '$\sqrt{1-x^2}$'
@@ -179,3 +176,37 @@ maxwell-equations:
179176
ramanujan-identity:
180177
formulas:
181178
- tex: '$$\frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = 1 + \frac{e^{-2\pi}}{1 + \frac{e^{-4\pi}}{1 + \frac{e^{-6\pi}}{1 + \frac{e^{-8\pi}}{1 + \cdots}}}}$$'
179+
180+
# Exercises the AMS `align` environment with multi-column alignment
181+
# (`& = … &&`), \tag/\label/\eqref cross-references, and the new math
182+
# operators \circ (U+2218) and `*` / \ast (U+2217).
183+
align-eqref:
184+
mathjax: { packages: [ams], tags: ams }
185+
formulas:
186+
- tex: |
187+
$$\begin{align}
188+
y_1 + y_2 &= z \tag{$\star$} \label{ref1} \\
189+
y' \circ y^* &= w \tag{$\dagger$} \label{ref3}
190+
\end{align}$$
191+
192+
$$\begin{align}
193+
x & = y_1 - y_2 + y_3 - y_5 + y_8 - \dots && \text{by \eqref{ref1}} \\
194+
& = y' \circ y^* && \text{(by \eqref{ref3})} \\
195+
& = y(0)\, y' && \text{by Axiom 1.}
196+
\end{align}$$
197+
198+
# A reference grid of math operators, relations, arrows, delimiters,
199+
# logic, and miscellaneous symbols that realistically appear in TeX
200+
# equations. Useful both as a visual reference for what xkcd-script
201+
# covers and as a gap-finder — any cell that renders as a fallback
202+
# (Times-style) glyph or a `.notdef` box points at a missing codepoint.
203+
math-symbols-zoo:
204+
cellHeight: 64
205+
cellWidth: 700
206+
formulas:
207+
- tex: 'Binary ops: $+\ -\ \pm\ \mp\ \times\ \div\ \cdot\ \ast\ \circ\ \bullet\ \oplus\ \ominus\ \otimes\ \odot\ \cap\ \cup$'
208+
- tex: 'Relations: $=\ \neq\ <\ >\ \leq\ \geq\ \ll\ \gg\ \approx\ \equiv\ \sim\ \simeq\ \propto\ \in\ \notin\ \subset\ \subseteq$'
209+
- tex: 'Arrows: $\to\ \gets\ \rightarrow\ \leftarrow\ \Rightarrow\ \Leftarrow\ \Leftrightarrow\ \mapsto\ \uparrow\ \downarrow$'
210+
- tex: 'Delimiters: $(\ )\ [\ ]\ \{\ \}\ \langle\ \rangle\ |\ \|\ \lfloor\ \rfloor\ \lceil\ \rceil$'
211+
- tex: 'Logic / set: $\land\ \lor\ \lnot\ \implies\ \iff\ \forall\ \exists\ \emptyset\ \in\ \subset\ \cup\ \cap$'
212+
- tex: 'Misc: $\infty\ \nabla\ \partial\ \aleph\ \hbar\ \ell\ \Re\ \Im\ \wp\ \prime\ \dagger\ \ddagger\ \star\ \angle$'
65.6 KB
Loading
-96 Bytes
Loading
212 Bytes
Loading
349 Bytes
Loading

0 commit comments

Comments
 (0)