From f0becfa7937cb835259f42025bd31c3cefb1d955 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 27 Aug 2026 20:40:19 +0200 Subject: [PATCH] deps: LaTeX with words in it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extract v0.2.0 fixes a defect that made the text this produces valid and useless: a run's width, its size and the width of a space in it were worked out without the text matrix's own scale, so a document that puts its scale there — which TeX does in every PDF it has ever produced — had a word break inserted between every pair of letters. Measured over the first 400 real forms, converting each to LaTeX and counting the words in the body that are one or two letters long: before 58.15% after 26.17% The output is also 7.6% smaller for the same 400 documents, because a page's worth of single letters takes more room than the words they were. Figures are unchanged at 297 drawn and 829 given up on: those were settled by taking the reader that decodes a fax, which turned 241 \framebox{unreadable image} into \includegraphics one for one. reader v0.6.0 comes with it, and with it the /Crypt filter that 209 files — 12.8% of the real forms — carry. This module's own test is what caught the contract change underneath: a page whose content will not decode must still be reported rather than turned into an empty document, which is now what extract.Runs guarantees. Co-Authored-By: Claude Opus 5 --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 97ed57a..4f92902 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/go-pdfkit/latex go 1.26.4 require ( - github.com/go-pdfkit/extract v0.1.0 - github.com/go-pdfkit/reader v0.5.0 + github.com/go-pdfkit/extract v0.2.0 + github.com/go-pdfkit/reader v0.6.0 ) require ( diff --git a/go.sum b/go.sum index abe6b30..b4467b4 100644 --- a/go.sum +++ b/go.sum @@ -2,9 +2,9 @@ github.com/go-opentype/fonts v0.8.0 h1:77i3VPIH90GbstzNb21mk+an4WvEOe2idC6W+J0n0 github.com/go-opentype/fonts v0.8.0/go.mod h1:C6yQL2apHItfEZ5hztpsHF0S5mlX/hklLlq/Z5fRG/g= github.com/go-opentype/opentype v0.9.0 h1:GFgcJ3nwTDp4NJr5O+Paw7lhZx5Jv/R+noZwvhYDlkM= github.com/go-opentype/opentype v0.9.0/go.mod h1:AOixevJf7XQaH7+WG+OMIOZEbYPXfMqklVk26Y6YTUU= -github.com/go-pdfkit/extract v0.1.0 h1:7IJDJMH43l2wJZD+DkW5StmeAS1NDt2FnT2LBceXTog= -github.com/go-pdfkit/extract v0.1.0/go.mod h1:3ejdi87IrdR60wmjzLswdqzBzHCgFlrLtxkMxRN1KSU= +github.com/go-pdfkit/extract v0.2.0 h1:ibx2C2mJTJjGzP9bRnrRnmvdeZjv9aTas6tSkeEiTeM= +github.com/go-pdfkit/extract v0.2.0/go.mod h1:7KJGmgvxjk9qqbDdjpaAcEzd4G3vq3ciHuuufVdLiu4= github.com/go-pdfkit/pdffont v0.3.0 h1:G5DKcAmsZJ0e17QhSrcUaL7PKEXKjUx4P/iGMl7bAbI= github.com/go-pdfkit/pdffont v0.3.0/go.mod h1:bfmNLna1l1CljNX/Utg55YzFylovfmI7sJnvgA3bzKI= -github.com/go-pdfkit/reader v0.5.0 h1:DaJ5C6eKXPRG9Cdu+olA/0KLmsQgyHEC1coteQQuBxU= -github.com/go-pdfkit/reader v0.5.0/go.mod h1:fQFOVfCMUui1AdvD4qhimdyvvNr9KvvJ1S7IuKZjyV8= +github.com/go-pdfkit/reader v0.6.0 h1:KAabNOYUcTlZlNBTbG9bEhWP1NiZhjuhzUdavdTdfes= +github.com/go-pdfkit/reader v0.6.0/go.mod h1:fQFOVfCMUui1AdvD4qhimdyvvNr9KvvJ1S7IuKZjyV8=