
Paper Format Agent
io.github.zxyasfas由 GitHub 账号 zxyasfas 发布v3.1.0更新于 Oct 24, 2026
Local-first DOCX formatter for academic papers with a content-fingerprint integrity guard.
概览
本地运行的 DOCX 论文排版工具,按格式规范调整样式,并在正文文本被改动时拒绝保存。
- 可以做什么
- 按格式规范文件排版论文 DOCX,调整字体、行距、缩进、标题与图表题注
- 从格式规范文档中提取排版规则
- 对论文进行格式评分
- 全程在本机运行,并在运行前后比对正文内容指纹
- 适用场景
- 适合需要在不把论文上传到外部网站的前提下,让学位论文或期刊稿件符合格式规范,并希望确认排版没有改动正文的场景;也适合从规范文档提取规则或给现有稿件打分。
- 运行要求
- 以本地 Python 进程运行(MCP 服务器需 Python 3.10 及以上),从 PyPI 安装并带 mcp 附加组件。未声明需要账号、API 密钥或环境变量。需要提供格式规范 DOCX 与论文 DOCX 作为输入。
安装
在 SourceWeft 中
- 打开 控制台中的 Paper Format Agent,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Paper Format Agent
中文说明 | English
A local DOCX formatter for theses and papers.
It changes fonts, spacing, indents, headings and captions to match a format guide. It does not rewrite the paper. Before saving, it compares a fingerprint of the body and table text from before and after the run. If the text changed, it aborts instead of writing the formatted file.
Everything runs on your machine. Nothing is uploaded.
the content check
Report fields from a real run (--engine python):
The two hashes should match. If they don't, the formatter exits with
content guard failed and the formatted DOCX is not written.
What the check covers: body paragraphs and tables, with whitespace and stray
bullet characters normalized before comparing. Headers and footers are out of
scope because the formatter sets those on purpose. Use --engine python when
the fingerprint must cover the final saved DOCX; the other engines run a local
post-processor after the check, e.g. to refresh the table of contents.
To watch the guard trip, run python tools/demo_content_guard.py. It formats
a synthetic paper, then repeats the run with the styling step patched to edit
one sentence of the in-memory document. The second run aborts without writing
the DOCX.
docs/BENCHMARK.md tracks which authored strings survive a run in small synthetic fixtures, and lists the known gaps.
install and run
There is also a GUI (python run_gui.py), a batch mode, and JSON template
packs for Chinese thesis, journal and IEEE-style formats. See
docs/USAGE.md.
limits
Early project. Ordinary paragraphs, headings and tables work better than
equations, footnotes and complex layouts. With --strict-required-sections,
checks may include char_below_min or blank_page_risk. Do not use it as the
only check before a real submission. Keep your original file.
Reference-list formatting is out of scope here: that part is mechanical rules, so it lives in a separate tool, gbt7714_check, which lints reference entries against GB/T 7714.
why I made this
I did not want to upload an unfinished thesis to a formatting website, and I wanted a way to check that formatting did not touch the text. So the default engine runs locally and refuses to save if the text changed.
agents
The repo doubles as an installable agent skill (SKILL.md), and the same pipeline is available as an optional MCP server (Python 3.10+):
Tools: format_paper, extract_format_rules, score_paper. Client config in
docs/MCP.md.
contributing
Small PRs are welcome. Adding a synthetic test for a school or journal formatting rule is a good place to start: docs/CONTRIBUTOR_TASKS.md, CONTRIBUTING.md. Notes on the pipeline are in docs/ARCHITECTURE.md.
Do not commit real papers, private school templates, reviewer comments, API keys or generated output. Synthetic fixtures only.
license
MIT. See LICENSE.
来源:README.md,提交 f17a9e4
工具
0版本历史
1- v3.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分