From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108274 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Re: teaser Date: Thu, 6 Aug 2020 23:22:08 -0500 Message-ID: References: <2c19e981-9798-a373-cd92-4b43b497db6c@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3151548345642121710==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3047"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 07 06:22:45 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3tu0-0000h8-Ll for gctc-ntg-context-518@m.gmane-mx.org; Fri, 07 Aug 2020 06:22:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7613B164600; Fri, 7 Aug 2020 06:22:24 +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 pxVasOPilOJy; Fri, 7 Aug 2020 06:22:22 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A94DE161754; Fri, 7 Aug 2020 06:22:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C69F3163672 for ; Fri, 7 Aug 2020 06:22:21 +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 2_CyY_dQuGIV for ; Fri, 7 Aug 2020 06:22:20 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.46; helo=mail-wr1-f46.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 7A2B516096D for ; Fri, 7 Aug 2020 06:22:20 +0200 (CEST) Original-Received: by mail-wr1-f46.google.com with SMTP id l2so399043wrc.7 for ; Thu, 06 Aug 2020 21:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=25rycqE2sEshBc5Gc9vATbfqExlMTg/zKVCdckF1T8Q=; b=V2qN3k44vT+412jLBxBf4Nr8mIefnP0ZmsOrPDWF/kb3facQM18VtUOsVvCLnBF/RS AWC48cl6VQl61uemAELAOaGiTaXX2p22ZjGS9m8Gl8c3DX3SZvTJU9ydlc1TthK4f9Jc nnE1ZaWovD6+Je3OWFhVYezhG30rV+1EB5z0Tg/mECSIQTPe7QDJiNpg0dlnt5IEL3xo ErTtroCPXK4z9WbvA/WNDQg6a/e9Rwvyvp8H6b5R2ODs9JPHzhNTUKjZSpWBB8alwK8H 22jqRd9l5cM10TS7iHHGwXZuXhXKHhCSbrS0dA4ThFBEifUSSrJP9asdOy2wlmztifB6 pj1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=25rycqE2sEshBc5Gc9vATbfqExlMTg/zKVCdckF1T8Q=; b=rLwa+IM9mmkNhnuJDaS1M2oA0YlEVMmswn/RfuGEqVk+l7zI1qn/rFzQZe0rHwKnlW amZs6fy/NJwJboPK/lDeIYO69EZ4O0ccm/VzcpE7g0yY3nHCZeH32FQTialImepCM8pU R6m5FKjuG/heCVOtsij1kl3YFfIQDiI8TwRP/X8RIhQsgEoeBQpA7C+eIL8PiJ0V1d5d luCXCVjgLbQqvZlomYLuYtmCbNT5M9BMeuDKGty8ISIFv014ULYM34sjM6y5R98XH7rw iWoSS3cDgg7BNTludDNeDtZY95v3RPpnXI1FQaoARrmIlu6k3PbYmxjse0ACbsYcANEL 1mwQ== X-Gm-Message-State: AOAM533RfpXjZOccyiVAadblosJwT9sRn9DoULIIl8U8JlF/lDw78fbr 4/VMrtCWouVFim6SPOGfZZ6h1YQMido5yftD2LN46lJBniQ= X-Google-Smtp-Source: ABdhPJxnEbhafj71IQBSxAQD+0RI0O9xC1vKKMT+4R0yIE60loVwFqo8AxiRew3vOSdKrweFAi3mJUG5YjiU0nW6bOU= X-Received: by 2002:adf:f485:: with SMTP id l5mr9414008wro.147.1596774139671; Thu, 06 Aug 2020 21:22:19 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:108274 Archived-At: --===============3151548345642121710== Content-Type: multipart/alternative; boundary="00000000000061b6e405ac41f3d4" --00000000000061b6e405ac41f3d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Looks useful for multilingual documents, e.g. interleaved lines or linguistic glosses. The following example worked for me, but I share in case there's a way to do better code from it: \starttext \newbox\spanishbox \newbox\englishbox \newbox\frenchbox \setbox\spanishbox\vbox\bgroup\red\obeylines Conoc=C3=AD a un viajero de una tierra antigua quien dijo: =C2=ABdos enormes piernas p=C3=A9treas, sin su tronco se yerguen en el desierto. A su lado, en la arena, semihundido, yace un rostro hecho pedazos, cuyo ce=C3=B1o y mueca en la boca, y desd=C3=A9n de fr=C3=ADo dominio, cuentan que su escultor comprendi=C3=B3 bien esas pasiones las cuales a=C3=BAn sobreviven, grabadas en estos inertes objetos, a las manos que las tallaron y al coraz=C3=B3n que las aliment=C3=B3. Y en el pedestal se leen estas palabras: "Mi nombre es Ozymandias, rey de reyes: =C2=A1Contemplad mis obras, poderosos, y desesperad!" Nada queda a su lado. Alrededor de la decadencia de estas colosales ruinas, infinitas y desnudas se extienden, a lo lejos, las solitarias y llanas arenas=C2=BB. \egroup \setbox\englishbox\vbox\bgroup\blue\obeylines I met a traveller from an antique land, Who said=E2=80=94=E2=80=9CTwo vast and trunkless legs of stone Stand in the desert. . . . Near them, on the sand, Half sunk a shattered visage lies, whose frown, And wrinkled lip, and sneer of cold command, Tell that its sculptor well those passions read Which yet survive, stamped on these lifeless things, The hand that mocked them, and the heart that fed; And on the pedestal, these words appear: My name is Ozymandias, King of Kings; Look on my Works, ye Mighty, and despair! Nothing beside remains. Round the decay Of that colossal Wreck, boundless and bare The lone and level sands stretch far away.=E2=80=9D \egroup \setbox\frenchbox\vbox\bgroup\darkgray\obeylines J=E2=80=99ai rencontr=C3=A9 un voyageur de retour d=E2=80=99une terre antiq= ue Qui m'a dit : =C2=AB Deux immenses jambes de pierre d=C3=A9pourvues de bust= e Se dressent dans le d=C3=A9sert. Pr=C3=A8s d=E2=80=99elles, sur le sable, =C3=80 moiti=C3=A9 enfoui, g=C3=AEt un visage bris=C3=A9 dont le sourcil fr= onc=C3=A9, La l=C3=A8vre pliss=C3=A9e et le rictus de froide autorit=C3=A9 Disent que son sculpteur sut lire les passions Qui, grav=C3=A9es sur ces objets sans vie, survivent encore =C3=80 la main qui les imita et au c=C5=93ur qui les nourrit. Et sur le pi=C3=A9destal il y a ces mots : "Mon nom est Ozymandias, Roi des Rois. Voyez mon =C5=93uvre, =C3=B4 puissants, et d=C3=A9sesp=C3=A9rez !" =C3=80 c=C3=B4t=C3=A9, rien ne demeure. Autour des ruines De cette colossale =C3=A9pave, infinis et nus, Les sables monotones et solitaires s=E2=80=99=C3=A9tendent au loin. =C2=BB \egroup \dorecurse{\boxlines \spanishbox}{% \strut\llap{\hbox to 1.5em{\txx#1\hss}}\boxline \englishbox#1\par \strut\boxline \spanishbox#1\par \strut\boxline \frenchbox#1\par \blank } \stoptext Thank you for the goodies, Hans Regards, Jairo :) El jue., 6 de ago. de 2020 a la(s) 13:13, Wolfgang Schuster ( wolfgang.schuster.lists@gmail.com) escribi=C3=B3: > Hans Hagen schrieb am 06.08.2020 um 19:26: > > Hi, > > > > I uploaded a new lmtx version ... it has a new mechanism for > > manipulating boxes: > > > > http://www.pragma-ade.com/general/magazines/mag-1105-mkiv.pdf > > > > (also in distribution) > > > > Of course experimental but I bet that some can think of usage. > > The \copyboxline command doesn't stop at the end of the requested line. > > BTW: Is it possible to have unbox command to get the width of the > content in the lines without the spaces at the begin end. This is useful > to get the width of first/last line in a box. > > %% begin example > \starttext > > \setbox0\vbox > {\hsize=3D4cm > one\par > two\par > three\par > four} > > \setbox2\ruledhbox{\copyboxline 0 2} > \setbox4\ruledhbox{\boxline 0 3} > %\setbox6 \boxline 0 5 % error > > [2] [\box2] \par > [3] [\box4] \par > [5] [\box6] \par > > \stoptext > %% end example > > Wolfgang > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --00000000000061b6e405ac41f3d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Looks useful for multilingual documents, e.g. interle= aved lines or linguistic glosses.
The following example worked fo= r me, but I share in case there's a way to do better code from it:
<= div>

