1
0
Files
bagu-thesis/pandoc/README.md
2026-05-26 16:54:54 +08:00

28 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Pandoc Thesis Environment
适用于Pandoc将LaTeX论文转换为DOCX格式论文的环境。
这是我一开始尝试的使用Pandoc配合pandoc filter来实现论文转换的环境。后来我觉得不太好就放弃转而开发本项目但这个环境还是留着。
# 用法
```bash
uv run pandoc <thesis.tex> \
-s \
-f latex -t docx \
--citeproc \
--metadata-file=meta.yaml \
-F pandoc-tex-numbering \
--resource-path <path-to-tex-dir> \
-o <thesis.docx>
```
参数解释:
- `-s`Standalone模式
- `-f latex -t docx`:显式指定输入输出格式
- `--citeproc`:启用引用解析功能,不启用就没有引用标识
- `--metadata-file=meta.yaml`指定元数据包括引用文献样式以及pandoc-tex-numbering过滤器的相关配置
- `-F pandoc-tex-numbering`使用pandoc-tex-numbering过滤器
- `--resource-path`设置LaTeX资源文件夹要找的图片等内容都会在这个文件夹里找一般来说就是你LaTeX文件所在的文件夹