Dear colleagues,
I have a problem with word-wrap, perhaps someone has an advice. I am working on a very large dictionary. In this dictionary some entries are not from me, but cited from other books. The citations are marked with curly brackets {} followed by the source of the quote in superscript and also with curly brackets around (see the snapshot enclosed).
In the first and in the last entry of the snapshot there is a line break between cited word and source. How can I prevent that, so that always citation and source are in the same line?
Of course there should also not be line break inside the superscript source.
Thanks for help!
Ulrich
Prevent word-wrap
Re: Prevent word-wrap
Perfect, that works. Problem solved.
Thank you very much, Philip.
Thank you very much, Philip.
Re: Prevent word-wrap
G'day, Ulrich et al
Philip's solution is obviously a good one.
For those unsure of where to find a Zero Width Joiner, it is conveniently provided in the Spaces set in the Special Characters Palette.
It is as well to be aware, though, that embedding such characters can cause unexpected results from Find operations if due account is not taken of them. (Even so, they reveal bugs in the Find system. For example, if you select a joiner and the two characters that enclose it, then Find in Selection characters not in the set that contains the two non-joiner characters, one or other of these two characters is erroneously included in the result.) It could be worthwhile recording somewhere that a file contains such (easily overlooked) characters.
There are, too, some peculiarities that could be especially relevant in Ulrich's situation. These Zero Width Joiners will be counted in the Character Count. The two strings they join will be counted as a single word. Ordinarily, double-clicking on either of those two strings will select the entire composite string (as one might expect if the composite is regarded as a single word). However, in the case of text on a normal baseline joined to superscripted text, double-clicking will select only the double-clicked component, not the whole composite. (This may apply in all situations that include unequal baselines, but I haven't tested any others.) Nevertheless, the whole (partially selected) composite will be counted as a single word.
As a final curiosity, these entities may have zero width, but they do have non-zero height. This can be exploited to alter the spacing between two consecutive lines without affecting the spacing between other lines in a paragraph (as the usual line spacing settings will). You can alter the settings for Size and Baseline just for the joiner. It's a bit tricky but it can be done.
Cheers,
Adrian
Philip's solution is obviously a good one.
For those unsure of where to find a Zero Width Joiner, it is conveniently provided in the Spaces set in the Special Characters Palette.
It is as well to be aware, though, that embedding such characters can cause unexpected results from Find operations if due account is not taken of them. (Even so, they reveal bugs in the Find system. For example, if you select a joiner and the two characters that enclose it, then Find in Selection characters not in the set that contains the two non-joiner characters, one or other of these two characters is erroneously included in the result.) It could be worthwhile recording somewhere that a file contains such (easily overlooked) characters.
There are, too, some peculiarities that could be especially relevant in Ulrich's situation. These Zero Width Joiners will be counted in the Character Count. The two strings they join will be counted as a single word. Ordinarily, double-clicking on either of those two strings will select the entire composite string (as one might expect if the composite is regarded as a single word). However, in the case of text on a normal baseline joined to superscripted text, double-clicking will select only the double-clicked component, not the whole composite. (This may apply in all situations that include unequal baselines, but I haven't tested any others.) Nevertheless, the whole (partially selected) composite will be counted as a single word.
As a final curiosity, these entities may have zero width, but they do have non-zero height. This can be exploited to alter the spacing between two consecutive lines without affecting the spacing between other lines in a paragraph (as the usual line spacing settings will). You can alter the settings for Size and Baseline just for the joiner. It's a bit tricky but it can be done.
Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
macOS Ventura
Nisus Writer user since 1996
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Prevent word-wrap
It would be nice if Nisus Writer had a formatting feature to control this, ie: select the text and choose "Keep On Same Line" or something like that. I'll consider this forum thread a vote that we add such a feature in a future update.
But yes, for now using the Zero-Width Joiner special character is the best solution. Here's my blog post on the zero-width joiner in case anyone is interested to read more about it.
But yes, for now using the Zero-Width Joiner special character is the best solution. Here's my blog post on the zero-width joiner in case anyone is interested to read more about it.