← Back to team overview

fenics team mailing list archive

raw doc strings + SWIG

 

SWIG turns code like

    %feature("docstring")  dolfin::PeriodicBC "This class . . . "

into

    class PeriodicBC(BoundaryCondition):
        """
        This cla . . .
        """

but we need

    class PeriodicBC(BoundaryCondition):
        r"""
        This cla . . .
        """

(note the 'r'). The 'r' is needed to stop math (Latex) markup getting
screwed up since the backslashes lead to problems. Does anyone know how
to make SWIG insert the 'r'?

Garth