提交 78072bf4 编写于 作者: Y Yifan Wu

Add pdf guide

上级 99ca7fe7
......@@ -17,3 +17,16 @@
1. ``pip install autoload`` 安装 Sphinx 自动加载插件。
2. 在项目根目录下 ``sphinx-autobuild source build/html`` 即可在浏览器中访问 `http://127.0.0.1:8000/` 查看本地构建的主页。
.. note::
**如何生成教程pdf电子版**
注意:经过尝试在 wsl 环境下无法生成 pdf ,请使用原生的 Ubuntu Desktop 或者虚拟机。
1. 首先 ``sudo apt update`` ,然后通过 ``sudo apt install`` 安装如下软件包: latexmk texlive-latex-recommended texlive-latex-extra texlive-xetex fonts-freefont-otf texlive-fonts-recommended texlive-lang-chinese tex-gyre.
2. 从 Node.js 官方网站下载最新版的 Node.js ,配置好环境变量并通过 ``npm --version`` 确认配置正确。然后通过 ``npm install -g @mermaid-js/mermaid-cli`` 安装 mermaid 命令行工具。
3. 确认 Python 环境配置正确,也即 ``make html`` 可以正常生成 html 。
4. 打上必要的补丁:在根目录下执行 ``git apply --reject scripts/latexpdf.patch`` 。
5. 构建:在根目录下执行 ``make latexpdf`` ,过程中会有很多 latex 的警告,但可以忽略。
6. 构建结束后,电子版 pdf 可以在 ``build/latex/rcore-tutorial-book-v3.pdf`` 找到。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册