kohler / hotcrp

HotCRP conference review software
http://read.seas.harvard.edu/~kohler/hotcrp
Other
328 stars 111 forks source link

Banal: Possibly broken leading detection #329

Closed FreakyPenguin closed 9 months ago

FreakyPenguin commented 9 months ago

Hi Eddie,

we ran into an issue with the format checker, possibly related to #159 , where hotcrp reports leading errors in the document (11.9 instead of 12pt). I can reproduce these by directly running banal from the main branch as well.

Not urgent but given that others also seem to run into this judging from the comment on #159 I figured I'd report with an example pdf (problems.pdf). But feel free to ignore. (we certainly ignored the warning after digging a bit :-) .

I've included one good page (page 1) and three pages with leading reported as 11.9. The problem seems to be very fickle, if I make unrelated changes to the TeX and things move around a bit suddenly leading is reported as 12 again. I suspect the figure captions of triggering this, but I was not able to further minimize this (here I cut the pages out with pdftk).

Here is the banal output I get:

$ perl /tmp/banal.txt problems.pdf
leading policy: mode
problems.pdf
Paper size: 8.50in x 11.00in
Text region: 7.03in x 8.98in
Margins: 0.74in x 0.73in x 1.04in x 0.97in (l/r/t/b)
Body font size: 10.30pt
Leading: 11.9pt
Columns: 2
Pages: 4

Page 1:
  text region: 7.03in x 8.98in
  margins: 0.75in x 0.73in x 1.04in x 0.97in (l/r/t/b)
  body font: 10.3pt
  leading: 12pt
  columns: 2
  type: body
  nchars: 5069
Page 2:
  text region: 7.03in x 8.95in
  margins: 0.74in x 0.73in x 1.08in x 0.97in (l/r/t/b)
  body font: 10.3pt
  leading: 11.9pt
  columns: 2
  type: body
  nchars: 5058
Page 3:
  text region: 7.03in x 8.80in
  margins: 0.74in x 0.73in x 1.23in x 0.97in (l/r/t/b)
  body font: 10.3pt
  leading: 11.9pt
  columns: 2
  type: body
  nchars: 3579
Page 4:
  text region: 7.03in x 8.98in
  margins: 0.75in x 0.72in x 1.04in x 0.97in (l/r/t/b)
  body font: 10.3pt
  leading: 11.9pt
  columns: 2
  type: body
  nchars: 4764

Cheers, Antoine

kohler commented 9 months ago

Thanks for posting a PDF!

This is probably at root a difference between TeX’s notion of pt and everyone else’s.

Knuth decided that 1pt was exactly 1/72.27 inch. PostScript decided that 1pt was exactly 1/72 inch. Everyone else—Mac Preview, Word, etc. etc. etc.—went with PostScript because that’s obviously better, I mean come on.

If you set \baselineskip=12pt, that gives a line height of 0.1660 inches, which corresponds to a leading using the better point measurement of 11.955. If you set \baselineskip=12bp (tex's better-points unit), or use 12pt in any system other than tex, that gives a line height of 0.1666 inches (= 12.045 tex points)

See attached example.ltx. With \baselineskip=12pt, banal reports leading of 11.9pt. With \baselineskip=12bp, it reports 12pt.

The leading on a tex document really is less than 12pt because of Knuth derp. There is a rounding issue that maybe I can tweak but now you know you're getting away with something.

kohler commented 9 months ago

example.tex.txt

FreakyPenguin commented 9 months ago

Impressive as usual! Thanks for getting to the bottom of this.

Yikes, now I know much more than I ever needed to know, as usual with TeX... And of course it has to be 1/72.27... duh.

(Let's hope ACM does not find out about this and makes us all change our regular points to big points before accepting our future camera readies. ;-) )