From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96005 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Leupold Newsgroups: gmane.comp.tex.context Subject: Creating cloze texts Date: Fri, 2 Sep 2016 15:27:06 +0200 Message-ID: <4D526451-1694-4251-8D73-B07F7540A5DC@posteo.net> 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="===============2040405168704740192==" X-Trace: blaine.gmane.org 1472822882 28778 195.159.176.226 (2 Sep 2016 13:28:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Sep 2016 13:28:02 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 02 15:27:58 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 1bfoVe-0006b5-B5 for gctc-ntg-context-518@m.gmane.org; Fri, 02 Sep 2016 15:27:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4321C16CA2; Fri, 2 Sep 2016 15:27: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 H3moOpf0Uz02; Fri, 2 Sep 2016 15:27:22 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id A763016C9F; Fri, 2 Sep 2016 15:27:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E9F0B16C9D for ; Fri, 2 Sep 2016 15:27:21 +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 5j-ksWISFcHq for ; Fri, 2 Sep 2016 15:27:21 +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 408D416C9C for ; Fri, 2 Sep 2016 15:27:11 +0200 (CEST) Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 407B120B54 for ; Fri, 2 Sep 2016 15:27:08 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3sQfzw1jTfz105x for ; Fri, 2 Sep 2016 15:27:07 +0200 (CEST) X-Pgp-Agent: GPGMail 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:96005 Archived-At: --===============2040405168704740192== Content-Type: multipart/signed; boundary="Apple-Mail=_D5E6FA94-3031-4846-AF44-D83BFED1E0BE"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Apple-Mail=_D5E6FA94-3031-4846-AF44-D83BFED1E0BE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Dear list, I would like to create cloze texts for my students with ConTeXt. Ideally, I would have a command \cloze[]{} with the = following functionality: 1) \cloze{} would insert an underlined gap in the text with a = width of (say) 1.3 times the width of solution and puts the solution on = top of it with centered alignment. I will then color the text read if = the mode is =E2=80=98teacher=E2=80=99 and in white if not. 2) \cloze[]{} would do the same, but with a fixed width = of the underline. The solution should then be flush left, maybe with a = horizontal space of \quad. 3) The underline should allow for line breaks and hyphenation, but not = such that only empty space is broken into the next line of left in the = previous (see MNWE). In this way, the student=E2=80=99s and teacher=E2=80=99s versions of the = script will look exactly the same, except for the visible solution in = the teacher=E2=80=99s version. The macro \underbar does a good job in terms of line breaks and = hyphenation. But it is "too smart" in the sense that it does not = underline horizontal spaces. The MNWE below showcases problems with my = naive attempts to achieve underlining: - CLOZE 1 does not have any extra space. - CLOZE 2 does not underline the horizontal spaces. - CLOZE 3 does not show the underline, supposedly because the first text = elements in it are white. - CLOZE 4 shows that introducing fake characters is not a good idea = anyways because the cloze is broken without any =E2=80=9Creal=E2=80=9D = solution in the first line. - CLOZE 5 shows the same for trailing space. MNWE: \starttext \input ward \underbar{\color[red]{CLOZE 1}} \input ward \underbar{\quad\color[red]{CLOZE 2}\quad} \input ward \underbar{\color[white]{x}\quad\color[red]{CLOZE = 3}\quad\color[white]{x}} \input ward \underbar{\color[green]{x}\quad\color[red]{CLOZE = 4}\quad\color[white]{x}} \input ward space \underbar{\color[red]{CLOZE 5}\qquad\color[white]{x}} space \input ward \stoptext I would greatly appreciate help with this problem. Thanks so much in advance! Florian --Apple-Mail=_D5E6FA94-3031-4846-AF44-D83BFED1E0BE 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 iQIcBAEBCgAGBQJXyX4rAAoJECjJXJRicdfx0tYQAJ1iJCKpR8zX895qkb3dy8pt 16AV8p8iu8pLLpXM+NmgU8w1TaOFIqqA9r77MV+ZotdflhDWzQcCdbs3DRXgoZC/ ZkM5CvraZecFiS9JOz9jBkNkQENKloVnzN3187IAHbpTzCpXyjkrCUKCJUYCKy/q IBvy+kWV9w0tatwIuJjEAAeQcUhoNhupWQpgfCgsYP6QClwtnOoZsDYakG8knEcW 29K1aAFKEvi6BovHzm38vMN3W8RyRV4Ys1NbH0q+MBYzGVCo1agYFxBzJ2TprBNU Che0uDDgIxafFvNrXdZWerP+DlHBXLRM1k1Ucfqntrjk7/HNNX60aYWfGJ0w66t8 lS6Dp77wCJti1gGg6hDCbxQ/z0XXknEy1zy8cehGMgxtmSiQTudCIGMaLmHlxQAF /n5RCkClZtVvGT3kPMaeVXBPUW+dURI0WmH2bCigBucPqIGeM23UP8wbwZVZmehP 1Fl+GzDeEfhcULEVAwDuOTAPX/+ms44SBuH921M4Vyn1IKEFkAgxmfFUSURomVX3 TeE/rTRo2eqK+snDtRZ7CjrAsJm6f6eKxrar4y0l61D8Zjt8fSwW+ldCtyY/+fGU LOuMvLyXB91tTXeis3/rJ9Qh0IBJe+g7M7nUeqZ1pdjgnJkIYCII6eYjcJR5lRWN 3Oq7vsRqYrqgdSxtAHCK =jMHR -----END PGP SIGNATURE----- --Apple-Mail=_D5E6FA94-3031-4846-AF44-D83BFED1E0BE-- --===============2040405168704740192== 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= --===============2040405168704740192==--