From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96016 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Leupold Newsgroups: gmane.comp.tex.context Subject: Re: Creating cloze texts Date: Sun, 4 Sep 2016 16:32:01 +0200 Message-ID: References: <4D526451-1694-4251-8D73-B07F7540A5DC@posteo.net> <75a5faee-2f90-e9ff-b700-7a1e7318a203@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/mixed; boundary="===============8771782364269401951==" X-Trace: blaine.gmane.org 1472999619 4504 195.159.176.226 (4 Sep 2016 14:33:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2016 14:33:39 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 04 16:33:31 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgYU8-00083x-JQ for gctc-ntg-context-518@m.gmane.org; Sun, 04 Sep 2016 16:33:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7A75C16EBE; Sun, 4 Sep 2016 16:32:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nyd4xwsh-PnB; Sun, 4 Sep 2016 16:32:03 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id A45F216EE8; Sun, 4 Sep 2016 16:32:03 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3448716EBE for ; Sun, 4 Sep 2016 16:32:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YIJAAfaiYdsL for ; Sun, 4 Sep 2016 16:32:02 +0200 (CEST) Original-Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 7CC9616EB9 for ; Sun, 4 Sep 2016 16:32:02 +0200 (CEST) Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5C41620008 for ; Sun, 4 Sep 2016 16:32:02 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3sRwKt0C2Wz106V for ; Sun, 4 Sep 2016 16:32:02 +0200 (CEST) X-Pgp-Agent: GPGMail In-Reply-To: X-Mailer: Apple Mail (2.3124) 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:96016 Archived-At: --===============8771782364269401951== Content-Type: multipart/signed; boundary="Apple-Mail=_3BD36E3E-0E48-4686-AEF4-98760D6579A3"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Apple-Mail=_3BD36E3E-0E48-4686-AEF4-98760D6579A3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 04.09.16, at 16:28, Florian Leupold wrote: >=20 >=20 >> On 04.09.16, at 14:14, Hans Hagen wrote: >>=20 >> On 9/4/2016 12:03 PM, Hans Hagen wrote: >>=20 >>> \definebar[ClozedBar][underbar][continue=3Dyes] >>>=20 >>> \unexpanded\def\Clozed#1{\ClozedBar{\zwj#1\zwj}} >>>=20 >>> \starttext >>>=20 >>> \input ward >>> \Clozed{\color[red]{CLOZE 1}} >>> \input ward >>> \Clozed{\quad\color[red]{CLOZE 2}\quad} >>> \input ward >>> \Clozed{\color[white]{x}\quad\color[red]{CLOZE = 3}\quad\color[white]{x}} >>> \input ward >>> \Clozed{\color[green]{x}\quad\color[red]{CLOZE = 4}\quad\color[white]{x}} >>> \input ward >>> space \Clozed{\color[red]{CLOZE 5}\qquad\color[white]{x}} space >>> \input ward >>>=20 >>> \stoptext >>=20 >> in next beta you can specify an empty option which will remove the = text (otherwise one can still copy it from the pdf): >>=20 >> \definebar[ClozedBar][underbar][continue=3Dyes,empty=3Dyes] >>=20 >>=20 >> ----------------------------------------------------------------- >> Hans Hagen | PRAGMA ADE >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >> ----------------------------------------------------------------- >> = __________________________________________________________________________= _________ >> If your question is of interest to others as well, please add an = entry to the Wiki! >>=20 >> 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 >> = __________________________________________________________________________= _________ >=20 > Dear Hans, >=20 > thanks a lot for your solution! >=20 > I have added "color=3Dblack=E2=80=9D to \definebar to prevent the = bar=E2=80=99s color from changing at a line break, which happens = otherwise: >=20 > \definebar[ClozedBar][underbar][continue=3Dyes] > %\definebar[ClozedBar][underbar][continue=3Dyes, color=3Dblack] > \unexpanded\def\Clozed#1{\ClozedBar{\zwj\quad#1\quad\zwj}} > \starttext > \Clozed{\color[red]{CLOZE 1}} text text text text text text text text = text text text > \Clozed{\color[red]{CLOZE 2 CLOZE 2}} > \stoptext >=20 > Now the extra space is hardcoded by \quad. I guess it=E2=80=99s not so = easy then to make the underbar=E2=80=99s width a factor times the input = text width? Or, alternatively, an explicitly given width? >=20 > Cheers, > Florian > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ ADDENDUM: There is still another problem: The fixed leading space may be eaten = away by a line break. \definebar[ClozedBar][underbar][continue=3Dyes, color=3Dblack] \unexpanded\def\Clozed#1{\ClozedBar{\zwj\quad#1\quad\zwj}} \starttext \Clozed{\color[red]{CLOZE 1}} text text text text text text text text = text text text text text \Clozed{\color[red]{CLOZE 2 CLOZE 2}} \stoptext --Apple-Mail=_3BD36E3E-0E48-4686-AEF4-98760D6579A3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXzDBhAAoJECjJXJRicdfxRaYQAIblxv8sSjsTGEv7XMab8WCe zzeWN0VhnR9UVnaBNM3CKYS9YtiHUEjmOFET1KZg01tLkCGclIXMmJ5tQkdNVgAK JjC+zjgQYTprCdrudO+7y1q7RO2OMkkZ3IBOehWKBH2teM68RfRXZ8TKUuBus16w ilkDxKZnLfH6d4ZMCbI6ICB68XL/05PovSc1eaSYbWt5iSBOGgOvJSEnR00eiTJ3 PZc61S45SYN9OoTmgJte39YASy36IfXKhGrX7nM5CK+KbfVpHybMNuGSt0464zAp LWEM61tfbVqcfm7QglrakcUOh+zk6sS3OgJXascxZ8uYVRBPHejMpDkCnJjSVGP6 ynP/B2S5v2lgmMIlTgYLPLypaAHKYnMkGKYMYBF/0BJT6N/uUY3WJZAy0N+GmvAR FBUJrOcrucN2MtIX3h2yeRBVKpAqrc2L82tVKWIf361w1UPsKODUjAHNTOR3Q8lk vtZF+p0FPQ+Tmu3h9u4pvO2OysoMbZSsXNc24Xuki3fuRWg5pKQEmybxAFEVyTw7 kWpKQAQYm3Xninx6cZ6Ew0bbQcv+nEudLUYhFJtkeQjpRwul00g4dDAxZsdh1d5+ 7fbwfCXuf2irandNMU+IiJkBMYHFS4HPOKDTxUJFWA0j02V8//9QctAzkIzF54Lg 6f1I1D38H1jX98fhQG9V =uKEx -----END PGP SIGNATURE----- --Apple-Mail=_3BD36E3E-0E48-4686-AEF4-98760D6579A3-- --===============8771782364269401951== 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= --===============8771782364269401951==--