sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
21 stars 7 forks source link

hboxing character styles #959

Open mhosken opened 2 weeks ago

mhosken commented 2 weeks ago

When a character style indicates it can take attributes, the text in that character style is first put into an hbox before being inserted into the text. This means that the text can't be line broken or take discretionary hyphens. But not every text like that needs hboxing. What is needed is a way to indicate that text in a particular style needs hboxing based on whether the attributes are actually used for typesetting (e.g. href-link or \rb). So each marker gets a flag to say if it needs to be hboxed or not. This can be analysed when the stylesheet is read and set accordingly.

If a job wants to write code to process such text it can either use \sethook{start}{mrkr}{\setbox\fredbox=\hbox\bgroup} or it can set the appropriate csname flag for the mrkr.