From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92887 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context,gmane.spam.detected Subject: Re: anchor points for \inmargin Date: Thu, 12 Nov 2015 19:14:27 +0100 Message-ID: <5644D703.7060803@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1157915013==" X-Trace: ger.gmane.org 1447352131 10620 80.91.229.3 (12 Nov 2015 18:15:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2015 18:15:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 12 19:15:20 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 1ZwwOv-00050d-D9 for gctc-ntg-context-518@m.gmane.org; Thu, 12 Nov 2015 19:15:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 970B610200 for ; Thu, 12 Nov 2015 19:15: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 69RBtq2pfrKo for ; Thu, 12 Nov 2015 19:15:11 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A89E510244 for ; Thu, 12 Nov 2015 19:14:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 93F6210200 for ; Thu, 12 Nov 2015 19:14:29 +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 EQhS0acoTOE0 for ; Thu, 12 Nov 2015 19:14:27 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 69C35101FE for ; Thu, 12 Nov 2015 19:14:27 +0100 (CET) Original-Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) by filter4-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id tACIEP4C016484 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 12 Nov 2015 19:14:26 +0100 Original-Received: by wmvv187 with SMTP id v187so46477298wmv.1 for ; Thu, 12 Nov 2015 10:14:25 -0800 (PST) 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:content-type; bh=v5dve+duO6imBhPB93KMxy/hjAWPj4QTIqPL0V3sFt0=; b=cqV2rno65TC1GN4zpOVqNGxZAUV99nIpsWkYqJcYPEmbKWRs2zK1F2C6LinrLIGAGz wEAivY7W7zdZWzHdNfDxUdJpgbaC+O1TOvzbtC3KzpJ5tguZOjjPtPfYvPtR1Fu+Tscj 5X4Mj+hGU+PVNQAmxV3cOhhN7Y4AHiLERJeRweNeL1b2dmNW/2M0uJ91vlTrNXaxSdLY mUcdPUWvuVOpsjR5Zq9j2RX5sPXQRvq/Oh/fdaiwYk6UGzjYI6jGrl9ibf2p4FVzhJQj vHeuxGCqXmim7LFKSpSuNXcZSLJO2Hse1hoAK9I3K8e4JdRsRPtQQ9JbOz60sOjsGPFm SFTw== X-Received: by 10.28.212.18 with SMTP id l18mr51129601wmg.93.1447352065642; Thu, 12 Nov 2015 10:14:25 -0800 (PST) Original-Received: from keima.localdomain (x2f2dc11.dyn.telefonica.de. [2.242.220.17]) by smtp.googlemail.com with ESMTPSA id ot9sm2360210wjc.12.2015.11.12.10.14.24 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Nov 2015 10:14:25 -0800 (PST) User-Agent: Postbox 4.0.8 (Macintosh/20151105) 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:400c:c09::22a; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8333; longitude=4.3333; http://maps.google.com/maps?q=50.8333,4.3333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01PEGeqPj - e0e192f4bba5 - 20151112 Received-SPF: pass (filter4-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c09::22a as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2a00:1450:400c:c09::22a; envelope-from=; helo=mail-wm0-x22a.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:92887 gmane.spam.detected:5309828 Archived-At: This is a multi-part message in MIME format. --===============1157915013== Content-Type: multipart/alternative; boundary="------------030604080902060700090201" This is a multi-part message in MIME format. --------------030604080902060700090201 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > 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 --------------030604080902060700090201 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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= is=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=3Dmid= dle]
\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}= {points}}}
\stopsetups

\defineframed[infobox][frame=3Doff,width=3Dmax,background=3Dinfolayer,set= ups=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 \perio= ds[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 \perio= ds[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 \perio= ds[3] 10}
=C2=A0=C2=A0=C2=A0 \stophead
\stopitemize

\stoptext

Wolfgang
--------------030604080902060700090201-- --===============1157915013== 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= --===============1157915013==--