Converts Markdown files into Word documents (.docx) with valantic corporate styling.
- Segoe UI / Segoe UI Semibold typography
- Automatic table of contents via
[TOC] - Header with valantic logo
- Footer with page numbers
- Code blocks, tables, lists, blockquotes
| Markdown | Word |
|---|---|
# Title |
Heading 1 — Segoe UI Semibold 22pt, page break |
## Heading |
Heading 2 — Segoe UI Semibold 16pt |
### Heading |
Heading 3 — Segoe UI Semibold 14pt |
#### Heading |
Heading 4 — Segoe UI Semibold 11pt |
**bold** |
Bold |
`code` |
Consolas inline |
```code``` |
Consolas code block |
- item |
Bullet list |
1. item |
Numbered list |
> quote |
Blockquote with blue border |
| ` | table |
--- |
Horizontal line |
[TOC] |
Table of contents |
npm installnode md2docx.js input.mdThe .docx file is automatically created in the same directory with the same name. Existing files are overwritten.
Optionally, you can specify a custom output path:
node md2docx.js input.md output.docxThe valantic logo (valantic-logo.png) from the project directory is used automatically in the document header.
The document uses the following fonts:
| Font | Usage |
|---|---|
| Segoe UI | Body text |
| Segoe UI Semibold | Headings |
| Consolas | Code blocks and inline code |
The fonts must be installed on the system where the document is opened. Segoe UI is pre-installed on Windows. On macOS or Linux the fonts need to be installed separately. Alternatively, open the document in Word Online — the fonts are available there without local installation.
A complete example Markdown file is available in the examples/ folder. You can use it to see the supported formatting and try out the converter:
node md2docx.js examples/example.mdThe .docx file is automatically created in the same directory with the same name (examples/example.docx).