From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/105377 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: A question about an algorithm environment Date: Tue, 29 Oct 2019 00:44:09 +0100 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7055665888799860313==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="136230"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 29 00:45:55 2019 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 esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPEhv-000ZGC-Fa for gctc-ntg-context-518@m.gmane.org; Tue, 29 Oct 2019 00:45:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 98DA4161A52; Tue, 29 Oct 2019 00:45:26 +0100 (CET) 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 syyIFBG1L7rz; Tue, 29 Oct 2019 00:45:25 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2CF211626FC; Tue, 29 Oct 2019 00:45:25 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 74EA7161A52 for ; Tue, 29 Oct 2019 00:45:23 +0100 (CET) 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 lYjto5i5U03E for ; Tue, 29 Oct 2019 00:45:22 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.50; helo=mail-wr1-f50.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 D8B45161791 for ; Tue, 29 Oct 2019 00:45:22 +0100 (CET) Original-Received: by mail-wr1-f50.google.com with SMTP id z11so11639601wro.11 for ; Mon, 28 Oct 2019 16:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0RywphALyogIU7/fHS8+vPR+0AOUJRZDnTlc410mTsQ=; b=LLjKg2wBUAHHN5nhTiENL3Z3x44au9dly6vOnr1eoaNJp/Auj4AyK+aAFWOQ0S/Xts 0kwJwg2cmsgZXehJPYJrybyGglqr1xPs83/9PUZBt6Cgb84ncuCqJSmdPnW+tma4+0iL +RB6yeO/uy6NoDCDfrboYWvQQxpm0RhO/b3To5FfaltYmoKVFbf2QObwD6MDvh5gHvl/ fxE8DvgoeDclYpcnNv5Qg19wPxMyF8JkvtL02rbQJN5MTreLF6Lq2Aqi7bNBoWv/1EUq nZlzPR4wfy8vYyOE8EbamJxGnnhxYMppjy+rCF4r6MeVNU8lydvJ/VFzm8Owtu0kwxZ+ RTkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0RywphALyogIU7/fHS8+vPR+0AOUJRZDnTlc410mTsQ=; b=lNlz5tyJ9pUWd1VwmnTeSBh+TBcuiZfNHDbBCBJTUjjNUC+6L545TsUUjtFkOu+0HY DozyJSV5bOEyEFslwsr0VmeIzbzgK8KdJQk6GspZJnNnW2pLAaIR5aqtnXcDY1XqwMO3 HsT0MDbVi/QhLcBp4AfEE6uFhS/AVHIxznj7fTyYHaOLK/SclRxzENJHGnh2WD5trrEt zSB7gpNnHO5hzpDqCMWiCLX01IKyJl2YMXXWFBozZ66nVUk8sEDyFzlNqj3uTV8eTMFE gWCEJD+Y3/dyei7aWDT59wPmZw62+P0qa9+yAgO3WJ1Cpo8xhvbLDOE0TxE4RBX2rTzI BhAQ== X-Gm-Message-State: APjAAAUtwGowRiLVNO6AIJhWLMGSqkQsa2cnXegT2ExnRmCJXttp1/xd yAIuCQOJ1EJQj9jNw0ZQq4+mOzrcVVE05xh+KdpE4RCkgZE= X-Google-Smtp-Source: APXvYqzE9AIzdurVFy61XbquMNpvTe1p4DD/Bk2y8JjbJ+cZHiO0DwSR9aQBz6KEfkyDa372+fYqSKKltDgftZimWYg= X-Received: by 2002:a05:6000:12cd:: with SMTP id l13mr17022271wrx.181.1572306322134; Mon, 28 Oct 2019 16:45:22 -0700 (PDT) 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.org gmane.comp.tex.context:105377 Archived-At: --===============7055665888799860313== Content-Type: multipart/alternative; boundary="000000000000cf1b7005960117eb" --000000000000cf1b7005960117eb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Wolfgang, Why in the first example, the indentation of my Python code that I wish is not respected and that I have to do as the second example to have what I want ? Thank you. Fabrice \defineframedtext [algorithmframe] [width=3Dfit, location=3Dmiddle, foregroundstyle=3D{\tt\switchtobodyfont[11pt]}, framecolor=3Ddarkblue, corner=3Dround] \definelines [algorithm] [space=3Don, before=3D\startalgorithmframe, after=3D\stopalgorithmframe] \starttext \startlinecorrection[blank] \startmidaligned \startalgorithm {\blue def nom} (argument1, argument2,\unknown): \unknown {\orange return} r=C3=A9sultat \stopalgorithm \stopmidaligned \stoplinecorrection \startlinecorrection[blank] \startmidaligned \startalgorithm {\blue def nom} (argument1, argument2,\unknown): \unknown {\orange return} r=C3=A9sultat \stopalgorithm \stopmidaligned \stoplinecorrection \stoptext --000000000000cf1b7005960117eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Wolfgang,
Why in the= first example, the indentation of my Python code that I wish is not respec= ted and that I have to do as the second example to have what I want ?
Thank you.
Fabrice
<= span title=3D"">
=C2=A0\defineframedtext
= =C2=A0 =C2=A0 =C2=A0[algorithmframe]
=C2=A0 =C2=A0 =C2=A0[width=3Dfit,=C2=A0 =C2=A0 =C2=A0 location=3Dmiddle,
=C2=A0foregroundstyle=3D{\tt= \switchtobodyfont[11pt]},
=C2=A0 =C2=A0 =C2=A0 framecolor=3Ddarkblue,=C2=A0 =C2=A0 =C2=A0 corner=3Dround]

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

\starttext
\startlinecorrection[blank]
=C2= =A0 \startmidaligned
=C2=A0 =C2=A0 \startalgorithm
=C2=A0 =C2=A0 =C2= =A0 {\blue def nom} (argument1, argument2,\unknown):
=C2=A0 =C2=A0 =C2= =A0\unknown
=C2=A0 =C2=A0 {\orange return} r=C3=A9sultat
=C2=A0 =C2= =A0 \stopalgorithm
=C2=A0 \stopmidaligned
\stoplinecorrection
\sta= rtlinecorrection[blank]
=C2=A0 \startmidaligned
=C2=A0 =C2=A0 \starta= lgorithm
{\blue def nom} (argument1, argument2,\unknown):
=C2=A0 =C2= =A0 =C2=A0\unknown
=C2=A0 =C2=A0 {\orange return} r=C3=A9sultat
=C2= =A0 =C2=A0 \stopalgorithm
=C2=A0 \stopmidaligned
\stoplinecorrection<= br>\stoptext
--000000000000cf1b7005960117eb-- --===============7055665888799860313== 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== --===============7055665888799860313==--