From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/98380 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.comp.tex.context Subject: Re: how to hyphenate SHA512? Date: Fri, 7 Jul 2017 22:28:23 +0200 Message-ID: <595feee6.c5d51c0a.cf0df.3bea@mx.google.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4183702392945972010==" X-Trace: blaine.gmane.org 1499459345 3738 195.159.176.226 (7 Jul 2017 20:29:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Jul 2017 20:29:05 +0000 (UTC) To: Pablo Rodriguez , mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 07 22:28:55 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTZry-0000TH-W0 for gctc-ntg-context-518@m.gmane.org; Fri, 07 Jul 2017 22:28:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BB89A87133; Fri, 7 Jul 2017 22:28:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xz9uZPKtKve8; Fri, 7 Jul 2017 22:28:36 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id EA6ED87125; Fri, 7 Jul 2017 22:28:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2ECF787125 for ; Fri, 7 Jul 2017 22:28:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aoj3_MKygWSb for ; Fri, 7 Jul 2017 22:28:34 +0200 (CEST) Original-Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 069D787124 for ; Fri, 7 Jul 2017 22:28:23 +0200 (CEST) Original-Received: by mail-wr0-f173.google.com with SMTP id k67so61448563wrc.2 for ; Fri, 07 Jul 2017 13:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:mime-version:to:from:subject:date:importance:in-reply-to :references; bh=Rqp5w1ztm3TUUjV8G911HW7K7eR7GRIOIK+YgJp4Oc4=; b=Kr0hlR2/L0qypaKnJ6IC9kjWVSuq3jizhbVefBtk1W5Ynxz0mQJjwbLzY7+8xdgOuh QvY/5W3H55BeVsMhcAqH6wHQSJTlS315ifdHqorlsRvgdv47LPvEZW7rwj4YeSNi9LQW ZxA3RkdI+i3q2fh24OiVolFMdZ69xMkh6LLBkEKr1E3PVsj3ShZaEFrV3cSdCW4bJT0+ APwJyJMNAjNXmOhD7ckYILMZYT7m9Ci1hSSVUcIsxUmOtG5uOMM45hqn4Q0oQJH8sOMa eyxlJs6uUaqzKIdkO0boEU7h77O/ka7adOuS1mTdJWwVKSms+L1NMeKTPT+HERxMnyhW qjjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version:to:from:subject:date :importance:in-reply-to:references; bh=Rqp5w1ztm3TUUjV8G911HW7K7eR7GRIOIK+YgJp4Oc4=; b=b5FvhNecL871rctXv8SN7U9Sy4pU7uyLco+eiFfH6uNy+9qEPKwkK3BjQZFZzB87fX vOMJ9uPSFpb9AMVi7/VUGDjb5/7p4+kQJpK9fpcXkZ1kogA5b+7nb1dzPNAkRn8AmaQ7 VrbhJnjsNLYGE5cIdQWSslsPYP03y4bWXyLKFYHlEDTTLsSQsdtbxSc6gUaZ25E7a9sH PSkE58dQnX9597FiV4Uh45sAQkx72JRdYkViW/iPTXQ5/nN3o5ZyAYgnfeVFUJi+CnZ1 LR4pXBGPsvpAT5VetjqeVx4QWB5BziqGCTz8HSd1qu9TwjDU7tNMcEGb6n0tWbr2b4+Z M2Qg== X-Gm-Message-State: AIVw1112IjLZg5wLgBJwGCn7Aw5xPU98L7Ik2CphNMXGB7rIGoCexAQc KrL8+C/f92HBqA== X-Received: by 10.223.148.129 with SMTP id 1mr1808227wrr.28.1499459303651; Fri, 07 Jul 2017 13:28:23 -0700 (PDT) Original-Received: from ?IPv6:2a01:cb00:6ae:7f00:19f4:c594:b734:c487? (2a01cb0006ae7f0019f4c594b734c487.ipv6.abo.wanadoo.fr. [2a01:cb00:6ae:7f00:19f4:c594:b734:c487]) by smtp.gmail.com with ESMTPSA id m188sm556707wmg.34.2017.07.07.13.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2017 13:28:22 -0700 (PDT) Importance: normal X-Priority: 3 In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:98380 Archived-At: --===============4183702392945972010== Content-Type: multipart/alternative; boundary="_C0470B4B-4A8E-4F0D-8234-C622F135C1C2_" --_C0470B4B-4A8E-4F0D-8234-C622F135C1C2_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A probably quick and dirty =C2=AB=C2=A0solution=C2=A0=C2=BB, 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 =3D {} for i =3D 1, s:len() do out[#out + 1] =3D s:sub(i, i) end context(table.concat(out, '\\discretionary{_}{}{}')) end \stopluacode \starttext % \hsize\zeropoint \hyphenation %%8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc25% %%7a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2 \ctxlua{sha([[8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845c= c257a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2]])} \stoptext De=C2=A0: Pablo Rodriguez Envoy=C3=A9 le=C2=A0:jeudi 6 juillet 2017 12:00 =C3=80=C2=A0: mailing list for ConTeXt users Objet=C2=A0:[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 --=20 http://www.ousia.tk ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________= ________ --_C0470B4B-4A8E-4F0D-8234-C622F135C1C2_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

