md

来自bbxwiki
跳转至: 导航搜索

语法介绍

格式转换

基于pandoc转pdf

# install pandoc - http://pandoc.org/installing.html
brew install pandoc
# install latex-min - http://www.tug.org/mactex/morepackages.html
# add /usr/local/texlive/2017basic/bin/x86_64-darwin to the $PATH
# install latex-depends 
sudo ./tlmgr update --self
sudo ./tlmgr install collection-fontsrecommended
sudo ./tlmgr install everypage
sudo ./tlmgr install ucharcat
sudo ./tlmgr install titling
sudo ./tlmgr install lastpage
 
# apply
pandoc -N -s --toc --pdf-engine=xelatex -V CJKmainfont='PingFang SC' -V geometry:margin=1in 1.md 2.md  -o output-pf.pdf
pandoc -N -s --toc --pdf-engine=xelatex -V CJKmainfont='Microsoft YaHei' -V geometry:margin=1in 1.md 2.md  -o output-yh.pdf
 
# apply-2
alias md2pdf-pf="pandoc -N -s --toc --pdf-engine=xelatex -V CJKmainfont='PingFang SC' -V geometry:margin=1in"
alias md2pdf-yh="pandoc -N -s --toc --pdf-engine=xelatex -V CJKmainfont='Microsoft YaHei' -V geometry:margin=1in"
md2pdf-pf 1.md 2.md -o output-pf.pdf
md2pdf-yh 1.md 2.md -o output-yh.pdf

基于pandoc转docx,htm

pandoc 2.md -o x.docx
pandoc 2.md -o x.htm


参见