Repository navigation
Carry UEB capitals and typeform passages over consecutive List Paragraph paragraphs - #186
Merged
Merged
Conversation
ASM's statements put fully capitalised notices and address blocks in
consecutive Word "List Paragraph" paragraphs. Duxbury treats such a run as
one UEB capitals passage: one capitals passage indicator before its first
word and one capitals terminator after its last uppercase letter.
BrailleBlaster translated each paragraph on its own, closing and reopening
the passage, or using capital word indicators when a paragraph had fewer
than three words:
before: ,,CVRXCU/OM]#JJDIHAD ,,"N#A after: ,,,cvrxcu/om]#jjdihad "n#a
,,CVRXCU/OM]#JJDIHAD ,,"N#B cvrxcu/om]#jjdihad "n#b,'
The docx import now marks List Paragraph items with utd:capitalsRun
("List" and "List 2".. items, which import as the same list items, are not
marked). When a marked block's fully capitalised words carry on into the
marked block next to it, GenericBlockAction translates the run in one
liblouis call (paragraphs joined by a newline, plain typeform) and each
block keeps the cells that come from its own text. A passage that ends
inside its paragraph, Normal and "List" paragraphs, headings, and non-UEB
tables are translated as before.
Braille Formats 2016 5.6 (font emphasis for one or more paragraphs) and
Rules of UEB 9.9.1: when a typeform passage extends over more than one
text element, each element is preceded by the typeform passage indicator
and the typeform is terminated only where it changes. BrailleBlaster
closed the passage at the end of every paragraph:
before: ^7,yr pay;t is late & y may [e a fee4^'
^7,call u td to set up a plan4^'
after: ^7,yr pay;t is late & y may [e a fee4
^7,call u td to set up a plan4^'
The List Paragraph run that carries a capitals passage now also carries
font typeforms (italic, bold, underline, script, transcriber-defined)
when the end of one paragraph and the start of the next share them and
together make three or more words. The run is translated in one call
with the joint in those typeforms, and each later paragraph gets the
passage indicator liblouis uses for them. Two words across a joint keep
their word indicators. The marker is renamed utd:passageRun.
This changes BR-78_lws page 3 and BR-10_lws/BR-39_lws page 5, where a
bold paragraph runs into bold text in the next one; Duxbury closes the
passage there. Normal and "List" paragraphs are unchanged.
krperry
added a commit
that referenced
this pull request
Oct 20, 2026
Carry UEB capitals and typeform passages over consecutive List Paragraph paragraphs (land #186)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #185 (
fix/ueb-typeform-rules), which adds theTextTranslator.isUebLiteraryhelper this uses. Merge that one first.Problem
ASM's statements put fully capitalised notices, address blocks and bold notices in consecutive Word "List Paragraph" paragraphs. BrailleBlaster translated each paragraph on its own, so a passage was closed and reopened at every paragraph break.
Fix
The docx import marks List Paragraph items with
utd:passageRun. Word's "List" and "List 2" items import as the same list items, but they aren't marked. When a passage at the end of one marked block carries on at the start of the next,GenericBlockActiontranslates the run in one liblouis call (the paragraphs joined by a newline), and each block keeps the cells that come from its own text.A passage that ends inside its paragraph, Normal and "List" paragraphs, headings, and non-UEB tables (Spanish, EBAE) are translated as before.
Known differences and limits
,,,. This PR matches Duxbury (one,,,) instead.Tests
DocxPassageRunTest(15 tests): the job examples, bold/italic/bold+underline runs, bold that ends partway through the next paragraph, two bold words, a run across a braille page break, and Normal and "List" paragraphs that are unchanged.