From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96155 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Leupold Newsgroups: gmane.comp.tex.context Subject: Re: Nonbreaking, non-vanishing horizontal spaces above underbar Date: Thu, 15 Sep 2016 13:28:10 +0200 Message-ID: <59BA920C-EC8A-462D-B800-24232BC156A7@posteo.net> References: <2ace42b8-2729-8259-518a-fa6ba811afc0@wxs.nl> <7da9b510-baf3-f24c-3aa2-4037f61b9e79@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="===============4111710121390472486==" X-Trace: blaine.gmane.org 1473938943 27344 195.159.176.226 (15 Sep 2016 11:29:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Sep 2016 11:29:03 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 15 13:28:59 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 1bkUqb-0005z0-5f for gctc-ntg-context-518@m.gmane.org; Thu, 15 Sep 2016 13:28:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 80E9518637; Thu, 15 Sep 2016 13:28:30 +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 giFRXOnceYAQ; Thu, 15 Sep 2016 13:28:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id CEEC518639; Thu, 15 Sep 2016 13:28:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 774A618636 for ; Thu, 15 Sep 2016 13:28:27 +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 755iTZ3FSlF1 for ; Thu, 15 Sep 2016 13:28:26 +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 7E66E18633 for ; Thu, 15 Sep 2016 13:28:16 +0200 (CEST) Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id E6C4420954 for ; Thu, 15 Sep 2016 13:28:14 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3sZbkj3bzBz105s for ; Thu, 15 Sep 2016 13:28:11 +0200 (CEST) X-Pgp-Agent: GPGMail In-Reply-To: <7da9b510-baf3-f24c-3aa2-4037f61b9e79@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:96155 Archived-At: --===============4111710121390472486== Content-Type: multipart/signed; boundary="Apple-Mail=_C0EE50D0-8603-485B-ADDA-749D45254E1F"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Apple-Mail=_C0EE50D0-8603-485B-ADDA-749D45254E1F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 14.09.16, at 16:57, Hans Hagen wrote: >=20 > On 9/14/2016 4:57 PM, Hans Hagen wrote: >> On 9/14/2016 2:33 PM, Florian Leupold wrote: >>> Dear all, >>>=20 >>> I would like to create cloze texts with solutions, but I have = problems >>> with horizontal spaces above the underbar, namely: >>> 1) After a linebreak, horizontal space is cut off despite the \zwj. >>> 2) I cannot find a way of scaling the leading and trailing space to >>> equal 0.2 times the width of the text above the underbar. >>>=20 >>> MNWE: >>>=20 >>> \definebar[ClozedBar][underbar][continue=3Dyes, color=3Dblack, = offset=3D-0.5] >>> \unexpanded\def\Clozed#1{\startbar[ClozedBar] >>> = \zwj\hskip\widthofstring{#1}#1\hskip\widthofstring{#1}\zwj\stopbar} >>> \starttext >>> \Clozed{\color[red]{CLOZE 1}} text text text text text >>> \Clozed{\color[red]{CLOZE 2}} <- This one is cut at the beginning. >>> \stoptext >>>=20 >>> Could someone help me? Thanks a lot in advance! >>>=20 >=20 > and please wikify this so that others can benefit from it >=20 >> \definebar >> [ClozedBar] >> [underbar] >> [continue=3Dyes, >> color=3Dblack, >> offset=3D-0.5] >>=20 >> \starttexdefinition unexpanded Clozed #1 >> \startbar[ClozedBar]% >> \scratchdimen\widthofstring{#1}\relax >> \zwj >> \kern.2\scratchdimen >> #1 >> \kern.2\scratchdimen >> \zwj >> \stopbar >> \stoptexdefinition >>=20 >>=20 >> \starttext >> \Clozed{\color[red]{CLOZE 1}} text text text text text >> \Clozed{\color[red]{CLOZE 2}} <- This one is cut at the beginning. >> \stoptext >>=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 >> ----------------------------------------------------------------- >=20 >=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 so much for this great solution! I have added it to the wiki on page = http://wiki.contextgarden.net/Command/underbar Best, Florian --Apple-Mail=_C0EE50D0-8603-485B-ADDA-749D45254E1F 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 iQIcBAEBCgAGBQJX2oXLAAoJECjJXJRicdfxOnEQAKu1T2f95Zq2G3c0Lev0SnLG GHWNXD5wCQ940vC1YJzEmWbGm514eYxNOEIUS6XySANgoToasENs7omSgD7cnm/L 5aOZ2VAsg/A9rzbsb7pO6WXI2fKLL7MFsvKWCqs6EAwYzbYjR4QkTUD2TkeUHoOL uqWutg0JzxGo0nDapdkxe17r9iaMUolyOp38v4EihBaEORQ0/IozeQKT0ovEiKku ka1ABZTYgY4ab+f/v4V0jE2puzuqE2DNXOxEV1lZLQSbv0m+Lyg7VMy1C602UjTr 1jGyRVszIRPP3x8GkoMa77yGAMRQiHrU5xxLFhk2yJwPB3pUEj9yV0OxvaK17bnh Lp3DBvXaHL5pEJxx+U0cWGnk8yKd/a55mQRKlniYr9I1XP6r331XbtqULHPfifZo TB+5uW7bgj550DcerJz6aK51TKUgVKKhdoT5TbRrgMHvPYb573mn5fUVlpyBbgTz HticXQItEY8HDb48Jh7Z6pupSH3VdpiRtwpl1Q/uK2hnbPG+D+nNUIVhVy+DEXcj WuXo6+RluUTUN2XvlfrGvSpk9f5e8dbnMxSZWAZg+qU4v2MJbOSSf+pdxBz1zeiL uKYyz9s8cLcrfjhBLZ+VuxoaGXpHVQlEc7S4VN7cI/d6sqhqDW4ibw5BRTbUezWl mBF0a8tOD40rbWG0WKjR =mtOM -----END PGP SIGNATURE----- --Apple-Mail=_C0EE50D0-8603-485B-ADDA-749D45254E1F-- --===============4111710121390472486== 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= --===============4111710121390472486==--