From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63554 Path: news.gmane.org!not-for-mail From: Peter Davis Newsgroups: gmane.comp.tex.context Subject: Re: Placing boxes anywhere on the page Date: Tue, 16 Nov 2010 15:32:40 -0500 Message-ID: References: <8B3095C1-246E-46D0-B427-34BC5507423F@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0798777146==" X-Trace: dough.gmane.org 1289939581 12894 80.91.229.12 (16 Nov 2010 20:33:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Nov 2010 20:33:01 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 16 21:32:57 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PISCx-0008Ql-Ia for gctc-ntg-context-518@m.gmane.org; Tue, 16 Nov 2010 21:32:51 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 062EECA872; Tue, 16 Nov 2010 21:32:51 +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 tZIrHrEEt7G3; Tue, 16 Nov 2010 21:32:47 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6BD72CA86F; Tue, 16 Nov 2010 21:32:47 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C1BBCCA86F for ; Tue, 16 Nov 2010 21:32:45 +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 dfql2zU1WpHX for ; Tue, 16 Nov 2010 21:32:43 +0100 (CET) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by balder.ntg.nl (Postfix) with ESMTP id 4DF45CA86C for ; Tue, 16 Nov 2010 21:32:43 +0100 (CET) Original-Received: from mail-gw0-f41.google.com (mail-gw0-f41.google.com [74.125.83.41]) by filter4-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAGKWfF6017289 for ; Tue, 16 Nov 2010 21:32:41 +0100 Original-Received: by gwj16 with SMTP id 16so721860gwj.14 for ; Tue, 16 Nov 2010 12:32:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=7ngkU2HVLhM8PXre6kYnBOCw4KaXk4WROwJz2WNi9Vs=; b=nSprmpntf3oNYsPXnQXwxWvz/kqCfxlrNrMQwbS7brIcbYLdjJcbRnMSRU6gNqEx0k BSgEMmKm3AvFSCAbU2/Jy1gZ4YU220mtt5waFiDy2AMzrnbUajwvcwCjezbNQwuMFlWz D3tpNvYC5dDITOKT3/ahY96a7nqSJuzeIQzx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=rkMzsGh5m9GXaHsm9z9LoMnGyo6FPg1iy/zLrIjnWULifvSNVgZgHedudH01AGnxDc +P6Uw/jP4jmQYL0OfDZClf/zycCg4lqMQ1ghmvgEab+AOkKVCMcnH4KA+XDjfM3HdYsC /YKgJjk0OweJ/08z7IKeUh7Du6EAgj8Fnmjf0= Original-Received: by 10.101.163.5 with SMTP id q5mr5497232ano.262.1289939560635; Tue, 16 Nov 2010 12:32:40 -0800 (PST) Original-Received: by 10.100.133.20 with HTTP; Tue, 16 Nov 2010 12:32:40 -0800 (PST) In-Reply-To: <8B3095C1-246E-46D0-B427-34BC5507423F@gmail.com> X-Google-Sender-Auth: n-v5PbWE0wM8l8qKbVQm7xMsamU X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04DvUwFzP - a07bef0a40cd - 20101116 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:63554 Archived-At: --===============0798777146== Content-Type: multipart/alternative; boundary=0016e68ded4a4b1d1d04953175a1 --0016e68ded4a4b1d1d04953175a1 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 16, 2010 at 3:22 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote: > > Am 16.11.2010 um 21:06 schrieb Peter Davis: > > > Is there a way to place a box at some specified x and y position on the > page, and then typeset one or more paragraphs of text into the box? I guess > I'm thinking of something like LaTeX's minipage, but with the ability to > specify absolute coordinates, rather than just position relative to the > current baseline. > > Use layers (untested): > > \definelayer[textbox][width=\paperwidth,height=\paperheight] > > \setupbackgrounds[page][background=textbox] > > \def\starttextbox > {\dosingleargument\dostarttextbox} > > \def\dostarttextbox[#1]% > {\def\stoptextbox{\setlayerframed[textbox][#1]{\getbuffer[textbox]}}% > \startbuffer[textbox][starttextbox][stoptextbox]} > > \starttext > > \starttextbox[x=2cm,y=4cm,width=8cm,frame=off] > some text ... > > more text ... > \stoptextbox > > \starttextbox[x=6cm,y=12cm,width=8cm,frame=off] > another example ... > \stoptextbox > > \stoptext > > Wolfgang > Thanks, Worfgang! I just tried this. I don't see any errors, but I don't see any PDF either. Here's the log file: sorters > setting language 'en' (layertest.tex jobcontrol > resuming randomizer with 0.72399060029908 publications : loading formatting style from bxml-apa (C:/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv) ConTeXt ver: 2010.07.30 11:35 MKIV fmt: 2010.11.9 int: english/english system : cont-new loaded (C:/context/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil loaded (C:/context/tex/texmf-context/tex/context/base/cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (C:/context/tex/texmf-context/tex/context/user/cont-sys.rme (C:/context/tex/texmf-context/tex/context/base/type-def.mkiv) (C:/context/tex/texmf-context/tex/context/base/type-lua.mkiv) (C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv)) system : layertest.top loaded % % begin of optionfile % % % runtime options files (command line driven) % \unprotect % % feedback and basic job control % % handy for special styles % \startluacode % document = document or { } % document.arguments={ % } % document.files={ % "layertest.tex", % } % \stopluacode % % process info % \setupsystem[inputfile=layertest.tex] % \setupsystem[\c!n=1,\c!m=1] % % modes % % options (not that important) % \startsetups *runtime:options % \setupoutput[pdftex] % \stopsetups % % styles and modules % \startsetups *runtime:modules % \stopsetups % % done % \protect \endinput % % end of optionfile % (layertest.top) fonts : preloading latin modern fonts {C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} bodyfont : 12pt rm is loaded language : language en is active systems : begin file layertest.tex at line 12 systems : end file layertest.tex at line 24 system : cont-err loaded (C:/context/tex/texmf-context/tex/context/base/cont-err.tex systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead ) ) mkiv lua stats : used config file - C:/context/tex/texmf/web2c/texmfcnf.lua mkiv lua stats : used cache path - C:/context/tex/texmf-cache/luatex-cache/context/f53042fa2e1c106bc7e3383ec8c3a00c mkiv lua stats : input load time - 0.026 seconds mkiv lua stats : stored bytecode data - 231 modules, 54 tables, 285 chunks mkiv lua stats : node list callback tasks - 6 unique task lists, 4 instances (re)created, 316 calls mkiv lua stats : cleaned up reserved nodes - 33 nodes, 10 lists of 411 mkiv lua stats : node memory usage - 20 glue_spec mkiv lua stats : used backend - pdf (backend for directly generating pdf output) mkiv lua stats : loaded patterns - en::2 mkiv lua stats : callbacks - direct: 425, indirect: 4447, total: 4872 mkiv lua stats : result saved in file - layertest.pdf mkiv lua stats : loaded fonts - 33 files: stmary10.afm lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm mkiv lua stats : fonts load time - 0.262 seconds mkiv lua stats : luatex banner - this is luatex, version beta-0.63.0-2010090921 (web2c 2010) (rev 3873) mkiv lua stats : control sequences - 30982 of 165536 mkiv lua stats : current memory usage - 33 MB (ctx: 34 MB) mkiv lua stats : runtime - 0.679 seconds --0016e68ded4a4b1d1d04953175a1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Nov 16, 2010 at 3:22 PM, Wolfgang Schust= er <schuster.wolfgang@googlemail.com> wrote:

