Hyphenate @racket[_xexpr] by calculating hyphenation points and inserting @racket[_joiner] at those points. By default, @racket[_joiner] is the soft hyphen (Unicode 00AD = decimal 173). Words shorter than @racket[#:min-length]@racket[_length] will not be hyphenated. To hyphenate words of any length, use @racket[#:min-length]@racket[#f].
@ -96,14 +97,20 @@ You can send HTML-style X-expressions through @racket[hyphenate]. It will recurs
Don't send raw HTML or XML through @racket[hyphenate]. It can't distinguish tags and attributes from textual content, so everything will be hyphenated, thus goofing up your file. But you can easily convert your HTML or XML to an X-expression, hyphenate it, and then convert back.
@margin-note{In HTML, be careful not to include any @code{<script>} or @code{<style>} blocks, which contain non-hyphenatable data. The easiest way to protect that data —and arguably the right way — is to wrap it in a @code{<![CDATA[]]>} tag.}
@examples[#:eval my-eval
(define html "<body style=\"background: yellow\">Hello</body>")
If you're working with HTML, be careful not to include any @code{<script>} or @code{<style>} blocks, which contain non-hyphenatable data. You can protect that data by using the #:omit-tags parameter, which will skip over the listed tags.
Like @racket[hyphenate], but only words matching @racket[_pred] are hyphenated. Convenient if you want to prevent hyphenation of certain sets of words, like proper names: