H&J rules and url's

I am a bit confused on what is supported by XPP and what not.

You have a text with long url's in it and you don't want the url's to be hyphenated in the normal way but only at the forward slashes.
You set up a h&j table - lets say nr 2 - that handles that case and allows hyphenation only at the forward slashes.

You have the following para:


<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>

The CSS setup is to use h&j table 1 for the para element and h&j table 2 for the url element. According to the doc, the -xpp-hj-table property is inherited, which means once the url element is finished we should return to h&j table 1.

However this is what we get in XPP:

Screenshot of Trados Studio showing a paragraph with a long URL hyphenated at forward slashes, followed by text without proper hyphenation.

If you click inside the url, the status window shows that you are indeed using table nr 2 and the line ends correctly on a /. But for text following the url the status window indicates that we are using table nr 2 (and not 1) and there is no normal hyphenation taking place.

When I look in the xymacro do at the corresponding tj macro, the doc says for the location of the tj macro:
After the pgraf or tag, but before the text on the first line where
you want the change to take affect.

Questions:
1. Are we not allowed to change h&j table in the middle of a para of text? doc says no, system says yes. What are the exact and supported use case (according to engineering?)

2. Anybody similar experiences with h&j table changes in the middle of a para?

3. That the system does not return to h&j table nr 2 is this a bug?

Remark: using XPP V9.5 



Generated Image Alt-Text
[edited by: Trados AI at 5:25 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply
  • Chris,

    The current behaviour of the system is - as far as I understood it-  when you switch to a different H&J table in the middle of a line:
    - the settings for justifying the line (like min/max/optimal space) only take effect on the next line
    - but the settings for hyphenation (like the exception characters) take effect immediately. (as proven by my url example)
    The current behaviour makes perfect sense to me.

    But I see no reason why the same would not happen when the tag ends in the middle of a line.

    I guess that the real problem is that the H&J table contains settings for both justifying a line and for hyphenating a word.
    (It would have been better if those things would have been split - but I guess it is a little too late for that Stuck out tongue winking eye)

Children
No Data