From: Pablo Rodriguez <oinos@gmx.es>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How to center \framed on a position?
Date: Wed, 6 Apr 2016 20:24:42 +0200 [thread overview]
Message-ID: <5705546A.6000008@gmx.es> (raw)
In-Reply-To: <op.yfhww11n62epfj@lpr>
On 04/06/2016 01:30 PM, Procházka Lukáš Ing. wrote:
> Hello,
>
> how to center vertically and horizontally a \framed text at the layer origin?
>
> I'm not able to figure it out...
> [...]
> And - where has the text "Hello, world!" disappeared?
Hi Lukáš,
here you have the code:
\setuplayout[page]
\definelayer[mybg][position=middle, location=middle]
\setlayer[mybg]
[x=.5\paperwidth,y=.5\paperheight]
{\framed
[frame=on,offset=5mm,width=fit,rulewidth=2mm]
{\setupbodyfont[10mm,sans]\bf Some text}
}
\setupbackgrounds[page][background={mybg}]
\setupbodyfont[helvetica]
\starttext
Hello, world!
\stoptext
Layer has also position and location. As far as I remember, default
values are {top, left}.
I recall a comment from Wolfgang about setting the body font when using
layers. This is the way to have your text.
I hope it helps,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2016-04-06 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 11:30 Procházka Lukáš Ing.
2016-04-06 18:24 ` Pablo Rodriguez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5705546A.6000008@gmx.es \
--to=oinos@gmx.es \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).