Install
$ agentstack add skill-hajimi-kun-latex-to-word-workflow-latex-to-word-workflow ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
LaTeX → Word (Zotero optional)
Resources
| Path | Role | |---|---| | assets/reference.docx | Generic A4 template (copy into the project; do not edit the asset) | | scripts/*.py | Audit, style map, native cross-refs, package checks | | scripts/validate_with_word.ps1 | Optional Windows COM open probe — only if the user asks | | examples/minimal/ | Smoke-test manuscript | | references/first-run-setup.md | Environment, template, smoke test | | references/cross-references.md | SEQ/REF promote, numbering limits | | references/ecosystem-notes.md | Related GitHub tools (load only when extending) | | requirements.txt | python-docx, lxml |
Modes (pick one)
- Zotero live: Pandoc + official
zotero.luaonly — never--citeproc. User finishes in Word (prefs → Refresh → bibliography). - Static CSL:
--citeproc --bibliography --csl.
Never combine --citeproc with zotero.lua.
Platform
| Capability | Notes | |---|---| | Agent build + package checks | Pandoc 3+, Python + requirements.txt, LaTeX/BibTeX — any OS | | Word / Zotero UI | User opens DOCX by default (F9, Zotero Refresh, visual check) | | Word COM | Optional. Mention it; run validate_with_word.ps1 only if the user asks and Windows Word is available | | Live Zotero at build | Zotero + BBT; filter: https://retorque.re/zotero-better-bibtex/exporting/zotero.lua | | Local BBT API | http://127.0.0.1:23119/better-bibtex/json-rpc (set NO_PROXY=* only if proxy breaks localhost) |
If setup is unknown, finish references/first-run-setup.md first. Detect before install; confirm with user.
Routine pipeline
- Preflight sources
- Complete entry point (all
\input/\include); prefer labelsfig:/tab:/eq:. - Figures: Word cannot embed PDF. Change
\includegraphicsto PNG/JPEG before Pandoc. A same-stem.pngnext tofigure.pdfis not used automatically. Treat image-conversion warnings as failures. - Prefer labels on every numbered float/equation you will cross-ref. Promoter uses LaTeX counter order (unlabeled numbered objects still advance numbers).
- Audit keys:
python scripts/check_citation_keys.py --tex main.tex --bib references.bib --skip-zotero
python scripts/check_citation_keys.py --tex main.tex --bib references.bib
Pass every file with \cite. PowerShell: expand globs before Python.
- Compile LaTeX + BibTeX; stop on errors.
- Pandoc on the complete entry. Set
--resource-pathto real image dirs (e.g..;figures). Distinct outputs per mode.
# Static
pandoc main.tex -f latex -t docx --wrap=none --citeproc --bibliography=references.bib --csl=journal.csl --metadata reference-section-title=References --resource-path=.;figures --reference-doc=reference.docx -o out/static.docx
# Zotero live (no --citeproc). Optional: --metadata zotero_csl_style=apa
pandoc main.tex -f latex -t docx --wrap=none --lua-filter=zotero.lua --resource-path=.;figures --reference-doc=reference.docx -o out/zotero_live.docx
Do not use pandoc-crossref as a substitute for this skill’s native SEQ/REF promote when the goal is editable Word renumbering.
- Styles → native cross-refs (once per rebuild):
python scripts/format_generated_docx.py out/doc.docx
python scripts/promote_native_crossrefs.py out/doc.docx out/doc_native.docx --tex main.tex
Default caption text: English Fig. / Table / Eq..
- Agent package checks (no Word UI unless the user asked for COM):
python scripts/validate_docx.py out/doc_native.docx --tex main.tex --expect-zotero N
python scripts/check_cross_references.py --tex main.tex --docx out/doc_native.docx --require-native-word-fields
N= live citation field count; omit--expect-zoterofor static CSL. Optional:--expect-zotero-keys key1 key2to require those BBT keys inside field JSON.- With
--tex, source table/image counts are enforced against the DOCX (use--no-enforce-tex-countsonly to diagnose). Explicit.pdfincludes fail unless--allow-pdf-figures. - REF targets must exist as bookmarks; duplicate bookmark names fail.
- Fails on unresolved
[@...]. Report pass/fail; not delivery-ready until step 6.
- User acceptance in Word — give the DOCX path; ask the user to:
- Open (no repair dialog). If Word claims corruption on first live open, rebuild once.
- Live mode: Document Preferences (set style) OK before bulk Refresh, then Add/Edit Bibliography.
- Select All → F9.
- Spot-check equations, figures, captions, tables, cites, bibliography, breaks vs PDF.
If the user asks for an automated open check on Windows:
powershell -File scripts/validate_with_word.ps1 -Path out/doc_native.docx
Do not run COM by default; do not automate Zotero clicks.
Style mapping
| Content | Style | |---|---| | Prose | Body Text | | Image-only para | Figure | | Captions | Caption | | Table cells | Table Body | | Reference list | Bibliography |
Map styles only; do not rewrite Zotero field runs. Headings: References, Bibliography, 参考文献, 引用文献.
Hard rules
- New DOCX package only; never splice XML without relationships.
- Canonical BBT keys; never invent keys; resolve by DOI/title.
- Cross-file refs → full entry; audit after style postprocess.
- Missing/PDF-only figures → fix before accepting build.
Boundaries
- Live Zotero needs BBT at build; static does not.
- Do not stack promotes; rebuild from Pandoc.
- Equation promote needs
--texand matching display-math vs OMML counts. - Numbers come from LaTeX env order (
figure/table/equation/…, not starred; multi-linealignrows). Unlabeled numbered equations still advance the counter so a later labeled eq is Eq. (2). Compare complex layouts to PDF. - Caption promote requires Caption style or Fig./Table/图/表 prefix near the bookmark.
\setcountermay be ignored; link integrity ≠ PDF numbering.- Agent checks are structural; final acceptance is user-in-Word (COM only on request).
- Bib audit is simple; complex
.bibmay need manual review.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: hajimi-kun
- Source: hajimi-kun/latex-to-word-workflow
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.