Adds column "reference" to tags table

Adds column "reference" to tags table, for the content of the reference
environment.

Signed-off-by: Johan Commelin <j.m.commelin@gmail.com>
Adds table "citations" to database

The table "citations" will contain the data of \cite commands in reference
environments. It has three columns (tag, bibkey, loc). An entry \cite[foo]{bar}
in a lemma with tag XYZW should give entry ("XYZW", "bar", "foo").

Signed-off-by: Johan Commelin <j.m.commelin@gmail.com>
Adds citations.sql to create.py

Signed-off-by: Johan Commelin <j.m.commelin@gmail.com>
Adds update queries for references to tags/tex.py

Adds reference environments to the parsing logic in tags/tex.py
Adds function for inserting/updating the reference text to the tags table
Adds function for extracting \cite commands and adding the content to the
citations table

Signed-off-by: Johan Commelin <j.m.commelin@gmail.com>
Adds "import re" to tags/tex.py

Forgot to import re in tags/tex.py
We need it to efficiently extract \cite commands from a reference

Signed-off-by: Johan Commelin <j.m.commelin@gmail.com>
Changes column names of "citations" table

Changes column names of "citations" table to names that are already in use or
that better describe the meaning of the column.

Signed-off-by: Johan Commelin <j.m.commelin@gmail.com>
Add a readme file
Make checks/parse.py aware of reference environments

It seems that this one line change is all that is needed.
Fixes copy-pasto on line 322
Initialises in_reference to 0 in tags/tex.py

Forgot to initialise the in_reference variable in tags/tex.py
Fixes regex for extracting \cite commands

The regex no longer requires the optional [a] to be present in \cite[a]{B}.
Simplifies regex for extracting \cite commands
Another fix of the regex
Merge pull request #4 from jcommelin/master

Fixes install script

Tested by Johan de Jong
Fixes several issues with the first draft of the references import

* two syntax errors
* remove \begin and \end of the reference
* singleton tuples require a different syntax
Tracking a change in order of chapters
Enables references for list_of_labeled_envs
Adds clearing of references (and script comments on changed references)
Added an index on 'label' in the table 'tags'

This is responsible for a 15x speedup on the heaviest tag view page.
Also adapted the database creation script to accomodate for the multiple
commands in a single file.
Merge remote-tracking branches 'origin/references' and 'jmc/references'

Merging minimal infrastructure changes necessary to be able to deal
with references in the stacks poject and its website