![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
Many thanks for your reply, Joseph. The underscore I want to use should be placed below the previous character, such as in (code from Hans): \startluacode function document.addfunnyhyphen(tfmdata) local underscore = utf.byte("_") local char = tfmdata.characters[underscore] if not char then return end tfmdata.characters[0xFE000] = { width = 0, height = 0, depth = 0, commands = { { "right", -char.width }, { "down", char.depth }, { "slot", 1, underscore }, } } end utilities.sequencers.appendaction("aftercopyingcharacters", "after","document.addfunnyhyphen") \stopluacode \definehyphenationfeatures [underscore] [righthyphenchar="FE000] \setuphyphenation [method=traditional] \sethyphenationfeatures [underscore] \starttext \hsize\zeropoint hyphenation \stoptext Is there no way to define a language that hyphenates any pair of characters? Many thanks for your help, Pablo On 07/07/2017 10:28 PM, josephcanedo@gmail.com wrote:
A probably quick and dirty « solution », which consists in inserting a \discretionary node between each digit using some lua code. There are mostly likely better solutions for this.
Joseph
\startluacode
function sha(s) local out = {} for i = 1, s:len() do out[#out + 1] = s:sub(i, i) end context(table.concat(out, '\\discretionary{_}{}{}')) end
\stopluacode
\starttext
\hyphenation
\ctxlua{sha([[8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc257a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2]])}
\stoptext
*De : *Pablo Rodriguez mailto:oinos@gmx.es *Envoyé le :*jeudi 6 juillet 2017 12:00 *À : *mailing list for ConTeXt users mailto:ntg-context@ntg.nl *Objet :*[NTG-context] how to hyphenate SHA512?
Dear list,
I have the following sample:
\starttext \hsize\zeropoint hyphenation
8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc25% 7a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2 \stoptext
I plan to use underscore hyphenation. How can I get the SHA512 string hyphenated in any of its points?
Many thanks for your help,
Pablo