From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96015 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:28:02 +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="===============1518385676226242137==" X-Trace: blaine.gmane.org 1472999324 15390 195.159.176.226 (4 Sep 2016 14:28:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2016 14:28:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 04 16:28:40 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 1bgYPU-0003A2-OA for gctc-ntg-context-518@m.gmane.org; Sun, 04 Sep 2016 16:28:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E5B8E16EB8; Sun, 4 Sep 2016 16:28:25 +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 FxN9U_dZe_nL; Sun, 4 Sep 2016 16:28:25 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 42D7C16EB9; Sun, 4 Sep 2016 16:28:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7864716EB7 for ; Sun, 4 Sep 2016 16:28:24 +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 B-vGP7bbZrx5 for ; Sun, 4 Sep 2016 16:28:22 +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 A7DE116EB6 for ; Sun, 4 Sep 2016 16:28:12 +0200 (CEST) Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 3065420A7E for ; Sun, 4 Sep 2016 16:28:06 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3sRwFL1SzSz104Q for ; Sun, 4 Sep 2016 16:28:03 +0200 (CEST) X-Pgp-Agent: GPGMail In-Reply-To: <75a5faee-2f90-e9ff-b700-7a1e7318a203@wxs.nl> 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:96015 Archived-At: --===============1518385676226242137== Content-Type: multipart/signed; boundary="Apple-Mail=_BE460CAB-A960-41A4-9ACA-3FC3E84073F6"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Apple-Mail=_BE460CAB-A960-41A4-9ACA-3FC3E84073F6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > 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 > = __________________________________________________________________________= _________ Dear Hans, thanks a lot for your solution! 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: \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 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? Cheers, Florian --Apple-Mail=_BE460CAB-A960-41A4-9ACA-3FC3E84073F6 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 iQIcBAEBCgAGBQJXzC9zAAoJECjJXJRicdfxdLMQALFaALECLyg3b4SVrf9gBcnJ 5IIYgSSV2Vk2uRY/m6D3R1uV0s60+JLRmErtScySjaT1jRqj0upJr7l12bVg+mLc mK5rDK9H3EAYipBaP+didjuAHguR4ic9eOUGEfm3M/y0DEV5hLXdUhn6oOQLX+Sq PIsPGdk5pLYluMojv6AQ0I4u2UVhLI6KspBTy2aDIzirqOROynQqDZRT+LdskQ6v 3kK6AmGMNz1QcPDFcfL9zPCDw4yB+rFICdaDAd8lSK5QSQslvydkTqhuSVyw2q6Q stIw7uLYiEJjh4fQwjuXa5WzPT+oT9R/Fzsv6clkYl0fM2kpfID/uAeZFI4KytTP ODKrmMGoTueOGagLvwdBn5JJlfKXve215IIh68hieq94NDHY+x7jFSiGm40+Zb67 aIqe1aiuZ+Em6PAa12gC+OgNy3mNGej9cWpfyeYCnQoWkqBKd+Q6byVI9u71mnn7 I81RlYbkJv2cZiG7ncJzO79iw2FSrgvwEPXBa9Opr1EFFZdyrxiq3xCmjdhmYqj4 3hWFpxPKXh27JL2axE64u98Ha38Fh1EcFKPQuzVcOfv143W89+5S2dbkKS1QS0SI JTBRCoyP3fMhPnlLpktTj/rrXh04JaW74RK1NWlU0XBNjWnIdfe8pIMuD3VMaZ6w eEd+TX7PiqH1tBL1njF2 =t+Mk -----END PGP SIGNATURE----- --Apple-Mail=_BE460CAB-A960-41A4-9ACA-3FC3E84073F6-- --===============1518385676226242137== 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= --===============1518385676226242137==--