Test official ACM journals and proceedings

This commit is contained in:
gloamxun committed 2026-11-19 18:25:37 +08:00
1 parent ab50ca7dad
commit 3faac740bd
3 files changed
+86 -4

No files matched your search

+33 -1
View File
@@ -12,13 +12,16 @@
| 期刊双栏 | Elsevier `cas-dc-sample.tex` | [Elsevier CAS 发布包](https://ctan.org/pkg/els-cas-templates) |
| 期刊双栏 | IEEE Transactions `bare_jrnl.tex` | [IEEEtran 发布包](https://ctan.org/pkg/ieeetran) |
| 期刊双栏 | APS REVTeX `apssamp.tex`(reprint) | [APS REVTeX](https://journals.aps.org/revtex) |
| 期刊单栏 | ACM `acmsmall.tex` | [ACM acmart 官方发布](https://ctan.org/pkg/acmart) |
| 期刊双栏 | ACM Transactions on Graphics `acmtog.tex` | [ACM acmart 官方发布](https://ctan.org/pkg/acmart) |
| 会议 | ACM `sigconf.tex` | [ACM acmart 官方发布](https://ctan.org/pkg/acmart) |
| 会议 | Springer LNCS `samplepaper.tex` | [LNCS 作者与编辑指南](https://link.springer.com/series/558/information-for-authors-and-editors) |
| 会议 | IEEE `bare_conf.tex` | [IEEE 会议模板指南](https://conferences.ieeeauthorcenter.ieee.org/write-your-paper/authoring-tools-and-templates/) |
| 会议 | ACL `acl_latex.tex` | [ACL 官方源码](https://github.com/acl-org/acl-style-files) |
| 会议 | CVPR 2026 `main.tex` | [CVPR 官方发布包](https://github.com/cvpr-org/author-kit/releases) |
| 会议 | NeurIPS 2025 `neurips_2025.tex` | [NeurIPS 官方样式包](https://media.neurips.cc/Conferences/NeurIPS2025/Styles.zip) |
从 `scripts/publisher-template-matrix.json` 中的地址取得八个原始压缩包,按键名存为
从 `scripts/publisher-template-matrix.json` 中的地址取得所选样例的原始压缩包,按键名存为
`<键名>.zip`。`scripts/probe-publisher-templates.py` 会校验包的 SHA-256,独立复制
源文件树,用固定参考格式和指定原生格式执行。它保留每轮命令、错误、aux 版本、
字体、页面与词框。需要 BibTeX 时,两端都从实际作业生成的 aux 独立运行。
@@ -326,6 +329,35 @@ SHA-256 为 `7184b2901abd49deb0439a7ea8a5e39ad302ee9663aaa07b43ace697bd74ec5b`
SHA-256 为 `6a29764fe8e66fe7899a2ce1c0ca3639e5cc018974d53e0b0a291c2afdcba7b9`。
这些结果仍需主干合并后复验。
### ACM 的三类官方样例
新增 ACM acmart v2.21 的单栏期刊 `acmsmall`、双栏期刊 `acmtog` 和会议
`sigconf`。矩阵核验 CTAN 压缩包 SHA-256,运行随包未改动的 DocStrip
安装器,并记录生成的 UTF-8 源、类和资产的指纹。参考和原生各使用独立源
副本和各自生成的辅助文件。可分别传入 `--case acm-acmsmall`、
`--case acm-acmtog` 和 `--case acm-sigconf`。
[ACM acmart 官方发布](https://ctan.org/pkg/acmart)
初轮两端均缺少 `\DocumentMetadata` 的支持文件。补入 Fedora 44 的
LaTeX-lab、PDF management、tagpdf 及其他实际查到的原版依赖后,参考 pdfTeX
分别生成11、7、7页带标签的 PDF 2.0。三项经过五轮 LaTeX 和一次 BibTeX 后
aux 收敛且无未定义引用。双栏期刊有6页实际文字行并排,单栏期刊没有匹配
双栏的字框。参考审计 SHA-256 为
`a9ee4e8e11ec0785c9b77ab898d915396004aced3e786a45bfc64a80f86f947a`。
隔离 schema29 原生候选均在实际 `l3backend-pdftex.def` 的
`\pdfcolorstackinit page direct` 处拒绝 `/opacity1 gs`。最小样例验证
pdfTeX 会把该操作写入页面内容流,并链接对应的 `ExtGState` 资源。原生
的实际诊断和参考 PDF 保留在 `color-stack-probe`。
[pdfTeX 上游对颜色栈参数的扫描](https://github.com/TeX-Live/texlive-source/blob/trunk/texk/web2c/pdftexdir/pdftex.web#L10457-L10478)
最终矩阵 `target/publisher-template-matrix/acm-official/matrix-schema29-utf8/report.json`
SHA-256 为 `d914d7c7dfa1ee28dff20e77231fef35e390041cde6180bcc361de83288ec9e1`。其 `preparation/acmart` 保存
DocStrip 记录。同目录的前序依赖失败、补充包指纹和原样源均保留。用现有
IEEE 会议单项参数复验,原生与参考均生成1页且三轮 aux 逐字相同。回执
`matrix-original-ieee/report.json` SHA-256 为
`0abb0304e0cab323cd9e52f515d69e02fe8ced5d9a84b3e20aa9c9dcfb7fb276`。
单纯生成 PDF 或 DVI 只说明编译路径可达。完整验收要在参考环境闭合后比较页数、
双栏位置及跨栏材料、实际字体/字形、图表浮动、引用收敛、词框及墨迹;测试源
与容差都不得为通过而替换。类 Typst 的编辑延迟另用同批原样项目分规模测量,
+49 -3
View File
@@ -26,6 +26,9 @@ CASES = [
("acl", "conference", "acl", "acl-style-files-master/acl_latex.tex"),
("cvpr-2026", "conference", "cvpr-2026", "author-kit-CVPR2026-v1-latex-/main.tex"),
("neurips-2025", "conference", "neurips-2025", "Styles/neurips_2025.tex"),
("acm-acmsmall", "journal-single-column", "acmart", "acmart/samples/acmsmall.tex"),
("acm-acmtog", "journal-two-columns", "acmart", "acmart/samples/acmtog.tex"),
("acm-sigconf", "conference", "acmart", "acmart/samples/sigconf.tex"),
]
EPS_FIGURES = {
"springer-nature": ["fig.eps"],
@@ -66,6 +69,41 @@ def run(command, cwd, env, label, evidence):
return {"command": list(map(str, command)), "exit_code": status, "label": label}
def prepare_acmart(directory, evidence):
"""Extract the published class and samples with the package's DocStrip installers."""
upstream = directory / "acmart"
samples = upstream / "samples"
workspace = evidence / "docstrip"
sample_workspace = workspace / "samples"
sample_workspace.mkdir(parents=True)
env = {**os.environ, "TEXINPUTS": os.pathsep, "SOURCE_DATE_EPOCH": "1783900800"}
latex = ["pdflatex", "-interaction=nonstopmode", "-halt-on-error", "-no-shell-escape", "-recorder"]
commands = []
for original, work, installer, sources in (
(upstream, workspace, "acmart.ins", ["acmart.dtx"]),
(samples, sample_workspace, "samples.ins", ["samples.dtx", "acmengage.dtx"]),
):
for name in [installer, *sources]:
shutil.copyfile(original / name, work / name)
result = run([*latex, installer], work, env, installer, evidence)
if result["exit_code"]:
raise RuntimeError(f"ACM sample extraction failed: {evidence / installer}")
commands.append(result)
generated = {}
for source, destination in [
(workspace / "acmart.cls", samples / "acmart.cls"),
*[(sample_workspace / name, samples / name)
for name in ("acmsmall.tex", "acmtog.tex", "sigconf.tex")],
*[(upstream / name, samples / name)
for name in ("ACM-Reference-Format.bst", "acm-jdslogo.png")],
]:
if destination.exists():
raise ValueError(f"ACM installer output already exists: {destination}")
shutil.copyfile(source, destination)
generated[destination.relative_to(directory).as_posix()] = sha(destination)
return {"commands": commands, "sample_inputs": generated}
def diagnostics(evidence, label):
lines = []
for stream in ("stderr", "stdout"):
@@ -215,7 +253,12 @@ def main():
args = parser.parse_args()
if args.font_map and args.font_map.name != "pdftex.map":
parser.error("--font-map must name a pdftex.map file")
config = json.loads((ROOT / "scripts/publisher-template-matrix.json").read_text())
selected = [item for item in CASES if not args.case or item[0] in args.case]
archives = {item[2] for item in selected if item[2]}
registry = json.loads((ROOT / "scripts/publisher-template-matrix.json").read_text())
config = {name: registry[name] for name in registry if name in archives}
if config.keys() != archives:
raise ValueError(f"publisher archives missing from registry: {archives - config.keys()}")
sources = args.output / "inputs"
sources.mkdir(parents=True)
for archive, (digest, url) in config.items():
@@ -223,6 +266,10 @@ def main():
if sha(path) != digest:
raise ValueError(f"archive bytes differ from the pinned SHA-256: {path}")
unpack(path, sources / archive)
archive_preparation = {}
if "acmart" in config:
archive_preparation["acmart"] = prepare_acmart(
sources / "acmart", args.output / "preparation/acmart")
if args.texmf_overlay and not args.texmf_overlay.is_dir():
raise ValueError(f"missing overlay: {args.texmf_overlay}")
additions = inputs(args.texmf_overlay) if args.texmf_overlay else {}
@@ -247,7 +294,6 @@ def main():
print(name, row["reference"]["pdf_built"], row["native"]["pdf_built"], flush=True)
return row
selected = [item for item in CASES if not args.case or item[0] in args.case]
with ThreadPoolExecutor(max_workers=2) as pool:
results = list(pool.map(case, selected))
report = {"schema": 1, "scope": "compile and collect evidence; PDF creation alone is not fidelity",
@@ -255,7 +301,7 @@ def main():
"native_format_sha256": sha(args.native_format),
"reference_format_sha256": sha(args.reference_format), "texmf_overlay": additions,
"font_map_sha256": font_map_sha256,
"templates": results}
"archive_preparation": archive_preparation, "templates": results}
assert not args.texmf_overlay or inputs(args.texmf_overlay) == additions
assert not args.font_map or sha(args.font_map) == font_map_sha256
(args.output / "report.json").write_text(json.dumps(report, indent=2) + "\n")
+4
View File
@@ -30,5 +30,9 @@
"neurips-2025": [
"72032130232955b785cd622b7c52d893e3166f30a90e1e6279d0a28e8373beef",
"https://media.neurips.cc/Conferences/NeurIPS2025/Styles.zip"
],
"acmart": [
"81977a834f5cfd5302c37181ede34d2663eeea60604d1d89230e3c5e74b9a4bb",
"https://mirrors.bfsu.edu.cn/CTAN/macros/latex/contrib/acmart.zip"
]
}