
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 分