Skip to content

Commit e684ab4

Browse files
committed
math
1 parent 1332375 commit e684ab4

File tree

2 files changed

+78
-8
lines changed

2 files changed

+78
-8
lines changed

_pages/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ redirect_from:
1313

1414
## About Me
1515

16-
The world of quantum mechanics is often depicted as a bizarre and counterintuitive place. Particles existing in multiple states simultaneously (\\|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\\), spooky action at a distance – it all sounds like science fiction. But here’s the thing: quantum mechanics isn’t some fringe theory. It’s the undeniably successful framework that underpins the behavior of the universe at its most fundamental level.
16+
The world of quantum mechanics is often depicted as a bizarre and counterintuitive place. Particles existing in multiple states simultaneously (\\|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\), spooky action at a distance – it all sounds like science fiction. But here’s the thing: quantum mechanics isn’t some fringe theory. It’s the undeniably successful framework that underpins the behavior of the universe at its most fundamental level.
1717

1818
My passion lies in demystifying this "weirdness" and translating it into powerful, real-world applications. I believe that by embracing concepts like **superposition**, **wave-particle duality**, and **entanglement**, we can unlock a new era of technological innovation. My work focuses on the intersection of quantum computing and artificial intelligence, exploring how quantum algorithms can solve problems currently intractable for even the most powerful classical supercomputers.
1919

_teaching/2014-spring-teaching-1.md

Lines changed: 77 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,83 @@ date: 2014-01-01
88
location: "City, Country"
99
---
1010

11-
This is a description of a teaching experience. You can use markdown like any other post.
11+
Great observation, Raye — this is a **common gotcha** when working with LaTeX math in Markdown across different GitHub environments.
1212

13-
Heading 1
14-
======
13+
---
14+
15+
## ✅ TL;DR: Why it works in GitHub *preview* but not on GitHub Pages (`github.io`)
16+
17+
GitHub supports `$$...$$` and `\(...\)` inline in its **repository Markdown preview** (like in `README.md`) using built-in rendering.
18+
19+
But **GitHub Pages (`username.github.io`) does *not* support LaTeX math out of the box**. You need to **enable MathJax manually** in your Jekyll-based site.
20+
21+
---
22+
23+
## ✅ How to Fix It on `github.io` (Enable MathJax)
24+
25+
To render LaTeX properly on GitHub Pages, follow these steps:
26+
27+
---
28+
29+
### 🔧 1. Add MathJax to your `_config.yml` (if using Jekyll)
30+
31+
```yaml
32+
markdown: kramdown
33+
kramdown:
34+
math_engine: mathjax
35+
input: GFM
36+
```
37+
38+
---
39+
40+
### 🔧 2. Insert MathJax script into your HTML layout
41+
42+
In your main layout (e.g., `_layouts/default.html`), add this in `<head>` or before the closing `</body>` tag:
43+
44+
```html
45+
<script type="text/javascript" async
46+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
47+
</script>
48+
```
49+
50+
If you're using **a static `README.md`** for a GitHub Pages home page (without Jekyll), insert this manually at the bottom of your Markdown:
51+
52+
```html
53+
<script type="text/javascript" async
54+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
55+
</script>
56+
```
1557

16-
Heading 2
17-
======
58+
---
59+
60+
### ✅ 3. Then, use `$$ ... $$` for block equations:
61+
62+
63+
$$
64+
|\psi\rangle = \alpha |0\rangle + \beta |1\rangle
65+
$$
66+
67+
68+
Or inline math with `\( ... \)`:
69+
70+
71+
This is a quantum state: \( |\psi\rangle = \alpha |0\rangle + \beta |1\rangle \)
72+
73+
74+
---
75+
76+
### Example Live Usage (Markdown with MathJax):
77+
78+
79+
## Quantum State
80+
81+
$$
82+
|\psi\rangle = \alpha |0\rangle + \beta |1\rangle
83+
$$
84+
85+
> In this expression, \(\alpha\) and \(\beta\) are complex amplitudes such that \(|\alpha|^2 + |\beta|^2 = 1\).
86+
87+
88+
---
1889

19-
Heading 3
20-
======
90+
Let me know your site structure (`Jekyll`, `custom HTML`, `pure Markdown`, etc.), and I can give you a copy-paste-ready solution for your specific case.

0 commit comments

Comments
 (0)