Is there some good library written in PHP or JavaScript to present articles? It would be cool to have Latex-style syntax or some similar markup language and provide nice looking styles. For example in text:

```
\section{Some section}
\label{sec:label}

This is paragraph~\ref{sec:label}.

```

It would generate HTML code like:

```
<h3>1. Some section</h3>

This is paragraph 1.

```