Fixed up std and str generation and line breaks in the custom docx writer.