From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90604 Path: news.gmane.org!not-for-mail From: Emmanuel Asante Newsgroups: gmane.comp.tex.context Subject: Re: How to Centre Multi-line Verbatim Text Date: Sat, 14 Mar 2015 07:28:16 -0600 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1065403023==" X-Trace: ger.gmane.org 1426339744 12234 80.91.229.3 (14 Mar 2015 13:29:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Mar 2015 13:29:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 14 14:28:53 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YWm7V-0003zW-2w for gctc-ntg-context-518@m.gmane.org; Sat, 14 Mar 2015 14:28:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1D32B10230 for ; Sat, 14 Mar 2015 14:28:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4-RjAJjvJapc for ; Sat, 14 Mar 2015 14:28:47 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EE1A910235 for ; Sat, 14 Mar 2015 14:28:22 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E5ECD101FC for ; Sat, 14 Mar 2015 14:28:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qTYS-mj35b08 for ; Sat, 14 Mar 2015 14:28:17 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id D4F03101F9 for ; Sat, 14 Mar 2015 14:28:17 +0100 (CET) Original-Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t2EDSGNo004534 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 14 Mar 2015 14:28:16 +0100 Original-Received: by lbbfd7 with SMTP id fd7so6120949lbb.2 for ; Sat, 14 Mar 2015 06:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pt0aQvKgG7vCpk6o5wjI+hNCFACiBJYUrLlGis1K0xA=; b=iIl8X5gyRXsVlkfOimjrcEjOZrE11KLJ3SgpaBD/Q1zBwRDlZY45KJMyWDw5LdWjBn uYh87RpypL1yNDVbIagr0lL9+lfO/3vVkifQwV4uHNwdM7xov/fMlo1NwcuDjh6epEPb HwMtd4imGHEj8k3hu7c+vcK/KbNX/tWhwDgRS/4EDQtio2dTG1kgenuATCXaH4Uq82lX uD7WH15vWQK6nIKFQOrsCq3TfEEPFMyzAr3Pq6BDGpqcu2AGukZrzIoN2kLnEOH/mpo6 m1AcRL0P807yOHXW8pGmGd+XrnCY4wo0sAeXuyq16xVI3Pl9uWVoUQ8ap7EGWTUhjf5F 3S4g== X-Received: by 10.152.22.200 with SMTP id g8mr46357727laf.96.1426339696227; Sat, 14 Mar 2015 06:28:16 -0700 (PDT) Original-Received: by 10.114.230.7 with HTTP; Sat, 14 Mar 2015 06:28:16 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:4010:c04::229; country=IE; latitude=53.3478; longitude=-6.2597; http://maps.google.com/maps?q=53.3478,-6.2597&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07O3psgdI - eac0ad67126c - 20150314 (trained as not-spam) Received-SPF: pass (filter1-utr.mf.surf.net: domain of emmanuela.asante@gmail.com designates 2a00:1450:4010:c04::229 as permitted sender) receiver=filter1-utr.mf.surf.net; client-ip=2a00:1450:4010:c04::229; envelope-from=; helo=mail-lb0-x229.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . 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:90604 Archived-At: --===============1065403023== Content-Type: multipart/alternative; boundary=089e0158c31aec3d2b05113f966e --089e0158c31aec3d2b05113f966e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you Wolfgang. On Saturday, March 14, 2015, Wolfgang Schuster wrote: > > > Am 13.03.2015 um 21:32 schrieb Emmanuel Asante < > emmanuela.asante@gmail.com >: > > > > Hello All, > > > > I am trying to centre a multi-line verbatim text horizontally on the > page but I cannot figure out how to do that. With the code below how can = I > centre the whole block horizontally on the page? > > > > \setuptyping[TEX] > > > > \startTEX > > RSpec.describe Post, :type =3D> :model do > > end > > \stopTEX > > You can add a framedtext environment around the verbatim text and use > =E2=80=9Clocation=3Dmiddle=E2=80=9D to center it. > > \setuptyping > [TEX] > [before=3D{\startframedtext[location=3Dmiddle]}, > after=3D\stopframedtext] > > \starttext > > \startTEX > RSpec.describe Post, :type =3D> :model do > end > \stopTEX > > \stoptext > > Wolfgang > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ --089e0158c31aec3d2b05113f966e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you Wolfgang.

On Saturday, March 14, 2015, Wolfgang Schuster &= lt;schuster.wolfgang@gmail.c= om> wrote:

> Am 13.03.2015 um 21:32 schrieb Emmanuel Asante <emmanuela.asante@gmail.com>:
>
> Hello All,
>
> I am trying to centre a multi-line verbatim text horizontally on the p= age but I cannot figure out how to do that. With the code below how can I c= entre the whole block horizontally on the page?
>
> \setuptyping[TEX]
>
> \startTEX
>=C2=A0 =C2=A0 RSpec.describe Post, :type =3D> :model do
>=C2=A0 =C2=A0 =C2=A0end
>=C2=A0 \stopTEX

You can add a framedtext environment around the verbatim text and use =E2= =80=9Clocation=3Dmiddle=E2=80=9D to center it.

\setuptyping
=C2=A0 [TEX]
=C2=A0 [before=3D{\startframedtext[location=3Dmiddle]},
=C2=A0 =C2=A0after=3D\stopframedtext]

\starttext

\startTEX
=C2=A0 =C2=A0RSpec.describe Post, :type =3D> :model do
=C2=A0 =C2=A0 end
\stopTEX

\stoptext

Wolfgang

___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/m= ailman/listinfo/ntg-context
webpage=C2=A0 : http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/contextrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--089e0158c31aec3d2b05113f966e-- --===============1065403023== 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= --===============1065403023==--