Markdown制作PPT最佳实践
一、reveal.js + pandoc(推荐)
- HTML便于CSS样式修改
- 多种Theme主题,灵活,简洁
- 可整合多种第三方js如highlight.js等
- 可导出pdf文档
HTML slide shows:
pandoc -s --mathjax -i -t revealjs SLIDES -o example16d.html
pandoc -s --mathml -i -t dzslides SLIDES -o example16a.html
pandoc -s --webtex -i -t slidy SLIDES -o example16b.html
如何为html添加缺失的reveal.js
## https://github.com/anasinc/getsite
## 获取revealjs目录,复制到ppt同级目录中即可
./getsite.sh http://pandoc.org/demo/example16d.html
二、Revel.js模板定制
参考项目:https://github.com/yanping/reveal.js-with-pandoc
三、pandoc + Beamer slide show
pandoc -t beamer --latex-engine=xelatex README.md -o readppt.pdf -V mainfont="文泉驿微米黑"
其他方式
nodeppt
https://github.com/ksky521/nodeppt/
landslide
https://github.com/adamzap/landslide
Generate HTML5 slideshows from markdown, ReST, or textile
md转ppt的shell脚本实现
#!/bin/sh
if [ $# -eq 0 ] ##判断参数是否存在
then
echo "请输入正确格式,如:./genpdf.sh <srcfile> <buildname>"
echo "例如:./genpdf.sh README.md readme"
exit ##不存在退出
fi
if [ x$1 = x ] ##判断参数1是否存在
then
echo "请输入正确格式,如:./genpdf.sh <srcfile> <buildname>"
echo "例如:./genpdf.sh README.md readme"
exit ##不存在退出
fi
if [ x$2 = x ] ##判断参数2是否存在
then
echo "请输入正确格式,如:./genpdf.sh <srcfile> <buildname>"
echo "例如:./genpdf.sh README.md readme"
exit ##不存在退出
fi
srcfile=$1
buildname=$2
pandoc -s --mathjax -i -t revealjs ${srcfile} -o build/ppt/${buildname}.html
作者:ryanemax
微信关注:ryanemax (刘雨飏)
本文出处:https://romantic-hoover-f991f1.netlify.com/study/markdown2ppt/
授权协议:
CC BY-SA 4.0