Markdown -> html
Markdownファイルをhtmlに変換する
pandoc test.md -f markdown -t html -o test.html
Latexを含むMarkdownファイルをhtmlに変換する。
pandoc test.md --standalone --mathjax -f markdown -t html -o test.html
--mathjax
のhtmlが必要になるから、--standalone
のオプションも必要になる。
出力されるhtmlの書式を変更したい場合は、テンプレートファイルの使用などを考える
Markdown -> docx
pandoc test.md -f markdown -t docx -o test.docx
References
markdown - MD with Latex to HTML with MathJax with Pandoc - Stack Overflow
Pandocを使ってMarkdownを整形されたHTMLに変換する - Qiita
Pandocテンプレート:デフォルトのやつを使うべきか否か <- pandocのテンプレートの作り方についても少し記載あり。
Pandoc manualのTemplateの説明部分 Pandoc - Pandoc User’s Guide