Y. Pei - 3 months ago 48
Markdown Question

# mathjax processed differently in title and content of posts with Jekyll

I am trying to understand Jekyll.

I'm using Kramdown as the markdown processor.

There is a bizzarre difference in the way mathjax is processed in title and content.

Say I want to write

In the front matters of a post I have to write something like this:

---
title: $$\sqrt x$$
---


But in the content of the post I have to write:

\$$\sqrt x\$$


If I do
\$$\sqrt x\$$
in the title the appearence in the webpage will be mangled.

If I do
$$\sqrt x$$
in the content of the post I'll get single brakets with the literal inside
(\sqrt x)

Why? Can someone explain how strings in these two are treated and why they are treated differently?