Install
openclaw skills install axiv-html-cn-staticThis skill should be used when an arXiv paper HTML page needs to be converted into a local Chinese static HTML webpage, preserving local figures, icons, CSS assets, paper metadata, and Chinese text produced from arxiv-paper-resolver-style section extraction.
openclaw skills install axiv-html-cn-static将 arXiv 英文论文 HTML 实验版转换为本地可打开的中文静态 HTML 网页。保留论文标题、元数据、章节结构、公式文本、图片、图表、图标和 CSS 资源。中文正文可复用 arxiv-paper-resolver 的章节提取与中文 Markdown 生成流程。
在以下请求中使用本技能:
arxiv-paper-resolver 生成的中文 Markdown,希望进一步生成本地 index.html。scripts/arxiv_html_static_builder.py:下载 arXiv HTML、PDF、图片、图标、CSS 等本地资源,并把中文 Markdown 包装为静态 HTML。scripts/requirements.txt:脚本依赖。references/output_contract.md:输出目录、文件命名和质量检查约定。若用户提供的是 arXiv URL 或裸 ID,直接使用。若只提供 PDF 路径或论文标题,先根据标题搜索 arXiv,确认 abs 页面与 ID。
若当前目录已有 {arxiv_id}_中文文档.md,直接复用。
若没有中文 Markdown,先使用 arxiv-paper-resolver:
{arxiv_id}_raw_sections/、{arxiv_id}_metadata.json、{arxiv_id}_section_structure.txt。$...$,避免使用 \(...\) 或带反引号的公式定界符。安装依赖后运行:
python3 -m pip install -r /Users/nineve/.codebuddy/skills/arxiv-html-cn-static/scripts/requirements.txt
python3 /Users/nineve/.codebuddy/skills/arxiv-html-cn-static/scripts/arxiv_html_static_builder.py prepare <arxiv_id_or_url> -o <output_parent_dir>
该步骤会:
abs 元数据。使用已有中文 Markdown 构建网页:
python3 /Users/nineve/.codebuddy/skills/arxiv-html-cn-static/scripts/arxiv_html_static_builder.py build <paper_dir> --md <arxiv_id>_中文文档.md
默认输出:
<paper_dir>/index.html
构建时将:
figure 与 table 节点作为完整 HTML 块插入,因此表格不会只剩 caption。height、width、transform 与 LaTeXML 缩放包裹,改用 .table-scroll 横向滚动容器,确保宽表格横向可滚、纵向完整展开。Figure N / Table N / 图N / 表N 引用插入图表;若中文 Markdown 中没有显式引用,则按原文图表在该章节中的顺序分布到章节内部,而不是统一放在章节开头。$...$、$$...$$、\(...\)、\[...\] 公式;完全离线环境下可改为本地 MathJax/KaTeX 资源。完成后检查:
grep -nE 'https?://arxiv.org|https?://static' <paper_dir>/index.html | head
find <paper_dir>/assets -type f | head
要求:
index.html 能通过浏览器本地打开。assets/。$...$ 文本形式,不改写 LaTeX 命令。标准输出结构:
{output_parent_dir}/{paper-title-slug}/
├── index.html # 中文静态网页
├── {arxiv_id}.pdf # PDF
├── {arxiv_id}_original_local.html # 本地化英文 HTML 副本
├── {arxiv_id}_static_metadata.json # 静态网页元数据
├── {arxiv_id}_asset_manifest.json # 资源下载清单
├── {arxiv_id}_figures.json # 图表清单
├── {arxiv_id}_中文文档.md # arxiv-paper-resolver 生成或复用的中文 Markdown
└── assets/ # 本地图片、图标、CSS 等资源
arxiv-paper-resolver 与本技能职责分离:前者负责章节抽取和中文正文生成,后者负责 HTML 资源本地化与静态网页构建。index.html 尽量可离线阅读。