2

I am looking for a way to automatically insert soft hyphens (­ or unicode character) to hyphenate words into HTML document from command line.

1) What is best way to do so from command line?

2) What are options where it comes to using different dictionaries/rules to word hyphenation? Are there rules for languages other than English?

I am aware that some software, including LibreOffice like decribed in Automatic hyphenation software, have option to apply hyphenation to document, but I am looking for way to do so in already existing HTML document without using word processing software.

1 Answer 1

1

If what you are looking for is to simply replace - with ­, you could just use sed:

sed -i 's/-/\­/g' file.html

The command above will edit file.html and make the replacement you want.

Your other question is not on topic here so I won't go into any depth but yes, different languages often have different hyphenation rules.

1
  • Thanks, but question was about using command line tool that will detect hyphenation points and insert them, not simply replacing hyphens to soft hyphens.
    – Rafal
    Apr 10, 2014 at 10:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .