Merge pull request #49 from aisejohan/master

Modify the function convertLaTeX in the following ways:
Fixes #51

Markdown says { and } are special characters (for a really specific use case), hence \{ is the escaped version and it's replaced to {. But MathJax needs \{ the way it is, obviously. At some point MathOverflow had the same issue I think, people had to randomly escape backslashes. Now there is a solution, both in preview and actual output, which assumes that if you type \{ you really mean \{. I'm sorry for the people who intended to use the really specific scenario.

I hope I haven't introduced any parsing bugs. But Markdown and LaTeX are not a match made in heaven, and they will never be one...
Remove test output

In fixing #51 I forgot to remove some temporary output.
Fixed issues with emphasis, and \ref

* Both underscores and asterisks can indidate emphasis in Markdown, neither of them should act that way in math mode.
* \ref tries to fix labels by prefixing the current chapter if possible, but an incomplete file name was used.
Fixed missing escaping in Markdown description
Fixes #52

Now the bibliography is sorted based on the author (and editor) field.
This is an approximation of what bibtex does. Because not all the author
fields have the same format (sometimes it's "firstname lastname") the
result is not perfect. But at least it is less confusing than the
previous result.
Fix bug introduced by previous commit

From the php manual page for <code>usort</code:

Note: This function assigns new keys to the elements in array. It will
remove any existing keys that may have been assigned, rather than just
reordering the keys.

As a consequence the keys (corresponding to the column 'name' in the
database) in our items are scrambled. My solution is to add the 'name'
to the items and then call the function printItem as follows:

printItem($item['name'], $item)

I am sure this is just a dirty hack...
Fixes #53

LaTeX labels are now linking to their corresponding tags.
Merge branch 'master' of github.com:stacks/stacks-website
Fixes #55

This is a rather ugly fix, but it's the only thing that I can think of
right now. The best solution would be to write a true TeX parser, but
this is next to impossible.
Merge branch 'master' of github.com:stacks/stacks-website
Undo the previous commit

See the discussion at #55
Addresses #57

Draft implementation of a comments sidebar
Fixed bad copy paste in sidebar of the about page
Fixes #56

I should've done this so much earlier, it was just a missing else if:
the code would add a second copy of the underscore we were trying to
replace, wreaking havoc on the result. Now it's fine.
Fixes #50

Improved behaviour of chapters on the tag page
Adds `RewriteBase /` to .htaccess
Merge pull request #61 from jcommelin/master

Adds `RewriteBase /` to .htaccess
Ignore the reference environment in LaTeX to HTML conversion

At this point we just ignore the environment, Python is responsible for
inserting the relevant data in the database.
Implemented citations / references on the tag view page

So now we can toggle between a text and a list view.