Am 16.11.2010 um 21:06 schrieb Peter Davis:

> Is there a way to place a box at some specified x and y position on th= e page, and then typeset one or more paragraphs of text into the box? =A0I = guess I'm thinking of something like LaTeX's minipage, but with the= ability to specify absolute coordinates, rather than just position relativ= e to the current baseline.

Use layers (untested):

\definelayer[textbox][width=3D\paperwidth,height=3D\paperheight]

\setupbackgrounds[page][background=3Dtextbox]

\def\starttextbox
=A0{\dosingleargument\dostarttextbox}

\def\dostarttextbox[#1]%
=A0{\def\stoptextbox{\setlayerframed[textbox][#1]{\getbuffer[textbox]}}% =A0 \startbuffer[textbox][starttextbox][stoptextbox]}

\starttext

\starttextbox[x=3D2cm,y=3D4cm,width=3D8cm,frame=3Doff]
some text ...

more text ...
\stoptextbox

\starttextbox[x=3D6cm,y=3D12cm,width=3D8cm,frame=3Doff]
another example ...
\stoptextbox

\stoptext

Wolfgang


Thanks, Worfgan= g! =A0I just tried this. =A0I don't see any errors, but I don't see= any PDF either. =A0Here's the log file:


<= /div>
sorters =A0 =A0 =A0 =A0 > setting language 'en'
<= div>
(layertest.tex
jobcontrol =A0 =A0 =A0> resu= ming randomizer with 0.72399060029908
publications =A0 =A0: loadi= ng formatting style from bxml-apa
(C:/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)

ConTeXt =A0ver: 2010.07.30 11:35 MKIV =A0fmt: 2010.11.9 = =A0int: english/english

system =A0 =A0 =A0 =A0 =A0= : cont-new loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.tex
= systems =A0 =A0 =A0 =A0 : beware: some patches loaded from cont-new.tex
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv))
=
system =A0 =A0 =A0 =A0 =A0: cont-fil loaded
(C:/context/tex/texmf= -context/tex/context/base/cont-fil.tex
loading =A0 =A0 =A0 =A0 : = ConTeXt File Synonyms
)
system =A0 =A0 =A0 =A0 =A0: con= t-sys.rme loaded
(C:/context/tex/texmf-context/tex/context/user/cont-sys.rme (C:/context/tex= /texmf-context/tex/context/base/type-def.mkiv) (C:/context/tex/texmf-contex= t/tex/context/base/type-lua.mkiv) (C:/context/tex/texmf-context/tex/context= /base/type-siz.mkiv) (C:/context/tex/texmf-context/tex/context/base/type-ot= f.mkiv))
system =A0 =A0 =A0 =A0 =A0: layertest.top loaded
%
% begin of= optionfile
%
% % runtime options files (command line driven)
% \unp= rotect
%= % feedback and basic job control
% % handy for special styles
% \sta= rtluacode
% document =3D document or { }
% document.arguments=3D{
% }
% d= ocument.files=3D{
% "layertest.tex",
% }
% \= stopluacode
% % process info
% \set= upsystem[inputfile=3Dlayertest.tex]
% \setupsystem[\c!n=3D1,\c!m=3D1]
<= div>% % mod= es
% % op= tions (not that important)
% \startsetups *runtime:options
% \setupoutput[pd= ftex]
% \sto= psetups
% % styles and modules
% \startsetups *runtime:modules
% \sto= psetups
% % done
% \protect \endinput
%
%= end of optionfile
%
(layertest.top)
f= onts =A0 =A0 =A0 =A0 =A0 : preloading latin modern fonts
{C:/cont= ext/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/ma= p/dvips/lm/lm-rm.map}{C:/context/tex/texmf-context/fonts/map/pdftex/context= /mkiv-base.map}
bodyfont =A0 =A0 =A0 =A0: 12pt rm is loaded
language =A0 =A0= =A0 =A0: language en is active
systems =A0 =A0 =A0 =A0 : begin f= ile layertest.tex at line 12
systems =A0 =A0 =A0 =A0 : end file l= ayertest.tex at line 24
system =A0 =A0 =A0 =A0 =A0: cont-err loaded
(C:/context/tex/= texmf-context/tex/context/base/cont-err.tex
systems =A0 =A0 =A0 = =A0 : no file 'cont-sys.tex', using 'cont-sys.rme' instead<= /div>
) )
mkiv lua stats : used config file =A0 =A0 =A0 =A0 =A0- C:/context/tex/= texmf/web2c/texmfcnf.lua
mkiv lua stats : used cache path =A0 =A0= =A0 =A0 =A0 - C:/context/tex/texmf-cache/luatex-cache/context/f53042fa2e1c= 106bc7e3383ec8c3a00c
mkiv lua stats : input load time =A0 =A0 =A0 =A0 =A0 - 0.026 seconds
mkiv lua stats : stored bytecode data =A0 =A0 =A0- 231 modules, 54= tables, 285 chunks
mkiv lua stats : node list callback tasks =A0= - 6 unique task lists, 4 instances (re)created, 316 calls
mkiv lua stats : cleaned up reserved nodes - 33 nodes, 10 lists of 411=
mkiv lua stats : node memory usage =A0 =A0 =A0 =A0 - 20 glue_spe= c
mkiv lua stats : used backend =A0 =A0 =A0 =A0 =A0 =A0 =A0- pdf = (backend for directly generating pdf output)
mkiv lua stats : loaded patterns =A0 =A0 =A0 =A0 =A0 - en::2
mkiv lua stats : callbacks =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 - direct: 425, = indirect: 4447, total: 4872
mkiv lua stats : result saved in file= =A0 =A0 =A0- layertest.pdf
mkiv lua stats : loaded fonts =A0 =A0 =A0 =A0 =A0 =A0 =A0- 33 files: s= tmary10.afm lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lm= roman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.o= tf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regu= lar.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam1= 0.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.= tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-l= mr7.tfm rm-lmr9.tfm
mkiv lua stats : fonts load time =A0 =A0 =A0 =A0 =A0 - 0.262 seconds= =A0
mkiv lua stats : luatex banner =A0 =A0 =A0 =A0 =A0 =A0 - this= is luatex, version beta-0.63.0-2010090921 (web2c 2010) (rev 3873)
mkiv lua stats : control sequences =A0 =A0 =A0 =A0 - 30982 of 165536
mkiv lua stats : current memory usage =A0 =A0 =A0- 33 MB (ctx: 34 MB)<= /div>
mkiv lua stats : runtime =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 - 0.= 679 seconds

--0016e68ded4a4b1d1d04953175a1-- --===============0798777146== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0798777146==--