Print directives

Refactoring and new content from Archimag.

Issues in current code:
1. Stylistic, packages and error control: in FIXME comments
2. It is impossible to redefine directive syntax - and error is raised.