Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.5K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Is there a conditional hyphenation character?

Posted 2 years ago

Apart from the character \[Hyphen], I cannot find any character for conditional hyphenation as most word processors, especially MS Word, have. That is, a character that is not normally output, but is used as a hyphenation position when needed.

POSTED BY: Werner Geiger
2 Replies
Posted 2 years ago

Thanks, Jason, I hadn't noticed this character [DiscretionaryHyphen] until now.

Unfortunately, it doesn't seem to be used for hyphenation:

Block[{dhyp = "­"(* contains a DiscretionaryHyphen ­*), 
   nameL = {"Ein", "Sehr", "Langer", "Name", "Der", "Getrennt", 
     "Werden", "Sollte"}, name},
  (* Make a String name from list nameL with inserted 
    DiscretionaryHyphen(s) *)
  name = StringRiffle[nameL, dhyp];
  Print[Column[{Style["{nameL,name,name}:", Blue],
     nameL // InputForm, name // InputForm, name // FullForm}]];
  CellPrint[TextCell[name, PageWidth -> 100, Hyphenation -> True]];
  ];

enter image description here

POSTED BY: Werner Geiger

I've not used it, so I can't speak to how well it works, but have a look at DiscretionaryHyphen

POSTED BY: Jason Biggs
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard