This issue is applicable to both HTML and PDF output, so I cross-posted here in Web-based Outputs and in Printed Outputs:
We are producing a service architecture document, part of which consists of descriptions of various services. Some of the services have very very long single-word names. Each service name is displayed as an h1 header.
In HTML output, when the screen width is very narrow (such as in mobile displays), a long single-word name is not wrapped but rather runs off the page.
wide-screen display:
narrow-screen display:
In PDF output:
(1) the section number is on a different line from the header text
(2) the long single-word name is wrapped in the middle, but if the name is copied and pasted, at the point of the PDF word wrap an extra space has been added in the middle of the name. This is not good, as the document is used as a reference from which information is copied/pasted into other code. An extra space will mess up the code.
PDF word wrap display:
Is there any way to control the word wrap in such long single words so that in both PDF and HTML display the long single-word service name will be wrapped in the middle of the word without an extraneous added space, and in PDF display the section number will be on the same line as the header text?
Thanks in advance,
Moshe
Word wrap issue with long single words
Word wrap issue with long single words
You do not have the required permissions to view the files attached to this post.
Moshe Davis
Jerusalem, Israel
Jerusalem, Israel
Re: Word wrap issue with long single words
Hi there,
The only reliable method that I know is to insert a zero-width space () at the locations where you would like your word to break (it will still only break there if it has to). The only problem with this approach is that if somebody searches for theReallyLongWord using the search, they won't get any search results.
The only reliable method that I know is to insert a zero-width space () at the locations where you would like your word to break (it will still only break there if it has to). The only problem with this approach is that if somebody searches for theReallyLongWord using the search, they won't get any search results.
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."