Exporting hooks for ifdef support and sorting references in both latex and html