Friday, May 3, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 529  / 2 Years ago, mon, june 27, 2022, 4:46:47

I need a simple markup that would allow me to include chunks of code and images, and be able to produce .doc (or .rtf) and .pdf documents. A bit (or maybe a lot) like the StackExchange markup, but with conversion to PDF and Word documents. I am producing a lot of documentation for the statistical analyses I am doing, and this documentation is then passed on to scientists who work predominantly with Word. Requirements:




  • basic markup (document structure, bold, italic)

  • chunks of code or preformatted text (syntax highlighting a plus)

  • including external images in the viewer

  • export to PDF and Word DOC/DOCX/RTF (HTML a plus)



I am considering writing a few LaTeX based Perl scripts for myself, but maybe there is software like that already out there?


More From » software-recommendation

 Answers
5

You might want to look at rst (ReStructuredText). This is a markup language much used for python documentation.
There are many tools that can work with rst and convert it into many formats.



One tool is sphinx which can convert to html, latex->pdf, rtf, and man pages.



But there is e.g. also the docutils package, which has tools to convert the rst file into many formats:




  • rst2html

  • rst2xml

  • rst2latex

  • rst2odt

  • rst2s5

  • rst2man



You are most probably interested in rst2latex, which can then be compiled to pdf. Or you can use this software to do this in a single step: rst2pdf.



And you might want to use rst2odt, which produces the libreoffice/openoffice version of a word document which can then be converted by these to doc format.


[#34724] Wednesday, June 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heaco

Total Points: 479
Total Questions: 124
Total Answers: 114

Location: Lesotho
Member since Sat, Oct 1, 2022
2 Years ago
;