Proposal for (source-side) hyphenation support

Nico Huber nico.h at gmx.de
Fri Mar 31 14:33:02 EDT 2017


On 31.03.2017 19:27, Dennis E. Hamilton wrote:
> 
> 
>> -----Original Message-----
>> From: Markdown-Discuss [mailto:markdown-discuss-
>> bounces at six.pairlist.net] On Behalf Of Nico Huber
>> Sent: Friday, March 31, 2017 09:58
>> To: markdown-discuss <markdown-discuss at six.pairlist.net>
>> Subject: Proposal for (source-side) hyphenation support
>>
>> Hi there,
>>
>> don't know if this has been discussed before, or if I just overlooked
>> how to do it: I'm missing support for hyphenation in Markdown files.
>> Looking at always ragged HTML pages is already hard enough, so I can't
>> bear anything but halfway justified text in my editor and manually hy-
>> phenate words.
>>
>> I would do it as follows: 1. If a hyphen followed by a single new-line
>> character is encountered "-\n[^\n]", drop the hyphen and any following
>> whitespace. 2. In case you have to break a word that includes a hyphen,
>> you would escape the new-line character "-\\\n". Like this: Escape new-\
>> line character to preserve the hyphen. This way, the hyphen wouldn't
>> occur in front of the new-line char and 1. doesn't apply. Although, any
>> whitespace following the new-line char would also have to be dropped in
>> this case.
>>
>> What do you think?
> [orcmid] 
> 
> I think we need to think about how this is conveyed into HTML, and what
> browsers might do, since that is where the actual layout width is
> determined.  It should be assumed that reflow can happen at any time and
> the soft-hyphen might be usable along with whatever other automatic
> hyphenation the browser uses.
> 
> A direct method would be to insert soft-hyphen (SHY) codes, code-point
> 0xAD in Unicode and in Latin-1.  
> 
> I recommend working backward from that to find a Markdown escape that
> serves this purpose.

Sorry, I should have made it more clear. I'm not talking about any
effective change of the output. My purpose is to enhance readability
of the Markdown source. Any "escape" that differs visually much from
the usual hyphen before a line break wouldn't serve "this purpose".

The ability to add hyphenation hints in the output might be useful,
too. But is off topic for me.

Nico


More information about the Markdown-Discuss mailing list