A probably quick and dirty =C2=AB = ;solution =C2=BB, which consists in inserting a \discretionary node be= tween each digit using some lua code. There are mostly likely better soluti= ons for this.

Joseph

&= nbsp;

\startluacode

<= o:p> 

function sha(s)

=C2=A0=C2=A0 local out =3D {}

=C2=A0=C2=A0 fo= r i =3D 1, s:len() do

=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 out[#out + 1] =3D s:sub(i, i)

=C2=A0=C2=A0 end<= /p>

=C2=A0=C2=A0 context(table.concat(out, '\\discretio= nary{_}{}{}'))

end

&nb= sp;

\stopluacode

 

\starttext

% = \hsize\zeropoint

\hyphenation

 

%%8b2f3c087046c3943ace0dc4f958= ef2138e58a51b40eef6fab6fa1aeb845cc25%

%%7a410ab1b91= 4bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2

 

\ctxlua{sha([[8b2f3c087046c394= 3ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc257a410ab1b914bc399b4293f31c7= 6fc2c73e5be5ea4d329f9e6820984688efec2]])}

&nbs= p;

\stoptext

&nb= sp;

 

= De : Pablo Rodriguez
Env= oy=C3=A9 le :jeudi 6 juillet 2017 12:00
=C3=80 : mailing list for ConTeXt users
<= b>Objet :[NTG-context] how to hyphenate SHA512?

 

Dear list,

 

I have the followi= ng sample:

 

=C2=A0=C2=A0=C2=A0 \starttext

=C2=A0=C2=A0=C2=A0 = \hsize\zeropoint

=C2=A0=C2=A0=C2=A0 hyphenation

=

 

=C2=A0=C2=A0= =C2=A0 8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc25%

=C2=A0=C2=A0=C2=A0 7a410ab1b914bc399b4293f31c76fc2c73= e5be5ea4d329f9e6820984688efec2

=C2=A0=C2=A0=C2=A0 \= 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

--

http://www.ousia.tk

______________________________________________________________= _____________________

If your question is of intere= st to others as well, please add an entry to the Wiki!

 

maillist : ntg-context@ntg.nl= / http://www.ntg.nl/mailman/listinfo/ntg-context

w= ebpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net

archive=C2=A0 : https://bitbucket.org/phg/context-mirror/c= ommits/

wiki=C2=A0=C2=A0=C2=A0=C2=A0 : http://conte= xtgarden.net

______________________________________= _____________________________________________

=  

= --_C0470B4B-4A8E-4F0D-8234-C622F135C1C2_-- --===============4183702392945972010== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============4183702392945972010==--