Skip to content

bench-kit 1.9.2

Choose a tag to compare

@dmberry dmberry released this 12 Nov 17:07
· 19 commits to main since this release
  • Book: highlight links for a page's passages, both ways (David): for a text whose lines are not the page's (a translation beside its source), a bench names a support file of each page's places (SW.BENCH.doc.regions: 'regions.json', or 'regions/{page}.json' for a file to each page): the boxes a passage takes on the image, the source's words there, and the words of the text it holds (quote, one for every version or one to each). Book finds the words in the text as it is set, so the file keeps no lines or offsets and follows the text when it is edited elsewhere; a quote not found leaves its place drawn and untied. A passage under the pointer lights its place on the page and a place its passage; a click on either holds both; text selected lights every place it runs over; the enlarged page shows a place's source words and its passage by the pointer. est marks a place or match as estimated (a dashed edge). SW.book.regionsReport() lists the places not found. A page's places are fetched when its image comes near the view, or, with the images folded away, when the pointer first comes over its text. A bench that names no file is as before.
  • Book: highlight links, their colour and a switch (David): a highlight link is a line, a box or a passage lit on the page's image with its words in the text. Their colour was the theme's; a bench can now set it (SW.BENCH.doc.linkColor, a CSS colour), and a reader can choose their own in Settings ▸ Book ▸ Highlight links, or go back to the bench's. The same pane turns highlight links off, for a reader who wants the page's image as a picture only. Both are kept in the browser (book.link, book.linkOff).
  • Settings ▸ Book: “Bench’s default trim” (David): the button that goes back to the bench's trim is so named, and the highlight links' colour has one to match.
  • Settings saves on a bench that trims each page by its own measure: Settings ▸ Book's trim boxes took steps of half a percent, and a page's own trim (kuki's, measured to a tenth) was shown to a tenth, so the browser held the form as not valid and Save did nothing while Book was open at such a page. The boxes now take tenths.
  • Book: the text lights its lines on the page (David): where a page gives its lines' places (pb.lines, as Melville's manuscript does), a band on the image already lit its line in the text; now a line of the text under the pointer lights its band on the page beside it, and text selected lights the band of every line it covers, until the selection is let go. A line the page gives no place for is not lit.