From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96257 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Center a framedtext Date: Wed, 28 Sep 2016 09:08:35 +0200 Message-ID: <57EB6C73.3030103@gmail.com> 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="===============5957085864323028714==" X-Trace: blaine.gmane.org 1475046643 16333 195.159.176.226 (28 Sep 2016 07:10:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2016 07:10:43 +0000 (UTC) User-Agent: Postbox 5.0.2 (Macintosh/20160922) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 28 09:10:35 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 1bp90e-0002V6-LN for gctc-ntg-context-518@m.gmane.org; Wed, 28 Sep 2016 09:10:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7354B1944F; Wed, 28 Sep 2016 09:10:12 +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 lbAxkElKwBaL; Wed, 28 Sep 2016 09:10:10 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 71300197FA; Wed, 28 Sep 2016 09:10:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3C54019352 for ; Wed, 28 Sep 2016 09:10:09 +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 fB0GctQ82lMc for ; Wed, 28 Sep 2016 09:10:08 +0200 (CEST) Original-Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (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 2FADB18B97 for ; Wed, 28 Sep 2016 09:09:58 +0200 (CEST) Original-Received: by mail-wm0-f51.google.com with SMTP id l132so218103172wmf.0 for ; Wed, 28 Sep 2016 00:09:58 -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=hqPf8w+vrhVf+ZXNWqgeJBdG/iDqi/I/JKePbcrW2dw=; b=L2/td6q3Mk8tpOTljjWLaD4kmg+krQwfNl68W9pgrMJ5RqNGtgRHqN9knr64xOcas0 PBxasmWz8GaHpNZOfFoGxTrdJ8Nmcp/AOQaAiFwUNesRjcdp8np0wkcMvljNGIp/VJXg 6BLQKtThRA/+ff37mmG/DXWHWlm+s1sZblrg8Wm8CzCGHFjUn4NxASzBDEFoUrSuUPob rk3PJ0AP9fbOW86IeDccP7b6sX5uvPG8rES/IJYAxYnm/FuZhIx7YgcB9ApkokyB+SEk f69vD39z1T1/2k2SzvA2wtzxytRA4h4EXhlZnf76ZZ/2onnMsWN5VJYL9Of05uMrNyik tLQA== 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=hqPf8w+vrhVf+ZXNWqgeJBdG/iDqi/I/JKePbcrW2dw=; b=Pr4FfIkOvP90ulQoffgdvShpsmvj4VZlel9fj5jb6jmbJxZguUhyx8CICZkYzcepY5 C0wu2sDQ6oLPHaEBzmxG8lFezsPDoKFaKeMlJPbVBt53hszlb6fLS0MRuuMPOc7YKkgD oXBw+V64G2/M9SLFL94/0gXgxMFh0Wen87LJUdI1vOVhCLQEUfzDvE+tpUOQDgRTbOsC g86Pz6/uXD1T0NoxgvGcOMGc64wg64fUdCk1CF+01jag59vxq2rJN1P2gz0exVb986eh 9coyYtP0Mk59+huFGlOgCQNOzyq8MZsWjgooN7AVvquxj71B4CNj2yN4cJ3ZMJthUznR 3R1g== X-Gm-Message-State: AA6/9RkrV3Y2Fz86XymJhonvkzl4j7TWJuSC0aggZXymklDTUT4vWV1tb57PbWxoRXuzxw== X-Received: by 10.28.170.73 with SMTP id t70mr6353466wme.32.1475046597559; Wed, 28 Sep 2016 00:09:57 -0700 (PDT) Original-Received: from keima.home ([86.86.82.85]) by smtp.gmail.com with ESMTPSA id q10sm7118487wme.6.2016.09.28.00.09.51 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 00:09:56 -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:96257 Archived-At: This is a multi-part message in MIME format. --===============5957085864323028714== Content-Type: multipart/alternative; boundary="------------020607060901030705020406" This is a multi-part message in MIME format. --------------020607060901030705020406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Fabrice Couvreur > 27. September 2016 um 22:02 > 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. You need also "location=middle" for the framedtext. \defineframedtext [algorithmframe] [width=fit, location=middle, background=color, backgroundcolor=lightgray, framecolor=darkred, corner=round] \definelines [algorithm] [space=on, before=\startalgorithmframe, after=\stopalgorithmframe] \starttext \startmakeup[standard] \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 \stopmakeup \stoptext Wolfgang --------------020607060901030705020406 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
27. September 2016 um 22:02
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.

You need also "location=middle" for the framedtext.

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

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

\starttext

\startmakeup[standard]
\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
\stopmakeup

\stoptext

Wolfgang
--------------020607060901030705020406-- --===============5957085864323028714== 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= --===============5957085864323028714==--