From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92888 Path: news.gmane.org!not-for-mail From: DesdeChaves Newsgroups: gmane.comp.tex.context,gmane.spam.detected Subject: Re: anchor points for \inmargin Date: Thu, 12 Nov 2015 21:24:08 +0000 Message-ID: References: <5644D703.7060803@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1058143256==" X-Trace: ger.gmane.org 1447363509 7727 80.91.229.3 (12 Nov 2015 21:25:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2015 21:25:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 12 22:24:54 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 1ZwzMS-0000Fb-N9 for gctc-ntg-context-518@m.gmane.org; Thu, 12 Nov 2015 22:24:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CA05110227 for ; Thu, 12 Nov 2015 22:24: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 NDI46hQJxn1J for ; Thu, 12 Nov 2015 22:24:50 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C10E210247 for ; Thu, 12 Nov 2015 22:24:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6094210200 for ; Thu, 12 Nov 2015 22:24:12 +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 EBtbB9uOVFlE for ; Thu, 12 Nov 2015 22:24:10 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id E15A9101FE for ; Thu, 12 Nov 2015 22:24:10 +0100 (CET) Original-Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com [IPv6:2607:f8b0:4003:c01::233]) by filter1-ams.mf.surf.net (8.14.4/8.14.4/Debian-8) with ESMTP id tACLO9s9058861 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 12 Nov 2015 22:24:10 +0100 Original-Received: by obbww6 with SMTP id ww6so57456934obb.0 for ; Thu, 12 Nov 2015 13:24:08 -0800 (PST) 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=rv6pyU3+nsStjmd8x4s//V8SZKdT16slOtd61bDIrkQ=; b=PEQblQZ4XdWUZrelXCpECBDDTfNVrJP4F7uIPuI9hgPIVWZQnO6U03kaE0p5lKH4DF XY2b7+t0chYn3E03kNQbI0TJGywu195f5zB1+F4pxRWh6S41VO6Nsj0WmkTbIurKIFPT MpoG2WQxJ8EKBjc7+FqPXcV5/97+gCL1fGAa2kDUiaZxAKdItZiKVmZswOCj/0eYc0tV f+EVxDYRC287GVOp5s0q+sD9rGoahNqrEqImxOHdCfxuXhKV106nKo2y8mdA2cGcb1Kw mEvgRMia1JfoNDy9NDbzd8HzMRhKNd9jBhfaPBo47tZd1kaw97fCXigoP7fNMjVhiBSQ NQyA== X-Received: by 10.60.76.42 with SMTP id h10mr10114339oew.13.1447363448361; Thu, 12 Nov 2015 13:24:08 -0800 (PST) Original-Received: by 10.60.227.1 with HTTP; Thu, 12 Nov 2015 13:24:08 -0800 (PST) In-Reply-To: <5644D703.7060803@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4003:c01::233; country=US; region=Oklahoma; city=Tulsa; latitude=36.142; longitude=-95.9921; http://maps.google.com/maps?q=36.142,-95.9921&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cPEJoa7K - a76761703696 - 20151112 Received-SPF: pass (filter1-ams.mf.surf.net: domain of desdechaves@gmail.com designates 2607:f8b0:4003:c01::233 as permitted sender) receiver=filter1-ams.mf.surf.net; client-ip=2607:f8b0:4003:c01::233; envelope-from=; helo=mail-ob0-x233.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" X-Spam-Report: 5.4 points; * 3.2 RCVD_ILLEGAL_IP Received: contains illegal IP address * 2.2 DEAR_SOMETHING BODY: Contains 'Dear (something)' * 0.0 HTML_MESSAGE BODY: HTML included in message Xref: news.gmane.org gmane.comp.tex.context:92888 gmane.spam.detected:5309847 Archived-At: --===============1058143256== Content-Type: multipart/alternative; boundary=047d7b33d906335d2705245e9042 --047d7b33d906335d2705245e9042 Content-Type: text/plain; charset=UTF-8 Thanks a lot for this great solution. 2015-11-12 18:14 GMT+00:00 Wolfgang Schuster : > DesdeChaves > 11. November 2015 um 19:01 > Dear Sirs, > > I'm trying to make a exam for my students. After the question I should > provide a blank space for the answer. In the margin I want write the > partial scores for the answer. The problem occurs when I force a new page. > In this case the text in the margin is flushed to the next page. I don't > want this behavior. How can I can this? > > Margin texts are flushed with the next paragraph but you can start one for > the points only with the \dontleavehmode command. > > \define[1]\Info > {\dontleavehmode\margindata[inmargin]{\rotate{#1}}} > > Another question: How can I anchor the scores in the middle of the > vertical blank space? This \vskip4cm\Info{scores}\vskip4cm don't make the > job. > > You can use the \framed command to reserve the space for the answer and > place with the score with a layer as background for the frame. > > \setupmargindata[inmargin][style={\ss\tfx},location=outer,align=middle] > \setupmarginframed[inmargin][align=middle,location=outer] > > \definelayer[infolayer][width=\framedwidth,height=\framedheight] > > \startsetups[infolayer:place] > > \setlayer[infolayer][preset=middleright]{\rotate{\getvariable{infotext}{points}}} > \stopsetups > > > \defineframed[infobox][frame=off,width=max,background=infolayer,setups=infolayer:place] > > \define[2]\Info > {\par > \setvariable{infotext}{points}{#2}% > \infobox[height=#1]{}} > > \starttext > > \startitemize[n] > \starthead{Question 1} > \Info{9cm}{20 \periods[3] 15 \periods[3] 10} > \stophead > \starthead{Question 2} > \Info{8cm}{20 \periods[3] 15 \periods[3] 10} > \stophead > \starthead{Question 3} > \Info{6cm}{20 \periods[3] 15 \periods[3] 10} > \stophead > \stopitemize > > \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 > > ___________________________________________________________________________________ > -- Atentamente DesdeChaves --047d7b33d906335d2705245e9042 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks a lot for this great solution.=C2=A0

2015-11-12 18:14 GMT+00:00= Wolfgang Schuster <schuster.wolfgang@gmail.com>:<= br>
11.=20 November 2015 um 19:01
=
Dear Sirs,

I'm trying to make a exam for my students.=20 After the question I should provide a blank space for the answer. In the margin I want write the partial scores for the answer. The problem=20 =C2=A0occurs when I force a new page. In this case the text in the margin i= s=20 flushed to the next page. I don't want this behavior. How can I can=20 =C2=A0this?=C2=A0
Margin texts are flushed with the next paragraph but you can start one=20 for the points only with the \dontleavehmode command.

\define[1]\Info
=C2=A0 {\dontleavehmode\margindata[inmargin]{\rotate{#1}}}=

Another question: How can I anchor the scores in the= =20 middle of the vertical blank space?=C2=A0 This=20 =C2=A0\vskip4cm\Info{scores}\vskip4cm don't make the job.
You can use the \framed command to reserve the space for the answer and=20 place with the score with a layer as background for the frame.

\setupmargindata[inmargin][style=3D{\ss\tfx},location=3Douter,align=3Dmiddl= e]
\setupmarginframed[inmargin][align=3Dmiddle,location=3Douter]

\definelayer[infolayer][width=3D\framedwidth,height=3D\framedheight]

\startsetups[infolayer:place]
=C2=A0=C2=A0=C2=A0=20 \setlayer[infolayer][preset=3Dmiddleright]{\rotate{\getvariable{infotext}{p= oints}}}
\stopsetups

\defineframed[infobox][frame=3Doff,width=3Dmax,background=3Dinfolayer,setup= s=3Dinfolayer:place]

\define[2]\Info
=C2=A0 {\par
=C2=A0=C2=A0 \setvariable{infotext}{points}{#2}%
=C2=A0=C2=A0 \infobox[height=3D#1]{}}

\starttext

\startitemize[n]
=C2=A0=C2=A0=C2=A0 \starthead{Question 1}
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \Info{9cm}{20 \periods[3] 15 \periods= [3] 10}
=C2=A0=C2=A0=C2=A0 \stophead
=C2=A0=C2=A0=C2=A0 \starthead{Question 2}
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \Info{8cm}{20 \periods[3] 15 \periods= [3] 10}
=C2=A0=C2=A0=C2=A0 \stophead
=C2=A0=C2=A0=C2=A0 \starthead{Question 3}
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 \Info{6cm}{20 \periods[3] 15 \periods= [3] 10}
=C2=A0=C2=A0=C2=A0 \stophead
\stopitemize

\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 / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________



--
=
Atentamente

DesdeChaves
--047d7b33d906335d2705245e9042-- --===============1058143256== 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= --===============1058143256==--