implement reStructuredText directives header and footer