gallery: Fix latex references
Merge pull request #612 from jesperpedersen/gallery_fix

gallery: Fix latex references