.doc(x) to .md file conversion
This is the source page doc2md.docx which the conversion process is supposed to convert into doc2md.md.
This page works through the various requirements, one at a time. Various Astro techniques may be employed, including the possibility of .md and .mdx. To facilitate this development doc2md-md.md and doc2md-mdx.mdx are developed in parallel. If possible, MD will be preferable to MDX. MDX throws syntax errors on all sorts of innocuous-looking strings.
We need to be able to convert .doc and .docx files from my documentation store to .md(x) for Astro content creation.
We need a utility that will do the conversion automatically file by file. I don’t think we’ll ever need a block converter.
Various schemes have been tried:
-
pandoc. Very popular. Can’t cope with my paragraph style. Might be worth experimenting with md format options
-
Mammoth. Doesn’t seem to be configurable. Can’t cope with my paragraph style
This is a two column list of external links, to other documentation files in my store and web URLs.
Markdown can’t cope with columns, but this HTML works in Astro MD.
ncvp website
astro-test home page
astro-test blog
ncvp.me/echo
Contents
What has to work
Tables
Images
Paragraphs
What has to work
-
My sort of paragraph. See Paragraphs
-
Internal anchors and links
-
Tables. See Tables
-
Images. See Images
-
Columns
Markdown tables have to have a header by default:
| Feature | Status | Notes |
|---|---|---|
| Astro Layouts | Working | Using @layouts alias |
| Styles | Scoped | Testing specificity |
| Indentation | 2 Spaces | Configured in VS Code |
But putting them in this sort of <div> removes it, in conjunction with CSS in astro-test.css:
| 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel massa tincidunt, aliquam elit id, venenatis tellus. |
| 2 | Nunc molestie mauris et magna placerat tempus. |
| 3 | Phasellus sodales dolor enim, vel eleifend ante facilisis semper. |
| 4 | Integer vel dictum orci. |
| 5 | Praesent cursus ligula vel nisi rutrum, sit amet mollis tortor euismod. |
| 42 | Duis sollicitudin elit sit amet quam dictum congue. |
See astro-test Textflow for more images with Fancybox effect.
This is my sort of paragraph which is proving so difficult to convert from .doc(x):
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nunc vel massa tincidunt, aliquam elit id, venenatis tellus.
Nunc molestie mauris et magna placerat tempus.
Phasellus sodales dolor enim, vel eleifend ante facilisis semper.
Integer vel dictum orci.
Praesent cursus ligula vel nisi rutrum, sit amet mollis tortor euismod.
Duis sollicitudin elit sit amet quam dictum congue.