Last Character in a Line (Soft Hyphens)
Posted: 2018-01-31 02:24:59
G’day, all
My world seems to be revolving around hyphens at the moment.
My current interest is the manual insertion of hyphens in words that are too long to fit at the end of one line but whose wrapping to the next line leaves too much white space in the (fully justified) previous line. I think that the use of soft hyphens in such cases could avoid the problem associated with “conventional” hyphens which persist inappropriately when subsequent textual manipulations (such as insertions or deletions) result in the word’s appearing all on the one line: soft hyphens, by contrast, magically appear and disappear as required.
The problem with soft hyphens is that Nisus Writer Pro displays a soft hyphen differently from a conventional hyphen, so all instances of the former which occur at the end of a line — and only those that occur at the end of a line! — will eventually need to be replaced by instances of the latter. Once this is done, it’s easy enough to delete the remaining soft hyphens if desired.
So — and this is another recurring theme in my life that I haven’t yet mastered — I somehow need to be able to determine whether a given character — in this case, the soft hyphen character — occurs at the end of a line or not.
The aim is to have a macro that one runs as part of one’s suite of processes just before a document is gift-wrapped for the world at large.
Any help would be appreciated.
Cheers,
Adrian
My world seems to be revolving around hyphens at the moment.
My current interest is the manual insertion of hyphens in words that are too long to fit at the end of one line but whose wrapping to the next line leaves too much white space in the (fully justified) previous line. I think that the use of soft hyphens in such cases could avoid the problem associated with “conventional” hyphens which persist inappropriately when subsequent textual manipulations (such as insertions or deletions) result in the word’s appearing all on the one line: soft hyphens, by contrast, magically appear and disappear as required.
The problem with soft hyphens is that Nisus Writer Pro displays a soft hyphen differently from a conventional hyphen, so all instances of the former which occur at the end of a line — and only those that occur at the end of a line! — will eventually need to be replaced by instances of the latter. Once this is done, it’s easy enough to delete the remaining soft hyphens if desired.
So — and this is another recurring theme in my life that I haven’t yet mastered — I somehow need to be able to determine whether a given character — in this case, the soft hyphen character — occurs at the end of a line or not.
The aim is to have a macro that one runs as part of one’s suite of processes just before a document is gift-wrapped for the world at large.
Any help would be appreciated.
Cheers,
Adrian