From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96253 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Center a framedtext Date: Tue, 27 Sep 2016 22:02:31 +0200 Message-ID: References: <57E8366C.3080805@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2703534882364429664==" X-Trace: blaine.gmane.org 1475006606 4633 195.159.176.226 (27 Sep 2016 20:03:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2016 20:03:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 27 22:03:21 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 blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boyaw-00087f-I1 for gctc-ntg-context-518@m.gmane.org; Tue, 27 Sep 2016 22:03:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E725B198A7; Tue, 27 Sep 2016 22:02:47 +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 TZugd8cnrLX6; Tue, 27 Sep 2016 22:02:47 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 408F1198A8; Tue, 27 Sep 2016 22:02:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9C344198A6 for ; Tue, 27 Sep 2016 22:02:45 +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 i2ZMxaTN4ynT for ; Tue, 27 Sep 2016 22:02:45 +0200 (CEST) Original-Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) (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 D3DD7198A5 for ; Tue, 27 Sep 2016 22:02:34 +0200 (CEST) Original-Received: by mail-io0-f176.google.com with SMTP id r145so27510027ior.0 for ; Tue, 27 Sep 2016 13:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=QXK1rdPdSzSjZVIOJjNBN0T5MUMo2tPVtn3KQtS2XuI=; b=eZkmc8ekhG7eY0jCfjU1vfAp/KyQc5cEYzz3VW4lG6BrlymOjb41xQmPKlLfsjVPYH n8JxS4SdQ1HQwunEpS9U2ukDh5oYYXu5H1a+X/Ti8JVsNjx2dQRXFIaa0s7MKfLG3tOU j8La9mF2kGBPmYP6l4YBg4l+Z0OKDoc8vhGZjwAAbx4Ge+qlZnVXlRte766fpkCaenl3 qz5nZ4PlaOuOAxspNpz8KuirkaIy72DdGzWY5cm5AoEGT6X+ixpwTUsOTtfU0btGgbCe lVyd68vuxLt+FJLRbNeJu2kSyxWseFoZgw3u1/rkzlvBMGfXNErhZeertHtnarvqAoo4 vZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=QXK1rdPdSzSjZVIOJjNBN0T5MUMo2tPVtn3KQtS2XuI=; b=fKeqPsy9JU+tzOfIrMX69oNeqWhH9KJMdEaBCfWEv9b0W+JxY+AMd0tbyL6OGIa/HJ HRwdC8FsPvvtUvdZLMFuw0AZQIWjiOOCp2TsIt1KDCqH0eU/ktvkGxhZ1OGqjEAZCc6/ CSDsSDtX04Stsq1FYpNxGZn+1NF+RKD+q24qvwOaPG+u2XqLgRCxygmyqLphQciH0R/6 y3/RfMsUG5HCDY6Ez4eimOMpv+ADNpinNThMLpcxezLA01kKh4iAp4e/ukT4sJeHwplx 68ydzveVHo6bJywof9bTQvSFIZs0PULSwBxxmPphdcDKrhL4P3+eKMhodzxRkhOPS+qf rV8g== X-Gm-Message-State: AE9vXwNfiO90N6DccakZCxyszvEF9kD3RarDVYlJBlxEiwA520P4pDLqDTbCbicg3E9u0jAY2jPIhh7GSoO0Mw== X-Received: by 10.107.41.81 with SMTP id p78mr31373208iop.78.1475006552250; Tue, 27 Sep 2016 13:02:32 -0700 (PDT) Original-Received: by 10.64.234.193 with HTTP; Tue, 27 Sep 2016 13:02:31 -0700 (PDT) In-Reply-To: <57E8366C.3080805@gmail.com> 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:96253 Archived-At: --===============2703534882364429664== Content-Type: multipart/alternative; boundary=001a1141fb0496dc69053d82b950 --001a1141fb0496dc69053d82b950 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > Hi Wolfgang, Thank you for your suggestion, but I think I was not clear enough. In fact,= I want to place the algorithm as the image. Fabrice \defineframedtext [algorithmframe] [width=3Dfit, background=3Dcolor, backgroundcolor=3Dlightgray, framecolor=3Ddarkred, corner=3Dround] \definelines [algorithm] [space=3Don, before=3D\startalgorithmframe, after=3D\stopalgorithmframe] \starttext \startmakeup[standard][align=3Dmiddle] \startalgorithm Initialisation : \math{u} prend la valeur 2\,000 \math{S} prend la valeur 2\,000 Traitement : Pour \math{i} allant de 2 =C3=A0 \math{n} \math{u} prend la valeur \math{u\times 1,008} \math{S} prend la valeur \math{S +u} Fin Pour Sortie : Afficher \math{S} \stopalgorithm \stopmakeup \startlinecorrection[blank] \startmidaligned \externalfigure[cow.pdf] \stopmidaligned \stoplinecorrection \stoptext --001a1141fb0496dc69053d82b950 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Wolfgan= g,
Thank you for your suggestion, but I think I<= /span> was not clear enough. In fact, I want to place the algorithm as the image.
Fabrice

\define= framedtext
=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]

\def= inelines
=C2=A0 [algorithm]
=C2=A0 [space=3Don,
=C2=A0=C2=A0 befor= e=3D\startalgorithmframe,
=C2=A0=C2=A0 after=3D\stopalgorithmframe]
<= br>\starttext

\startmakeup[standard][align=3Dmiddle]

\startal= gorithm
Initialisation :
=C2=A0 \math{u} prend la valeur 2\,000
= =C2=A0 \math{S} prend la valeur 2\,000
Traitement :
=C2=A0 Pour \math= {i} allant de 2 =C3=A0 \math{n}
=C2=A0=C2=A0=C2=A0=C2=A0 \math{u} prend = la valeur \math{u\times 1,008}
=C2=A0=C2=A0=C2=A0=C2=A0 \math{S} prend l= a valeur \math{S +u}
=C2=A0 Fin Pour
Sortie :
=C2=A0 Afficher \ma= th{S}

\stopalgorithm

\stopmakeup

\startlinecorrection[= blank]
\startmidaligned

\externalfigure[cow.pdf]

\stopmida= ligned
\stoplinecorrection

\stoptext


--001a1141fb0496dc69053d82b950-- --===============2703534882364429664== 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= --===============2703534882364429664==--