Issue #295 resolved

Espace % in references

created an issue

It would be usefull to escape '%' chars in references since it's a comment sign in latex. I had this problem when creating references to fortran derived variables such as 'foo%bar'.

Comments (5)

  1. Anonymous

    First, I declare a new description unit for fortran variables in a dedicated directive ::

    def setup(app):
            app.add_description_unit('fvar', 'fvar', indextemplate='pair: %s; Fortran variable', )

    Second, I declare a variable and reference it in my document :

    .. fvar:: aa%bb
    Reference:  :fvar:`aa%bb`

    Html will be built and reference will work. Latex will be built but not the pdf because the '%' is not escaped in hyperef name.

  2. Log in to comment