
zouchenzhen/docx-template-translator-skill
Developer toolsThis page was translated automatically. Technical details may differ from the original. View the original
Codex / Claude Skill for translating LaTeX, PDF, or Markdown into a specified Word template. Let AI transcribe LaTeX / PDF / Markdown into specified Word template formats.
Overview
It is designed for scenarios such as graduation theses, theses, unit reports, and standard documents, especially suitable for tasks that require strict application of school or institution Word templates. The repository comes with a minimum runtable example examples/minimal_markdown/, which runs in the repository root directory: The script generates a sample template on site, runs inspect / adaptive / finalize in sequence, and outputs a PDF preview image in Windows + Word environment. The following two images are generated using **: the first follows the project's adaptive pipeline, and the second runs only pandoc --reference-doc: Both images use the same input and template, but **: the output of this project retains the prerequisite content and chapter numbers already present in the actual template, so the sample section follows the original chapter in the template (for example, displayed as 4.7 / 8.7 numbers, depending on the current template content); Direct pandoc baseline creates a document from sample.md and only reuses the style definition of --reference-doc, so numbering starts from chapter 1 (e.g., 1.5). Comparing the two, you can see: pandoc --reference-doc can reuse some styles, but it only knows the style definitions and does not understand the main text semantics and layout constraints in the school template; Charts/formulas/tables are easier to span pages and have loose spacing, and tables are not the three-line table effect required by the target template. This project first inspects the template, then uses adaptive pipeline to map the main text, caption, formula, and table, and finally exports with Word finalize, making it more suitable for strict school/unit templates. The output image for this project is generated using the following command, then the main area is cropped from page 20: When not sending --template, run_example.py uses a lightweight sample template generated on site by build_template.py, which is more simplified but fully reproducible; --preview-pages defaults to "1-4", which is sufficient for the demo template. See examples/minimal_markdown/expected/README.md for details. inspect / adaptive / preview runs on macOS, Linux, and Windows; The finalize step for updating fields and exporting PDFs with Word COM is only available in Windows + Microsoft Word.
Overview (machine translated)
A Codex skill for translating LaTeX, PDF, Markdown, or rough DOCX into specified Word template formats.
It is designed for scenarios such as graduation theses, theses, unit reports, and standard documents, especially suitable for tasks where pandoc’s default DOCX output is insufficient and where strict application of school or institution Word templates is required.
English: README.en.md
See the effect in one minute
The repository comes with a built-in minimum runtable example examples/minimal_markdown/, which runs in the repository root:
The script generates a sample template on site, running inspect / adaptive / finalize in sequence, and then
Export PDF preview images in Windows + Word environment. The two images below are the same one copy
sample.md and the same authentic Zhengzhou University thesis template ** generated, the first copy is for the main project
adaptive pipeline, the second card only runs directly pandoc --reference-doc:
Project output: pandoc → adaptive pipeline → Word finalize
Direct pandoc baseline: only use pandoc --reference-doc
Both images use the same input and template, but the numbering context is different: the output for this project will be retained The actual template already contains prerequisite content and chapter numbers, so the sample section will follow the original chapter of the template (for example, displayed as
4.7/8.7numbers, depending on the current content of the template); Direct pandoc baseline creates a document fromsample.mdand only reuses the style definition of--reference-doc. Therefore, numbering starts from Chapter 1 (e.g.,1.5).Comparison shows:
pandoc --reference-doccan reuse some styles, but it only knows the style definition, Not understanding the main text semantics and layout constraints in school templates; Charts/formulas/tables are easier to span pages and have loose spacing, The table is also not the three-line table effect required by the target template. This project will inspect the template first, then use it Adaptive pipeline maps the body, title, formulas, and tables, then exports them using Word finalize, Therefore, it is more suitable for strict school/unit templates.The output image for this project is generated using the following command, then the main area is cropped from page 20:
When
--templateis not transmitted,run_example.pywill be generated live usingbuild_template.py. Lightweight sample template, with more simplified output but fully reproducible;--preview-pagesDefault"1-4", just on the demo template.
This page was translated automatically. Technical details may differ from the original.
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add zouchenzhen/docx-template-translator-skill