# The Stacks Project

## Introduction

Markdown is a markup language designed to be intuitive. In a way it tries to mimick what you do if you are writing an email and you're adding emphasis, titles, lists, etc. An example:

This is a [link](http://stacks.columbia.edu). A *little emphasis*, a **lot**.

* list
* list
* list

Some math: $\varphi\colon X\to Y$, see Tag \ref{04FW}.

1. another list
2. list


You can use the preview option (if Javascript is enabled) when writing a comment to check your comment before submit. Or if you use the fullscreen option you can see what your comment will look like in realtime.

## LaTeX and Markdown

Here at the Stacks project we try to merge Markdown and LaTeX for the comments system. You can write mathematics just like you're used in LaTeX, i.e. stuff like $\pi$ and

$$a^2+b^2=c^2$$


just works. This is done using MathJax (so you need to enable Javascript).

## Stacks Flavored Markdown

Inspired by GitHub Flavored Markdown which is an extension of ordinary Markdown by things belonging specifically to GitHub (like referencing commits, users, etc.) we have created Stacks Flavored Markdown, or SFM.

An overview:

1. As discussed before you can use LaTeX-style mathematics the way you are used to.
2. You can refer to tags by using \ref{tag}. So \ref{0001} will automatically be converted to 0001. For this to trigger you just need tag to be a valid tag, it doesn't necessarily have to exist in the database.
3. It is also possible to refer to labels, as used in the Stacks project. This means that \ref{topology-lemma-quasi-compact-closed-point} gets parsed to 005E. And if you write \ref{lemma-quasi-compact-closed-point} (i.e. without a chapter in front of the label) on a comment within the same chapter the system will understand you are referring to a "local" result and act accordingly.

Remark that it is not encouraged to use this type of referencing: tags are stable, labels are not.

Note that not all references to tags can be parsed in preview mode, only references to tags will be parsed in the preview. Others will be read by MathJax which will result in the well known ?? from LaTeX.