From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96031 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Leupold Newsgroups: gmane.comp.tex.context Subject: Re: Enumeration: chapter in counter, problem next to placefigure, and documentation issues Date: Mon, 5 Sep 2016 11:06:42 +0200 Message-ID: References: <753E37B0-7521-4DF5-8FAB-5DA799DCE9C6@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="===============8329636770142049450==" X-Trace: blaine.gmane.org 1473066445 23920 195.159.176.226 (5 Sep 2016 09:07:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2016 09:07:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 05 11:07:19 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 1bgps2-0005QD-L0 for gctc-ntg-context-518@m.gmane.org; Mon, 05 Sep 2016 11:07:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9016716FC7; Mon, 5 Sep 2016 11:06:59 +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 33_fjm5qN2qU; Mon, 5 Sep 2016 11:06:58 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id AB9E716FC8; Mon, 5 Sep 2016 11:06:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 890C116FC4 for ; Mon, 5 Sep 2016 11:06:57 +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 wWrExZ6E1Svx for ; Mon, 5 Sep 2016 11:06:56 +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 AADD116FC3 for ; Mon, 5 Sep 2016 11:06:46 +0200 (CEST) Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 65736209E8 for ; Mon, 5 Sep 2016 11:06:44 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3sSP443B5zz101F for ; Mon, 5 Sep 2016 11:06:44 +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:96031 Archived-At: --===============8329636770142049450== Content-Type: multipart/signed; boundary="Apple-Mail=_B60D7B78-B183-444A-B217-7D8CF6103E48"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Apple-Mail=_B60D7B78-B183-444A-B217-7D8CF6103E48 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 04.09.16, at 21:54, Otared Kavian wrote: >=20 > Hi Florian, >=20 > The following setup works fine here, I wonder whether this is what you = want: >=20 > \defineenumeration[theorem] > [text=3D{Theorem}, > style=3Dslanted, > title=3Dyes, > alternative=3Dhanging, > % hang=3D2, > width=3Dfit, > right=3D{~}, > way=3Dbychapter, > % way=3Dbysection, > prefix=3Dyes, > % prefixsegments=3D{chapter:section}, > prefixsegments=3D{chapter}, > ] >=20 > Another more versatile solution is to define an enumeration like the = \proclaim definition of plain TeX, as follows: >=20 > \defineenumeration[proclaim] > [text=3D, > style=3Dslanted, > title=3Dyes, > titleleft=3D, > titleright=3D{.}, > alternative=3Dhanging, > % hang=3D2, > width=3Dfit, > right=3D{~}, > way=3Dbychapter, > % way=3Dbysection, > prefix=3Dyes, > % prefixsegments=3D{chapter:section}, > prefixsegments=3D{chapter}, > ] >=20 > and the use it as in the following example: >=20 > \startproclaim{Pythagoras Theorem} > The square on the hypotenuse is equal to the sum of the squares on the = other two sides. > \stopproclaim >=20 > You can play with other options in the setups above and tune them to = your taste. >=20 > Best regards: OK >=20 >> On 4 Sep 2016, at 19:37, Florian Leupold wrote: >>=20 >> Dear list, >>=20 >> I am trying to use enumerations with MKIV I am a bit at a loss when = it comes to the documentation (see below for a few issues). >>=20 >> Working on a concrete example, I have come pretty close to what I = want for my enumeration =E2=80=98theorem=E2=80=99: >>=20 >> \setupexternalfigures[location=3Ddefault] >> \setupenumerations[ >> alternative=3Dleft, >> text=3DTheorem, >> headstyle=3Dbold, >> title=3Dno, >> way=3Dbychapter, >> stopper=3D{:}, >> distance=3D1ex, >> width=3Dfit, >> style=3Dnormal, >> hang=3Dfit] >> \defineenumeration[theorem] >> \starttext >> \chapter{First chapter} >> \starttheorem >> The square on the hypotenuse is equal to the sum of the squares on = the other two sides. >> \stoptheorem >> \chapter{Second chapter} >> \placefigure[right, none]{}{\externalfigure[mill]} >> \starttheorem >> The square on the hypotenuse is equal to the sum of the squares on = the other two sides. >> \stoptheorem >> \stoptext >>=20 >> QUESTIONS: >> 1) I would like to prefix the theorem counter with the chapter = number, such that the number of the second theorem becomes 2.1. Can this = be done? >> 2) Is it possible to circumvent the misplacement of the second = theorem due to the placed figure? Ideally, the theorem would just use = the space to the left it. >>=20 >> Issues with the documentation: >> - In =E2=80=9CConTeXt Commands=E2=80=9D, it says on page 224 that = \setupenumeration inherits from \setupcounter; but in =E2=80=9CConTEXt = reference manual", it says on page 246 that \setupenumerations inherits = from \setupdescriptions. >> - In =E2=80=9CConTEXt reference manual=E2=80=9D, the key = =E2=80=9Clocation=E2=80=9D for \defineenumeration should probably = replaced by =E2=80=9Calternative=E2=80=9D. Right now, all examples on = page 247 are unaffected by this setting and hence look the same. >> - The wiki seems to use MKII, which makes a difference for the = example on http://wiki.contextgarden.net/Command/enumeration, which = compiles differently under ConTeXT online. >>=20 >> Thanks for your help! >>=20 >> Best regards, >> 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 >> = __________________________________________________________________________= _________ >=20 > = __________________________________________________________________________= _________ > 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 Otared and Wolfgang, thanks for your helpful suggestions and information! One problem, however, persists: The theorem environment gets misplaced = when a figure is placed to its left: \setupexternalfigures[location=3Ddefault] \setupenumerations[ alternative=3Dleft, text=3DTheorem, title=3Dno, stopper=3D{:}, distance=3D0ex, width=3Dfit, right=3D{~}, style=3Dnormal, hang=3Dfit] \defineenumeration[theorem] \starttext \placefigure[right, none]{}{\externalfigure[mill]} \starttheorem The square on the hypotenuse is equal to the sum of the squares on the = other two sides. \stoptheorem \stoptext Does anyone know a way to fix this? Thanks and best regards, Florian --Apple-Mail=_B60D7B78-B183-444A-B217-7D8CF6103E48 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 iQIcBAEBCgAGBQJXzTWjAAoJECjJXJRicdfx7wcP/R7UIZQv8aB+6f8Kas6LYTRl eQj/XUSOkylLt1Qob9MONXm5uILvmCmTv1HJ60ONsfeABzsEc4+nshV29Je/ebl9 h/ayl3BRqFcskkmUveLMy0z9rq5s3BRK9iPWm4gn6MFsxbiUQ7CeErfw5figvY12 OjnEqjUzXdJ8HbiwMTAi8s1M9+bWG5CplEYVPxq+i0f9Jo7+OG/hmYHqPlhYsJ8n eIYzMZha8SiHTFp7YPP4ojjKg6GwFteEhVsV5kq0uXRtUlaav+xv46tpYU5i0FgL r993TjXwhalhIF4C9wClb1LyLuZGoejbdbPreUO+OqhfKWLya95t0wy3+COX5AcR NmOI4zic0M6hjmd+XxOrGy0SiJVvmJghSUKg4Fnl3i8HOjk7hg+8pG/tCm0CcAry uHEXLgvYZdwC3m0H5jhnBFGs/nK4mKM+Y+ale39rioCW8+Ae3Fjf8WGAD4fhhfEW O9Z2Pid+MG4oRI+mqEN07a1hd7gA/kTZSzno+MMIc6qyft1N3Ob7HTfI0pyIsI6w 5ib+n4ETnhsjEkQqNHC4RcCdxvkNehKPbY/QulYN6iSWT0lSQp3bkAR98sFhjpXr 0OBwTwu1usfiymWA/FKjj62+ga/OZD5v8qYfIfK9Kv+2/NxCsarQ298NfMoVv1X1 0UCKfjFXnX/Y3YJ01LIl =2Jxw -----END PGP SIGNATURE----- --Apple-Mail=_B60D7B78-B183-444A-B217-7D8CF6103E48-- --===============8329636770142049450== 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= --===============8329636770142049450==--