Why do I hate it?
Let’s explain it using a meme.
Cast the first stone if you haven’t experience this situation (well maybe without the sirens).
This happens when it comes to any WYSIWYG ,
Microsoft Word and I hate them all.
How could you focus on the content you write when you have to think about formatting all the time?
I know you could setup the formatting beforehand but then you can still break it
when moving an image by a mm.
Unfortunately life is life and sometimes you have to write something in Word. (Thank God I could use LaTeX when writing my thesis!) One of such times could occur when you developed a new feature and you have to describe it in some technical documentation document. It already contains 80 pages of lousy text, and you have to add your pretty paragraph to it. What to do then?
I won’t go too deep into what alternatives do we have. In this post I assume you have your favourite tool for writing, maybe LaTeX, maybe Markdown, maybe something more exotic.
Whatever you have the general gist is to export it to
HTML and then import it in Word.
Let’s start with something simple. Everyone knows Markdown, right? 
I’ve created a simple Markdown document to test how it looks in Word after importing it.
To convert it to
HTML you can use whatever tool you have.
Probably your text editor already has plugins for doing it.
You can also use
pandoc for doing it
pandoc markdown-test.md -o markdown-test.html
or find some
npm library for it
npm install markdown-to-html -g; markdown markdown-test.md > markdown-test.html.
I present the rendered example below.
I will use an example document, which I found on Google.
To insert your rendered file place your cursor in the place where you want to add your part.
First you go into
Text from File… and choose your
My example looks something like this.
The result does not look ideal, for example Strikethrough did not work but apart from this it looks pretty decent.
Just for comparison let’s do the same with a format more advanced than Markdown.
=== H3 * [*] checked * [x] also checked * [ ] not checked * normal list item [qanda] What is the answer?:: This is the answer. Have you seen my duck?:: No. A bold statement!footnote:disclaimer[Opinions are my own.] [cols="1,1"] |=== |Cell in column 1, row 1 |Cell in column 2, row 1 |Cell in column 1, row 2 |Cell in column 2, row 2 |Cell in column 1, row 3 |Cell in column 2, row 3 |===
HTML looks like this.
And after importing it to Word.
It also looks pretty decent, even the footnote worked!
2021-05-31 02:00 +0200