💾 Archived View for tommi.space › Pandoc.gmi captured on 2023-06-14 at 14:16:17. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Cheat sheet

Convert a Word file into a Markdown file, following the CommonMark standard

CommonMark

pandoc -f docx -t commonmark --wrap=none -o ~/Desktop/output.md ~/Desktop/input.docx

Convert multiple Word files in a folder in a standalone Markdown file

pandoc *.docx -f docx -t commonmark --wrap=none -s -o ~/Desktop/output.md
pandoc *.md -f commonmark -t odt -s -o ~/Desktop/output.odt

<div class='box'>
    Replace <code>commonmark</code> with <code>commonmark_x</code> to have more features. See the <a href='https://pandoc.org/MANUAL.html#markdown-variants' target='_blank' title='Markdown variants — Pandoc User’s Guide'>list of supported markdown variants</a>.
</div>

convert all files in a folder

for f in *.docx; do pandoc "$f" -f docx -t commonmark --wrap=none -s -o "$f".md; done

![[Academic writing with Pandoc]]

To learn