Reply to: Wrapping in TablesOctober 26, 2011 at 6:49 pm
By default the output is designed to shrink the word and letter spacing so that a sentence or word fits on a line. In this case as your URL is considered a “word” (no spaces) it cannot be broken to line wrap and the entire thing is gets negative “kerning” applied to the point where in some cases letter may overlap making it unreadable.
There will be many different solutions for this, but one that I have decided seems to be best is to insert a ZERO WIDTH SPACE (U+200B) after certain characters within certain elements. This gives RenderX XEP the opportunity to break on these characters when necessary (and that take precedence over its text shrinking logic).
In your specific case you can try something like the following. In this case I had a client that often had very long URLs included with other code inside
The following code change will work under these conditions:
1. You generate output using the deliverable named “XMetaL Enhanced PDF via RenderX XEP”.
2. Your URL (or whatever your long text string is) contains the character “/” at regular intervals, with each chunk divided by it being short enough to fit within the containing space. This is easily modified if you want to break at other characters instead (see code).
3. Your URL is contained within the element
File to change:
If you will be distributing this to other users it would be best to modify the following file instead and then [url=http://forums.xmetal.com/index.php/topic,1008.msg3257.html#msg3257]redeploy[/url] the DITA OT:
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemoxmfoCustomizationfoxslcustom.xsl
exclude-result-prefixes=”opentopic exslf opentopic-func”
Remember that you need to duplicate the existing template entirely (as done here) in order to retain anything it was doing before (because an override template entirely replaces the original, it does not extend it). I usually duplicate a template right inside the file it is inside first, then make mods to the duplicate copy while testing. Then once it is working I move everything into the custom.xsl to keep things neat and tidy. Note as well that I comment where any templates I am overriding are by including a reference to the filename. This way, in future versions of the DITA OT specifically, you can find those files and check to see if you need to update your modified version.