[Markdown] Markdown to HTML/MS Word by Pandoc

[Markdown] Markdown to HTML/MS Word by Pandoc

Goal

  • To covert Markdown file to HTML or MS Word file by using Pandoc


Introduce

  • Pandoc is a universal document convert
  • Pandoc can convert documents in (several dialects of) Markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, TWiki markup, TikiWiki markup, DokuWiki markup, Creole 1.0, Vimwiki markup, roff man, OPML, Emacs Org-Mode, Emacs Muse, txt2tags, Microsoft Word docx, LibreOffice ODT, EPUB, Jupyter notebooks ipynb, or Haddock markup to HTML, Word processor formats, Ebooks, PDF, etc


Practice

1. Install Pandoc

  • Install Pandoc using Hemebrew
$ sudo brew install pandoc

screenshot001


2. Convert Markdown to HTML/Word

  • Convert Markdown file to HTML and MS Word files using pandoc
  • Pandoc options
    • -f [FORMAT] : From. The format of source file
    • -t [FORMAT] : To. The format of output file being converted
    • -s : Standalone
    • -o [FILE]: Name of output file
    • –log=[FILE] : Write log messages in machine-readable JSON format to FILE
$ pandoc -f [FORMAT] -t [FORMAT] -s -o [OUTPUT_FILE]

screenshot002

  • Results

screenshot003

screenshot004



References

댓글남기기

-->