\starttext
\newbox\spanishbox
\newbox\englishbox
\n= ewbox\frenchbox

\setbox\spanishbox\vbox\bgroup\red\obeylines
Co= noc=C3=AD a un viajero de una tierra antigua
quien dijo: =C2=ABdos enorm= es piernas p=C3=A9treas, sin su tronco
se yerguen en el desierto. A su l= ado, en la arena,
semihundido, yace un rostro hecho pedazos, cuyo ce=C3= =B1o
y mueca en la boca, y desd=C3=A9n de fr=C3=ADo dominio,
cuentan = que su escultor comprendi=C3=B3 bien esas pasiones
las cuales a=C3=BAn s= obreviven, grabadas en estos inertes objetos,
a las manos que las tallar= on y al coraz=C3=B3n que las aliment=C3=B3.
Y en el pedestal se leen est= as palabras:
"Mi nombre es Ozymandias, rey de reyes:
=C2=A1Conte= mplad mis obras, poderosos, y desesperad!"
Nada queda a su lado. Al= rededor de la decadencia
de estas colosales ruinas, infinitas y desnudas=
se extienden, a lo lejos, las solitarias y llanas arenas=C2=BB.
\egr= oup

\setbox\englishbox\vbox\bgroup\blue\obeylines
I met a travel= ler from an antique land,
Who said=E2=80=94=E2=80=9CTwo vast and trunkle= ss legs of stone
Stand in the desert. . . . Near them, on the sand,
H= alf sunk a shattered visage lies, whose frown,
And wrinkled lip, and sne= er of cold command,
Tell that its sculptor well those passions read
W= hich yet survive, stamped on these lifeless things,
The hand that mocked= them, and the heart that fed;
And on the pedestal, these words appear:<= br>My name is Ozymandias, King of Kings;
Look on my Works, ye Mighty, an= d despair!
Nothing beside remains. Round the decay
Of that colossal W= reck, boundless and bare
The lone and level sands stretch far away.=E2= =80=9D
\egroup

