A proper fix for issue #16

In essence we withold application of the :latex filter until we
do html generation.
Fixing broken '(missing reference)'
Merge pull request #21 from ashinkarov/master

Proper fix for issue #16