copied some files from the pandoc library so that the docx writer can be hacked with some custom mods