PHP or JavaScript presentation library for articles
Is there some good library written in PHP or JavaScript to present articles? It would be cool to have Latex-style syntax or some开发者_JAVA技巧 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.
Use some regex. Make something similar to a BBCode parser or Markdown (as on Stackoverflow).
It sound like you want to use a template engine for this. There are many different template engines for PHP. The most popular is smarty
There are also many others to choose from at this list.
You can use the same system as what GitHub and Stack overflow uses, it's called markdown and it comes in a variety of languages.
you can view information here: http://daringfireball.net/projects/markdown/
and you can download the libraries here http://michelf.com/projects/php-markdown/
精彩评论