gallery: Fix latex references