use
- pandoc2.x(use docker)
- pandbook (use docker)
- bookdown (R)
Pandoc Markdown 文档方案,to docx, html, pdf
make docx(pdf) f=xx
- mindoc 通过 pandoc 导出方案
- make work-pdf, work-html
- make book
sh run-docker.sh cd source make book
- make latex,注意风格
- book, 书籍风格
- article, 文档
- latex, 需指定 LATEX_CLASS = book # report, article, book,
- memoir 有问题
- make article
- make docx_code
- make html_re(html_github)
- make reveal(reveal2)
- 中文 pandoc
- demo/pandoc
- demo/git-book, use docker one/pandoc
- 最完美的 BOOK 方案
- PanBook,Pandoc LaTeX,Epub 模板,用于生成书籍,幻灯片(beamer),简历,论文等(cv, thesis, ebook, beamer),pdf 效果可比印刷
- 参考 PanBook-Demo 网上示例项目
docker run \ --rm -it \ -v ${PWD}/:/data \ one/panbook # in container cd article make
- reveal.md
- use phantomjs and price, create html,pdf book
- cssprint-sample's github
- use han.js
- from html to pdf
- demo/cssprint
- ? 没有提供 markdown 格式文档,只能编辑 html
- git book, use
rake
,price
create pdf - distsysbook, 比较简洁
- bookdown, 应该是编写技术文档最强的方案
- ./sdcamp, use docker, 安装参考 (https://github.com/larrycai/sdcamp)
- ./mmd2bok
- use pandoc
cd contents make pdf
- ls.md 毛泽东、邓小平重大过错与决策失误
- geek 摄影小白
- add bookdown,mac install R v4.3.3
- bookdown, error
Library not loaded: '/opt/X11/lib/libSM.6.dylib'
,installbrew install xquartz --cask
- ./bookdown,暂时取消 search,使用了 fuse.js,但从默认的 cdn 下载不下来
- run
make 2e
create html
- bookdown, error
- add pandoc-latex-template Eisvogel template
- use
make eisvogel
- use
- 中文字体,
-V CJKmainfont=$(mainfont) \
- make book-usefont
- make ls
- md2pdf,取消
--template=$template_home/default.latex
- my2.tex 目录后增加分页
-
my2.tex 取消水纹,docker 没有安装
-
use LXGW WenKai/霞鹜文楷
- in docker container, use
fc-list :lang=zh-cn
show font name - font
mainfont="LXGWWenKai-Regular.ttf" sansfont="LXGWWenKai-Light.ttf" monofont="LXGWWenKai-Light.ttf" ``` - make md22pdf f=demo/ls.md
- in docker container, use
- znd
make znd f=demo/znd/znd-01.md
- ThinkPython2-CN
-
- writing_solid_python_code_gitbook
use ebook, no gitbook
sh run-docker.sh cd /source/ebook sh mmd2bok
- writing_solid_python_code_gitbook
use ebook, no gitbook
-
one/pandoc:2.x, 中文字体采用
Songti TC
,也可以动态加载字体 run-docker.sh-v ${PWD}/font/Songti.ttc:/usr/share/fonts/Songti.ttc \
-
A clean pandoc LaTeX template to convert your markdown files to PDF or LaTeX. It is designed for lecture notes and exercises with a focus on computer science. The template is compatible with pandoc 2.
感觉这个比较强
-
add jgm templates
- ./jgm-templates
-
latex 打水印, templates/my2.tex
-
markdown css
- han.css
- markdownhere.css, 李笑来提供,可以用于 chrome 插件
-
sdcamp
\lstset{ %language=C++, basicstyle=\small\ttfamily, numbers=left, numbersep=5pt, xleftmargin=20pt, frame=tb, framexleftmargin=20pt, keywordstyle=\color{blue} }
多层缩进会出现
\begin{lstlisting}[language=```python]
,采用替换脚本find ./chapters.tex -type f -exec sed -i 's/```//g' {} \;
-
demo/git-book
- rake, prince
- relaxedjs
- install Chromium, edit .npmrc,
puppeteer_download_host=https://npm.taobao.org/mirrors
- install
npm i -g relaxedjs
- 可以采用 docker 方案,
one/relaxedjs:node10-stable
- use
- create alias
alias relaxed-docker="docker run -it --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) --name relaxed one/relaxedjs:node10-stable $@"
- goto examples dir
relaxed-docker book.pug
- 主要解决 html 演示文档,其他支持的格式不多
- install Chromium, edit .npmrc,
-
demo/academic_test.txt
, 采用引用make html_github demo/academic_test.txt
-
TeX to markdown
pandoc -s --bibliography "/home/sd44/xueshu/dingjia/ref/refs.bib" --filter pandoc-citeproc --csl "/home/sd44/.cls/chinese-gb7714-2005-numeric.csl" --metadata link-citations=true --metadata reference-section-title="参考文献" test.tex -o test.md
- Pandoc-Goodies
- run,
make html_github f=demo/my.md
-
use
sh run-docker.sh cd source make html_github f=demo/xx.md
-
取消
PingFang
字体 -
中文字体 -
WenQuanYi Zen Hei
- zhhei -AR PL UMing CN
- zhsong -AR PL UKai CN
- zhkai
demo/pandoc-ebook
-
brew intall multimarkdown
-
保持原有 文鼎PL简报宋 字体
``` \setromanfont[Mapping=tex-text,BoldFont=WenQuanYi Micro Hei]{AR PL SungtiL GB} ```
sudo tlmgr install collection-fontsrecommended
brew install fontconfig
fc-list :lang=zh-cn
- 参考
make md22pdf f=demo/pandoc.md
效果一般
- 仿 pandoc 文档
- demo/devs
- github
- demo/ieee-pandoc-template
- 支持中文,专门设置
-V CJKmainfont=SimSun
- github
- demo/pandoc-academic-publication
download `https://www.ctan.org/pkg/ieeetran?lang=en`
unzip
sudo cp -R ./IEEEtran /usr/local/texlive/2017basic/texmf-dist/tex/latex
# 更新模板
sudo texhash
暂时不知道怎么进行 pandoc 处理
sudo tlmgl install thuthesis, ctex, environ, trimspaces, zhnumber, newtx, fontaxes, enumitem, cjk-ko, cjk, ntheorem, notoccite
没成功
sudo tlmgr install cjkpunct, algorithmicx, algorithms, boondox
run: sh artratex.sh xa
几套模版
-
docker run
docker run \ -v ${PWD}:/resume \ there4/markdown-resume \ md2resume html demo/markdown-resume/sample.md out/
- pdf 有点问题,暂时采用进入 docker 容器
xvfb-run md2resume pdf demo/markdown-resume/sample.md out/
-
pdf 中文有问题
-
--latex-engine has been removed. Use --pdf-engine instead
是 pandoc 升级到 2.2 后发生的问题
-
sudo tlmgr update --self --all
, 提示升级 2018tlmgr: Remote repository is newer than local (2017 < 2018) Cross release updates are only supported with update-tlmgr-latest(.sh/.exe) --update Please see https://tug.org/texlive/upgrade.html for details.
误删除,只能重新安装 2018 版
- github
- word 模版, demo/nudt/word
解决重庆论文中文字体问题
ls.md
自动增加回车行 awk '{print $0 "\n"}' ls.md>ls2.md
demo/pandoc
- 提供 html
- 提供 latex to pdf, 需安装
sudo tlmgr install titling
sudo tlmgr install lastpage
# tlmgr update --self --repository http://mirrors.aliyun.com/CTAN/systems/texlive/tlnet/
# tlmgr update --all --repository http://mirrors.aliyun.com/CTAN/systems/texlive/tlnet/
brew install fontconfig
use
fc-list :lang=zh-cn
or
fc-list :outline -f "%{family}\n"
demo/phd_thesis_markdown, 可以用
- mszep pandoc resume
demo/mszep.pandoc-templates
make resumepdf
make resumehtml
中文字体问题解决
\usemodule[simplefonts]
\setupsimplefonts[size=11pt]
\setcjkmainfont[AdobeSongStd][regularfont={* Light},italicfont={AdobeKaitiStd Regular},boldfont={AdobeHeitiStd Regular},bolditalicfont={AdobeHeitiStd Regular}]
\setcjksansfont[AdobeKaitiStd][boldfont={AdobeHeitiStd Regular},bolditalicfont={AdobeHeitiStd Regular}]
\setcjkmonofont[SimFang][boldfont={AdobeHeitiStd Regular},bolditalicfont={AdobeHeitiStd Regular}]
% 启用中文断行
\setscript[hanzi]
...
\setupbodyfont[11pt, AdobeHeitiStd]
install context
-
install basicTex,install dir:
cd /usr/local/texlive/2017basic/
-
install
sudo tlmgr update --self --all ## install context sudo tlmgr install collection-context
-
字体
-
Adobe 的四款字体(AdobeFangsongStd-Regular.otf AdobeHeitiStd-Regular.otf AdobeKaitiStd-Regular.otf AdobeSongStd-Light.otf)
-
luatools --generate
-
?
export OSFONTDIR=/Library/Fonts:/System/Library/Fonts:~/Library/Fonts
2017.06.09
-
templates/code.docx
docx_code:${f}
pandoc -r markdown -w docx -s -S --csl=csl/chicago-author-date.csl --reference-docx=templates/code.docx ${f} --output=out/out.docx
pandoc-LaTeX.docx or bysj.latex
latex_bysj:
pandoc $(TOC) $(TITLE) $(CHAPTERS) --latex-engine=xelatex \
-o out/latex.pdf\
--template=templates/bysj.latex
pandoc 默认幻灯片
letter demo/letter
make html_mark f=xx
另外的方式是通过reference.docx
设计分页,还没测试
pandoc -s -r html http://www.gnu.org/software/make/ -o example12.text
https://github.com/geekcompany/ResumeSample.git
https://github.com/geekcompany/DeerResume.git
sed -i '' 's/<table>/<table class="table table-bordered table-condensed">/' out/out.html
make docx_base f=xxx
brew install pandoc-crossref
demo/workflow-paper
增加 docx, html 输出
templates/reference.docx
docx 样式主要通过 reference 控制
cd sdcamp
./mmd2bok
另一个 html 样式
make html_md f=xx
左侧带大纲菜单
make html_yi f=xx
不指定文件,需更改文件配置
make latex
可以生成效果不错的排版书
make epub f=xx
make bootstrap f=xx
error:
! Undefined control sequence.
l.196 \tightlist
pandoc: Error producing PDF from TeX source
解决, mytemplate.tex
\newcommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}