Want to be notified of new releases in metanorma/reverse_asciidoctor?
result.inspect # " *feelings* "
In addition, the bin/w2a script (adapted from the bin/w2m script in Ben Balter’s word-to-markdown) extracts HTML from Word docx documents, and converts it to Asciidoc.
The script presumes that LibreOffice has already been installed: it uses LibreOffice’s export to XHTML. LibreOffice’s export of XHTML is superior to the native Microsoft Word export to HTML: it exports lists (which Word keeps as paragraphs), and it exports OOMML into MathML. On the other hand, the LibreOffice export relies on default styling being used in the document, and it may not cope with ordered lists or headings with customised appearance. For best results, reset the styles in the document you’re converting to those in the default Normal.dot template.
Note that some information in OOMML is not preserved in the export to MathML from LibreOffice; in particular, font shifts such as double-struck fonts.
Note that the LibreOffice exporter does seem to drop some text (possibly associated with MathML); use with caution.
As with reverse_markdown, pre is only treated as sourcecode if it is contained in a div@class = highlight- element, or has a @brush attribute naming the language (Confluence).
It also supports MathML…​ sort of.
Asciidoctor supports AsciiMath and LaTeX for stem expressions. HTML uses MathML. The gem will recognise MathML expressions in HTML, and will wrap them in Asciidoctor \$ \$ macros. The result of this gem is not actually legal Asciidoctor for stem: Asciidoctor will presumably think this is AsciiMath in the \$ \$ macro, try to pass it into MathJax as AsciiMath, and fail. But of course, MathJax has no problem with MathML, and some postprocessing on the Asciidoctor output can ensure that the MathML is treated by MathJax (or whatever else uses the output) as such; so this is still much better than nothing for stem processing.
On the other hand, if you are using this gem in the context of Metanorma, Metanorma Asciidoctor accepts MathML as a native mathematical format. So you do not need to convert the MathML to AsciiMath.
The gem will optionally invoke the https://github.com/metanorma/mathml2asciimath gem, to convert MathML to AsciiMath. The conversion is not perfect, and will need to be post-edited; but it’s a lot better than nothing.
' ' - Add whitespace if there is none at tag borders.
'' - Do not not add whitespace.
Just pass your chosen configuration options in after the input. The given options will last for this operation only.
Or configure it block style on a initializer level. These configurations will last for all conversions until they are set to something different.