Long URLs can be problematic, especially in multi-column layouts: they don't fit the type measure and cause the story to become permanently overset. The URL Breaking event script increases readability by ensuring that long URLs intelligently break across lines, such as recommended by the Chicago Manual of Style (typically before punctuation and without adding hyphens).
To intelligently break URLs we must first be able to match them, for which we use John Gruber's public domain improved, liberal RegEx for matching URLs with some small adaptations. After finding them we insert custom break points according to the rules outlined by the Chicago Manual of Style.
If different URL breaking rules are required for your purposes, please reach out to your Typefi Solutions Consultant or Business Development Manager about developing a custom version of this script.
Configuration
Your workflow should be configured to run this script at the SpillEnd event.
Excluding paragraph and/or character styles
From v. 1.11 the script can exclude paragraph and/or character styles. To exclude styles, add a text frame on any parent page (previously known as master) and name it URL breaker exceptions. Add a four-cell table. The cells in the first row can contain any text at all (for a header), the cells in the second row contain the style names, with paragraph style names in the first column and character style names in the second column. Each style name should be placed on its own line.
If the frame is not present in the template or if it doesn't contain a table or if the table doesn't contain four cells, the feature is ignored, so there is no need to update a template if you don't want to use the feature.
If you are also using Advanced GREP Styles or Avoid Short End Lines, you may want to rename this script so it appears in the SpillEnd folder before those, causing it to run first.
Comments
0 comments
Please sign in to leave a comment.