From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95601 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Use \framedtext to write an algorithm Date: Fri, 29 Jul 2016 17:02:12 +0200 Message-ID: <579B6FF4.8000100@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6669208367660976769==" X-Trace: ger.gmane.org 1469804589 14845 80.91.229.3 (29 Jul 2016 15:03:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2016 15:03:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 29 17:02:57 2016 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 plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bT9JR-0003Hb-EJ for gctc-ntg-context-518@m.gmane.org; Fri, 29 Jul 2016 17:02:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A3A8613A18; Fri, 29 Jul 2016 17:02:27 +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 TLAlBoJrOgee; Fri, 29 Jul 2016 17:02:24 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5767913A14; Fri, 29 Jul 2016 17:02:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B4D2713A12 for ; Fri, 29 Jul 2016 17:02:23 +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 yYdwPKrrVZ2w for ; Fri, 29 Jul 2016 17:02:23 +0200 (CEST) Original-Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) (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 3A82A13A0C for ; Fri, 29 Jul 2016 17:02:13 +0200 (CEST) Original-Received: by mail-wm0-f45.google.com with SMTP id f65so293645460wmi.0 for ; Fri, 29 Jul 2016 08:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=CSk5VzLPM/NOTFv0nc6Ev7qwDRqyLN2QXShIiAga/nU=; b=jTjEeJCpmYOCq7lB1ztUkD2KbkqtLGAQwP4Mk+xE++YG/DgPHddlPbPuMk9AVCzM1w ZNT95BOZg0TkPbX4P5oC/xkMhi0pnmSe4aT9VSLvEQH44IGpFQ8Nk5LnQ76tROvr8zsd rhr8IftpchZPyDwd73+/MRZC2Bu87vAMsGfOllNlLlZDqSGJ4pRgXqq8mgRCbtzmm0x5 SlPKy0MwhK9qLBtfargincHuH0FL53oSsyq3xUhSNNIkVYD65AZgz4hkZ2bWaEQV5UyK o0HnSBlJAKkBPGPuZu/a1sV6EoGTniJm2OgWt3+x1GoumDNqzdUO7idRw6Ov6WjHYGvB SE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=CSk5VzLPM/NOTFv0nc6Ev7qwDRqyLN2QXShIiAga/nU=; b=GltEXPif5OA/feOnDRci4QPRKrEel8C98evWt0WpCW8q4A2xSJNVY0mNZiiG0G68rg QclFFMe403y3JiUEQmtirKxaw99ptFiFwhC18BFSxXZCkbyiB/NS1q30/LfNMmQLvLGd eQFrfp09hcpx1ThKFXvJiT/hy4WQmuejf27H807bDmP09lwlP5hozqevUHp4WEZI4t/V sTOwywkSC5o5bW0yAgi9zjO9zWNNwTGznV0b2WD4Pd5RNrfmKXrAN1WYkOm4VmoYiHyN 4dcADc73zGD7uhf+VLRDj7FkRRLHOz68RvoyGNB29B28ZTt1IKJi6aZOqa7QUMjBfzzH Tj4w== X-Gm-Message-State: AEkoouvXo1DPUBAm8YaYqKftNgti05desUZ6Z9oDTQQdMIVXcUTfLVPV+djiFgO9zBaVIA== X-Received: by 10.28.107.88 with SMTP id g85mr1593542wmc.49.1469804532563; Fri, 29 Jul 2016 08:02:12 -0700 (PDT) Original-Received: from keima.localdomain (x2f2c165.dyn.telefonica.de. [2.242.193.101]) by smtp.gmail.com with ESMTPSA id bc10sm16942827wjc.32.2016.07.29.08.02.11 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jul 2016 08:02:12 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) 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:95601 Archived-At: This is a multi-part message in MIME format. --===============6669208367660976769== Content-Type: multipart/alternative; boundary="------------030005070606060809000507" This is a multi-part message in MIME format. --------------030005070606060809000507 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Fabrice Couvreur > 29. Juli 2016 um 16:43 > I know that Wolfgang wrote a module to reproduce algorithms, but it is=20 > in English! > Can we ensure to respect the withdrawal of the text ? You can use the lines environment with enabled spaces (space=3Don). \defineframedtext [algorithmframe] [width=3Dfit, background=3Dcolor, backgroundcolor=3Dlightgray, framecolor=3Ddarkred, corner=3Dround] \definelines [algorithm] [space=3Don, before=3D\startalgorithmframe, after=3D\stopalgorithmframe] \starttext \startalgorithm Variables \math{I} et \math{J} entiers T tableau d'entiers D=C3=A9but Pour \math{I} allant de \math{1} =C3=A0 \math{3} Pour \math{J} allant de \math{1} =C3=A0 \math{3} Si \math{J>I} Alors \math{T[I, J]=3DJ-I} Sinon \math{T[I, J]=3D0} Fin Si Fin Pour Fin \stopalgorithm \stoptext Wolfgang --------------030005070606060809000507 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
29= .=20 Juli 2016 um 16:43
I=20 know that Wolfgang wrote a module<= /span> to reproduce algorithms, but it is in=20 English !
Can we ensure to respect the withdrawal of the text ?<= /span>
You can use the lines environment with enabled spaces (space=3Don).

\defineframedtext
=C2=A0 [algorithmframe]
=C2=A0 [width=3Dfit,
=C2=A0=C2=A0 background=3Dcolor,
=C2=A0=C2=A0 backgroundcolor=3Dlightgray,
=C2=A0=C2=A0 framecolor=3Ddarkred,
=C2=A0=C2=A0 corner=3Dround]

\definelines
=C2=A0 [algorithm]
=C2=A0 [space=3Don,
=C2=A0=C2=A0 before=3D\startalgorithmframe,
=C2=A0=C2=A0 after=3D\stopalgorithmframe]

\starttext

\startalgorithm
Variables \math{I} et \math{J} entiers
T tableau d'entiers
D=C3=A9but
Pour \math{I} allant de \math{1} =C3=A0 \math{3}
=C2=A0=C2=A0 Pour \math{J} allant de \math{1} =C3=A0 \math{3}
=C2=A0=C2=A0=C2=A0=C2=A0 Si \math{J>I}
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Alors \math{T[I, J]=3DJ-I}
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Sinon \math{T[I, J]=3D0}
=C2=A0=C2=A0=C2=A0=C2=A0 Fin Si
=C2=A0=C2=A0 Fin Pour
Fin
\stopalgorithm

\stoptext

Wolfgang
--------------030005070606060809000507-- --===============6669208367660976769== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============6669208367660976769==--