我有一个两栏小字体 LaTeX 文档(一篇长论文,分布在几个源文件上)。2022 年 1 月,我使用 TeX Live(Debian 原版、Ubuntu 原版或本地安装版)从该文档编译出了一个 PDF 文件:
$ pdfinfo main.pdf
Title: …
Subject:
Keywords:
Author: …
Creator: LaTeX with hyperref
Producer: pdfTeX-1.40.21
CreationDate: Sat Jan 1 03:19:53 2022 CET
ModDate: Sat Jan 1 03:19:53 2022 CET
Custom Metadata: yes
Metadata Stream: no
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 31
Encrypted: no
Page size: 595.276 x 841.89 pts (A4)
Page rot: 0
File size: 743054 bytes
Optimized: no
PDF version: 1.5
今天汇编同样的资料得出
$ pdfinfo main.pdf
Title: …
Subject:
Keywords:
Author: …
Creator: LaTeX with hyperref
Producer: pdfTeX-1.40.25
CreationDate: Sat Dec 9 22:43:25 2023 CET
ModDate: Sat Dec 9 22:43:25 2023 CET
Custom Metadata: yes
Metadata Stream: no
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 31
Encrypted: no
Page size: 595.276 x 841.89 pts (A4)
Page rot: 0
File size: 998103 bytes
Optimized: no
PDF version: 1.5
diffpdf
通过收益查看旧 main.pdf 和新 main.pdf 之间的变化太多了在任何模式下(单词比较、字符比较、视觉比较)都会出现红色标记。因此,至少在其默认选项下,差异pdf在这种情况下是无用的:使用它最终将归结为手动并排检查 2 × 31 页面上的所有文本。但是,在检查第一页的前几行(标题、作者和摘要)后,您发现字体平滑/抗锯齿现在可以正常工作,而之前它不能(正常)工作,并且连字 fi 的出现现在在版本之间标记为不同。您希望了解除此之外是否还有更重要的变化(例如,字符显示不正确或不同,TikZ 现在绘制内容的方式发生了意外变化,参考/引文中的任何错误,任何连字符错误,...)。不幸的是,旧的 main.log 不再可用。新的 main.log 包含有关许多内容的警告,包括未定义和多重定义的内容,但是,由于您正在使用该包xr-hyper制作您的文档(main.pdf 作为论文的精简版,除此之外,您还可以从相同来源制作另一个 PDF 文件,用于包含数学证明的补充材料,您还可以为所有内容制作另一个 PDF 文件),至少一些关于未定义或多重定义的标签的此类警告并不完全出乎意料。
有什么方法可以“粗化”差异pdf或者是否有其他工具可以更粗略地比较旧的 main.pdf 和新的 main.pdf差异pdf?
我尝试比较这些文本,但变化量很大:
$ diff -d <(pdftotext new_main.pdf -) <(pdftotext old_main.pdf -)|wc -l
12812
比较字体可以得到更多信息:
$ diff -d <(pdffonts new_main.pdf) <(pdffonts old_main.pdf)
3,55c3,56
< KYESCI+SFRM1728 Type 1 Custom yes yes yes 22 0
< YHWNWE+SFCC1200 Type 1 Custom yes yes yes 23 0
< UFXXMG+SFCC0800 Type 1 Custom yes yes yes 24 0
< TQJZEA+SFTI0700 Type 1 Custom yes yes yes 25 0
< IXSXOZ+SFTI0900 Type 1 Custom yes yes yes 26 0
< PIFFSP+SFBX0900 Type 1 Custom yes yes yes 27 0
< ZPBWIJ+SFBX1000 Type 1 Custom yes yes yes 30 0
< EYUFFD+SFCC1000 Type 1 Custom yes yes yes 31 0
< UPNPHM+SFRM1000 Type 1 Custom yes yes yes 32 0
< JIZZNP+SFTI1000 Type 1 Custom yes yes yes 35 0
< XAOMZI+CMR10 Type 1 Builtin yes yes yes 36 0
< VSAEDQ+CMMI10 Type 1 Builtin yes yes yes 69 0
< DITMCZ+CMSY10 Type 1 Builtin yes yes yes 70 0
< DIERKS+CMR7 Type 1 Builtin yes yes yes 71 0
< CHUDXO+SFRM0700 Type 1 Custom yes yes yes 73 0
< UPNPHM+SFRM1000 Type 1 Custom yes yes yes 74 0
< ADNPKL+SFRM0600 Type 1 Custom yes yes yes 75 0
< EHAKQD+SFRM0800 Type 1 Custom yes yes yes 77 0
< KUUXAH+SFTT1000 Type 1 Custom yes yes yes 112 0
< RQSHZS+CMTT10 Type 1 Builtin yes yes yes 226 0
< DSIQTY+BBOLD10 Type 1 Builtin yes yes yes 229 0
< ULAAHX+CMTI10 Type 1 Builtin yes yes yes 231 0
< OVETDW+CMMI7 Type 1 Builtin yes yes yes 232 0
< TGNRDB+SFRM0900 Type 1 Custom yes yes yes 243 0
< CYIPZU+MSAM10 Type 1 Builtin yes yes yes 262 0
< PGWCIV+CMEX10 Type 1 Builtin yes yes yes 264 0
< AWNQRZ+CMSY7 Type 1 Builtin yes yes yes 265 0
< OYQULM+EUFM10 Type 1 Builtin yes yes yes 266 0
< UWDUBS+CMR5 Type 1 Builtin yes yes yes 267 0
< ZSIWIM+CMSS10 Type 1 Builtin yes yes yes 268 0
< LUAFXG+rsfs10 Type 1 Builtin yes yes yes 269 0
< HQDOIX+CMMI12 Type 1 Builtin yes yes yes 279 0
< XLUXEV+CMR8 Type 1 Builtin yes yes yes 280 0
< CHYDRB+MSBM10 Type 1 Builtin yes yes yes 301 0
< SFQIJW+CMSS9 Type 1 Builtin yes yes yes 303 0
< ECGVGR+CMR9 Type 1 Builtin yes yes yes 304 0
< BHDBNY+CMMI9 Type 1 Builtin yes yes yes 305 0
< JIXOQS+CMSY9 Type 1 Builtin yes yes yes 308 0
< ECVLCM+SFIT0900 Type 1 Custom yes yes yes 328 0
< OPCRBH+TeX-mathb10 Type 1 Builtin yes yes yes 373 0
< ITPTFC+CMSS8 Type 1 Builtin yes yes yes 406 0
< BNEURD+stmary10 Type 1 Builtin yes yes yes 412 0
< UQNTKJ+CMMI8 Type 1 Builtin yes yes yes 421 0
< RFERWT+CMMI5 Type 1 Builtin yes yes yes 444 0
< MBBTWW+TeX-mathb7 Type 1 Builtin yes yes yes 445 0
< GKIQMS+CMSY5 Type 1 Builtin yes yes yes 446 0
< TURIVV+CMSY8 Type 1 Builtin yes yes yes 451 0
< ORHOJI+CMR6 Type 1 Builtin yes yes yes 452 0
< QRAQFO+SFTI0800 Type 1 Custom yes yes yes 613 0
< IPQGLW+BBOLD7 Type 1 Builtin yes yes yes 654 0
< WWCTIW+CMEX7 Type 1 Builtin yes yes yes 674 0
< JPVWTM+SFIT1000 Type 1 Custom yes yes yes 741 0
< WEZJQK+SFTT0900 Type 1 Custom yes yes yes 1010 0
---
> [none] Type 3 Custom yes no no 22 0
> [none] Type 3 Custom yes no no 23 0
> [none] Type 3 Custom yes no no 24 0
> [none] Type 3 Custom yes no no 25 0
> [none] Type 3 Custom yes no no 26 0
> [none] Type 3 Custom yes no no 27 0
> [none] Type 3 Custom yes no no 30 0
> [none] Type 3 Custom yes no no 31 0
> [none] Type 3 Custom yes no no 32 0
> [none] Type 3 Custom yes no no 33 0
> [none] Type 3 Custom yes no no 36 0
> XAOMZI+CMR10 Type 1 Builtin yes yes no 37 0
> VSAEDQ+CMMI10 Type 1 Builtin yes yes no 70 0
> DITMCZ+CMSY10 Type 1 Builtin yes yes no 71 0
> DIERKS+CMR7 Type 1 Builtin yes yes no 72 0
> [none] Type 3 Custom yes no no 74 0
> [none] Type 3 Custom yes no no 75 0
> [none] Type 3 Custom yes no no 76 0
> [none] Type 3 Custom yes no no 78 0
> [none] Type 3 Custom yes no no 113 0
> RQSHZS+CMTT10 Type 1 Builtin yes yes no 227 0
> DSIQTY+BBOLD10 Type 1 Builtin yes yes no 230 0
> ULAAHX+CMTI10 Type 1 Builtin yes yes no 232 0
> OVETDW+CMMI7 Type 1 Builtin yes yes no 233 0
> [none] Type 3 Custom yes no no 244 0
> CYIPZU+MSAM10 Type 1 Builtin yes yes no 263 0
> PGWCIV+CMEX10 Type 1 Builtin yes yes no 265 0
> AWNQRZ+CMSY7 Type 1 Builtin yes yes no 266 0
> OYQULM+EUFM10 Type 1 Builtin yes yes no 267 0
> UWDUBS+CMR5 Type 1 Builtin yes yes no 268 0
> ZSIWIM+CMSS10 Type 1 Builtin yes yes no 269 0
> LUAFXG+rsfs10 Type 1 Builtin yes yes no 270 0
> HQDOIX+CMMI12 Type 1 Builtin yes yes no 280 0
> XLUXEV+CMR8 Type 1 Builtin yes yes no 281 0
> CHYDRB+MSBM10 Type 1 Builtin yes yes no 302 0
> SFQIJW+CMSS9 Type 1 Builtin yes yes no 304 0
> ECGVGR+CMR9 Type 1 Builtin yes yes no 305 0
> BHDBNY+CMMI9 Type 1 Builtin yes yes no 306 0
> JIXOQS+CMSY9 Type 1 Builtin yes yes no 309 0
> [none] Type 3 Custom yes no no 329 0
> OPCRBH+TeX-mathb10 Type 1 Builtin yes yes no 374 0
> ITPTFC+CMSS8 Type 1 Builtin yes yes no 407 0
> BNEURD+stmary10 Type 1 Builtin yes yes no 413 0
> UQNTKJ+CMMI8 Type 1 Builtin yes yes no 422 0
> RFERWT+CMMI5 Type 1 Builtin yes yes no 445 0
> MBBTWW+TeX-mathb7 Type 1 Builtin yes yes no 446 0
> GKIQMS+CMSY5 Type 1 Builtin yes yes no 447 0
> TURIVV+CMSY8 Type 1 Builtin yes yes no 452 0
> ORHOJI+CMR6 Type 1 Builtin yes yes no 453 0
> [none] Type 3 Custom yes no no 614 0
> IPQGLW+BBOLD7 Type 1 Builtin yes yes no 655 0
> WWCTIW+CMEX7 Type 1 Builtin yes yes no 675 0
> [none] Type 3 Custom yes no no 742 0
> [none] Type 3 Custom yes no no 1009 0
也许,任何中间 TeX Live 版本都可以抓取并进行两次比较:在旧的 main.pdf 和中间 TeX Live 生成的 main.pdf 之间进行比较,然后在中间 TeX Live 生成的 main.pdf 和当前 main.pdf 之间进行比较?