Avoid breaking hyperlink by formatting via span in print

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Niels
Propeller Head
Posts: 89
Joined: Thu Dec 15, 2016 8:41 am
Location: Köln

Avoid breaking hyperlink by formatting via span in print

Post by Niels »

We intend to use two different kinds of formatting for hyperlinks/cross-references in print output:
  • (a) Hyperlinks to external sites should look like the default: blue with underline
  • (b) Internal cross-references shall have some different style (with another color and no underline)
We have decided to adjust the default link style to show the style (b) and to use a span to format hyperlinks to external sites to look like the default for (a). Rationale: There are more internal cross-references than external hyperlinks in our project.

The "span", however, causes the following issue:
In a long hyperlink which contains an underscore, the link target in the generated PDF is broken, as the URL is cut at the position of the underscore, where in the print output a line break occurs.

We do not mind the line break at all. On the contrary, we prefer this instead of a very long non-breaking line.
So I am not looking for a solution that avoids word wrapping in the print output, but we need some way to preserve a working hyperlink target in the generated PDF.

Any ideas on this one?
Niels
Propeller Head
Posts: 89
Joined: Thu Dec 15, 2016 8:41 am
Location: Köln

Re: Avoid breaking hyperlink by formatting via span in print

Post by Niels »

Current solution: Added selector "a.hyperlink" with corresponding formatting.
Post Reply