\setbox\frenchbox\vbox\bgroup\darkgray\obeylines =
J=E2=80=99ai rencontr=C3=A9 un voyageur de retour d=E2=80=99une terre a= ntique
Qui m'a dit : =C2=AB Deux immenses jambes de pierre d=C3=A9po= urvues de buste
Se dressent dans le d=C3=A9sert. Pr=C3=A8s d=E2=80=99ell= es, sur le sable,
=C3=80 moiti=C3=A9 enfoui, g=C3=AEt un visage bris=C3= =A9 dont le sourcil fronc=C3=A9,
La l=C3=A8vre pliss=C3=A9e et le rictus= de froide autorit=C3=A9
Disent que son sculpteur sut lire les passions<= br>Qui, grav=C3=A9es sur ces objets sans vie, survivent encore
=C3=80 la= main qui les imita et au c=C5=93ur qui les nourrit.
Et sur le pi=C3=A9d= estal il y a ces mots :
"Mon nom est Ozymandias, Roi des Rois.
V= oyez mon =C5=93uvre, =C3=B4 puissants, et d=C3=A9sesp=C3=A9rez !"
= =C3=80 c=C3=B4t=C3=A9, rien ne demeure. Autour des ruines
De cette colos= sale =C3=A9pave, infinis et nus,
Les sables monotones et solitaires s=E2= =80=99=C3=A9tendent au loin. =C2=BB
\egroup

\dorecurse{\boxline= s \spanishbox}{%
\strut\llap{\hbox to 1.5em{\txx#1\hss}}\boxline \englis= hbox#1\par
\strut\boxline \spanishbox#1\par
\strut\boxline \frenchbox= #1\par =C2=A0
\blank
}
\stoptext

Thank you for the goodies, Hans

=
Regards,

Jairo :)

El jue., 6 de ago. = de 2020 a la(s) 13:13, Wolfgang Schuster (wolfgang.schuster.lists@gmail.com) escribi=C3=B3:
Hans Hagen schrie= b am 06.08.2020 um 19:26:
> Hi,
>
> I uploaded a new lmtx version ... it has a new mechanism for
> manipulating boxes:
>
> http://www.pragma-ade.com/general/= magazines/mag-1105-mkiv.pdf
>
> (also in distribution)
>
> Of course experimental but I bet that some can think of usage.

The \copyboxline command doesn't stop at the end of the requested line.=

BTW: Is it possible to have unbox command to get the width of the
content in the lines without the spaces at the begin end. This is useful to get the width of first/last line in a box.

%% begin example
\starttext

\setbox0\vbox
=C2=A0 =C2=A0{\hsize=3D4cm
=C2=A0 =C2=A0 one\par
=C2=A0 =C2=A0 two\par
=C2=A0 =C2=A0 three\par
=C2=A0 =C2=A0 four}

\setbox2\ruledhbox{\copyboxline 0 2}
\setbox4\ruledhbox{\boxline 0 3}
%\setbox6=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\boxline 0 5 % error

[2] [\box2] \par
[3] [\box4] \par
[5] [\box6] \par

\stoptext
%% end example

Wolfgang
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--00000000000061b6e405ac41f3d4-- --===============3151548345642121710== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3151548345642121710==--