From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96224 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Center a framedtext Date: Sun, 25 Sep 2016 22:41:16 +0200 Message-ID: <57E8366C.3080805@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0489498065920512539==" X-Trace: blaine.gmane.org 1474836127 22438 195.159.176.226 (25 Sep 2016 20:42:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Sep 2016 20:42:07 +0000 (UTC) User-Agent: Postbox 5.0.2 (Macintosh/20160922) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 25 22:42:01 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 1boGFC-0003gp-Uq for gctc-ntg-context-518@m.gmane.org; Sun, 25 Sep 2016 22:41:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 207E718DD9; Sun, 25 Sep 2016 22:41: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 f8pYrqzdSt54; Sun, 25 Sep 2016 22:41:34 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id C3DF119647; Sun, 25 Sep 2016 22:41:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F079B1963E for ; Sun, 25 Sep 2016 22:41:32 +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 7dufJ98aP3P9 for ; Sun, 25 Sep 2016 22:41:32 +0200 (CEST) Original-Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (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 719C919618 for ; Sun, 25 Sep 2016 22:41:22 +0200 (CEST) Original-Received: by mail-wm0-f47.google.com with SMTP id l132so118968208wmf.0 for ; Sun, 25 Sep 2016 13:41:22 -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=C1DyQglbcDS357meyZ+FudXH4WFKfYCRwnOlJWy+/tk=; b=VEtZW453MYZyYnJD8L3YUZ+1zD+ayAxifEZLesnBC0cINpLwF/FWEc71Bm5vcEvoDa MCmdpJkEFR3B2jAmWVLtFT4SFedYOKrYPHwv6Qfuw9m4+D8PhOBdeQaPE+IX1uy+dBbe LuYy3Y8FNrwUZsVBYt8KpWd3e486tMFikMHwSED2ImfVr9Yw6H6n0y17QPrzIR94AGIw qXege74DZF4GlGhDkf68XiUZkedafZ9+broeVz/2gI46oTyAE2pvUb51P9Y/gOCsAN4q Xvg4XyazaqQC0VSLkv9vWdIvgYVqMYrDNJuyVLH7fuERJqAuzu+aq3O/adWvr5FULvVP mjoA== 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=C1DyQglbcDS357meyZ+FudXH4WFKfYCRwnOlJWy+/tk=; b=THpjhbwlqdsj+AjnV8x0nvdUtfC/TfYCw81g9P/Ogx4kzpPmAFsAVph22PnlpK0t58 r1vdvQNs+kQW0u/h0eUk2pADqDH2f2Oaat/9w3+aNqFdsW9PMna4+itPJm9IfYtSTCvM VAo0D+ZRfOzvI4aYAMGlfjDQoH5siB1Br+jzcreH8d7yfSYudOWe5wEfZdkgonD0v3wb uP8KNvQ0WwcN0QVGoLo441zEm8zVl3R/veHA7JijLL1JwPXm2PV+qQFd4ggSTTe7LiuM sfwPpDQvCcC4MrJGHc3AiuDlr132fuPeIHSQI4UUA7E287IoWA0Mz6ZYCaU4+itlfd6C uuqg== X-Gm-Message-State: AA6/9Rk6nNneK7eW5qDU4FGCOOJ/olrh539JXM0fJZxvCIYUzkvh0EfHYCKMesv9MOw4Ew== X-Received: by 10.28.49.214 with SMTP id x205mr10686541wmx.130.1474836081371; Sun, 25 Sep 2016 13:41:21 -0700 (PDT) Original-Received: from keima.home ([86.86.82.85]) by smtp.gmail.com with ESMTPSA id 137sm7570584wmi.16.2016.09.25.13.41.20 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 13:41:20 -0700 (PDT) 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:96224 Archived-At: This is a multi-part message in MIME format. --===============0489498065920512539== Content-Type: multipart/alternative; boundary="------------090209020907080206010906" This is a multi-part message in MIME format. --------------090209020907080206010906 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Fabrice Couvreur > 23. September 2016 um 19:46 > Hello, > How to make the algorithm is centered vertically and horizontally? > thank you, > Fabrice > > \defineframedtext > [algorithmframe] > [width=fit, > background=color, > backgroundcolor=lightgray, > framecolor=darkred, > corner=round] > > \definelines > [algorithm] > [space=on, > before=\startalgorithmframe, > after=\stopalgorithmframe] > > \starttext > > \startlinecorrection[blank] > \startmidaligned Replace these two lines with \startmakeup[standard][align=middle] > \startalgorithm > Initialisation : > \math{u} prend la valeur 2\,000 > \math{S} prend la valeur 2\,000 > Traitement : > Pour \math{i} allant de 2 à \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 > > \stopmidaligned > \stoplinecorrection Replace these two lines with \stopmakeup. Wolfgang --------------090209020907080206010906 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
23. September 2016 um 19:46
Hello,
How to make the algorithm is centered vertically and horizontally ?
thank you,
Fabrice

\defineframedtext
  [algorithmframe]
  [width=fit,
   background=color,
   backgroundcolor=lightgray,
   framecolor=darkred,
   corner=round]

\definelines
  [algorithm]
  [space=on,
   before=\startalgorithmframe,
   after=\stopalgorithmframe]

\starttext

\startlinecorrection[blank]
\startmidaligned
Replace these two lines with \startmakeup[standard][align=middle]
\startalgorithm
Initialisation :
  \math{u} prend la valeur 2\,000
  \math{S} prend la valeur 2\,000
Traitement :
  Pour \math{i} allant de 2 à \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

\stopmidaligned
\stoplinecorrection

Replace these two lines with \stopmakeup.

Wolfgang
--------------090209020907080206010906-- --===============0489498065920512539== 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= --===============0489498065920512539==--