https://github.com/allanchain/nb-tmpl-ctex
Chinese LaTeX/PDF template for Jupyter nbconvert using CTeX
https://github.com/allanchain/nb-tmpl-ctex
chinese ctex jupyter nbconvert
Last synced: about 1 month ago
JSON representation
Chinese LaTeX/PDF template for Jupyter nbconvert using CTeX
- Host: GitHub
- URL: https://github.com/allanchain/nb-tmpl-ctex
- Owner: AllanChain
- License: mit
- Created: 2025-02-05T04:16:16.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-05T10:37:17.000Z (4 months ago)
- Last Synced: 2025-03-25T03:42:01.528Z (about 2 months ago)
- Topics: chinese, ctex, jupyter, nbconvert
- Language: Jinja
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jupyter nbconvert 中文 PDF 模板
Chinese LaTeX/PDF template for Jupyter notebook `nbconvert` using CTeX.
[](https://pypi.org/project/nb-tmpl-ctex)
[](https://pypi.org/project/nb-tmpl-ctex)-----
## 安装
```console
pip install nb-tmpl-ctex
```## 使用
通过 `nbconvert` 调用:
```bash
# 默认 ctexart
jupyter nbconvert example.ipynb --to pdf --template ctex
# 使用 ctexrep
jupyter nbconvert example.ipynb --to pdf --template ctex --template-file report
```如果需要在 Jupyter 网页导出时自动使用 CTeX 模板,需要在 `~/.jupyter/jupyter_nbconvert_config.py` 将 `ctex` 模板设置为默认:
```python
c.LatexExporter.template_name = "ctex"
# c.LatexExporter.template_file = "report"
```## License
`nb-tmpl-ctex` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.