export to doctest format