Undesired hyphens in word-break context

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

Undesired hyphens in word-break context

Post by Niels »

In Flare 2017 r3 we have defined codebox styles (based on "div" with "p" in one use case and "pre" in another) for long sections of XML code in PDF print output. Ideally I would like to deactivate any auto insertion of hyphens and we do not mind having words break anywhere inside. However, attempts to achieve this by a style setting show no effect, such as using "hyphens: none;", e.g.:
div.codebox {... hyphens: none; ...}
Can there be any CSS rules in conflict here, or is this just not supported, or is there any foolproof alternative to get rid of hyphens?

Rationale & related bug
We want to make sure that correct XML syntax is documented and in particular there is the related bug 119499 (see: viewtopic.php?f=10&t=20557&p=124130&hil ... ns#p125865) where single letters are duplicated after a hyphen in PDF output.
Last edited by Niels on Wed Mar 14, 2018 8:18 am, edited 2 times in total.
Niels
Propeller Head
Posts: 89
Joined: Thu Dec 15, 2016 8:41 am
Location: Köln

Re: Undesired hyphens in word-break context

Post by Niels »

Found solutions with the help of the MadCap Flare CSS style guide (FlareStylesGuide.pdf):
  • use property "mc-hyphenate = never" (listed among "Show all properties > Unclassified")
  • apply this via a complex selector (e.g. on div/p style such as div.codebox > p style)
  • apply this directly on a style (e.g. a preformatted "pre.codebox")
Post Reply