Under Community Review

H&J table needs to restored at the end of a tag

Currently the XPP system restores the hyphenation language setting at the end of a tag, but not the h&j table.
As the h&j table contains settings about min/max characters in the hyphenated word and these settings vary according to the language you are using, these does not seem right.

Let me give another use case where you want the H&J table to be restored at the end of a tag:

<para>This is a para of text with in it a url which you only want to hyphenate at the forward slashes.
The url comes somewhere in the middle of the text like here: <url>thisisaverylong/.../</url>
and then the text simply continues and you would liketoseehyphenationagain the system to use the normal h&j table again</para>

For the url you want to use a different H&J table because you want the url only to be hyphenated at the '/' character. but once the url is finished you want to use the normal hyphenation table to be used.
Currently that does not happen. The 'special' h&j table you are using for the url will be used for the rest of the para that is following the url

  • Steve,

    2 remarks

    1. Changing H&J table in the middle of a line

    As far as the exception hyphenation characters are concerned, it seems to me that when you change the H&J table in the middle of a line, the change in settings for the exception hyphenation characters is immediate. (see my url example)
    Don't know about the settings regarding min/max characters though (as it is difficult to find a valid test)
    Or am I wrong in my findings?

    So if the system can change that/those setting(s?) in the middle of a line at the start tag, why can it not restore this/those same setting(s?) at the end tag.

    2. Restoring the H&J table at the end tag

    Forget the middle of the line discussion. But shouldn't the system restore the H&J table at the end tag? (as it does with the language)
    If the restore point falls in the middle of a line, then the restore H&J table should only be valid from the next line (= what happens at the start tag)

  • The answer as to why the H&J is not restored is in the question/statement. The H&J can change min/max characters, letter spacing, ragged zones, etc. While "justifying" a line, these cannot be dynamically  changing out from underneath the algorithm to break the word/line.
    While I never like to say "no", this cannot be changed. Also, I can pretty much guarantee that it would have dire consequences for pages that have been composed prior to any sort of development "fix".  A lot of lines would change their endings.

  • I would like to add to this that the system currently seems to do the following when you switch to a different H&J table in the middle of a line (so at the start url tag:
    - the settings for justifying the line (like min/max/optimal space) takes only effect at the start of the next line
    - the settings for hyphenation (like hyphenation exception characters) take effect immediately.
    This behaviour makes perfect sense.

    So I do not understand why the same does not happen at the end url tag...