Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id s92ESt40001586 for ; Thu, 2 Oct 2014 16:28:56 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx105) with ESMTPS (Nemesis) id 0MdXBg-1XsMKD2X3k-00PNS6 for ; Thu, 02 Oct 2014 16:28:49 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s92EQxI4019729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Oct 2014 16:27:00 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s92DB5EW023600; Thu, 2 Oct 2014 16:26:59 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11322446 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 2 Oct 2014 16:26:59 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s92EQw0Q014768 for ; Thu, 2 Oct 2014 16:26:58 +0200 Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s92EQnwI005889 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 2 Oct 2014 16:26:51 +0200 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XZhLD-00071O-0i for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 02 Oct 2014 16:26:47 +0200 Received: from mail-1y.bbox.fr ([194.158.98.14]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XZhL4-0006xA-At for public-LATEX-L-0lvw86wZMd8wwC3q1xGJAzLcMfAFj/UcfwJ6n/Uicl4@plane.gmane.org; Thu, 02 Oct 2014 16:26:38 +0200 Received: from drums.chezmoi.fr.i-did-not-set--mail-host-address--so-tickle-me (static-176-182-191-61.ncc.abo.bbox.fr [176.182.191.61]) by mail-1y.bbox.fr (Postfix) with ESMTP id 0D1F917B for ; Thu, 2 Oct 2014 16:26:38 +0200 (CEST) References: <5429D0DF.7060608@morningstar2.co.uk> <10k836fpz0maa.dlg@nililand.de> <1p1jnnjmq41l6.dlg@nililand.de> X-Url: http://gte.univ-littoral.fr/members/dbitouze/pub/latex X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id s92EQx0Q014769 Message-ID: Date: Thu, 2 Oct 2014 16:26:36 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: =?utf-8?Q?Denis_Bitouz=C3=A9?= Subject: Re: [l3keys] Suggestion: Add a key property for specifying key that /has/ to be used To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <1p1jnnjmq41l6.dlg@nililand.de> (Ulrike Fischer's message of "Thu, 2 Oct 2014 09:22:08 +0200") Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id s92EQxI4019729 Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:HSqwDVWyDYk=:SOT7OvxLQLFLo1vAzDCAZbEjsi LqTh79q5nO1JuYLeKntbVi0+9hl6UABT+bPbqcNDj3atCc6AZjhSnJPw3ppYrX3doBozp2CDO KTYiWCUzBd5FWdgtfs2Lyl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X//dkuU8CFsYGGyfH4r36ILGz110XP/tPS2TTko1b4Wri161L6h7VWj9P83AF3zJX2h ZiOuMS0//nJw8Z0/pCu3wI1ryrOK+pkEfMVDo1on6jwlvj5DxbZk9ltxT6bU+PJxpmMO+EOmP iEFUOgiu3xR77/DRnjP6+wLV4Om3u095hv97vx9Sb5DKztbHo2Q0j7zaYVy5PwYnra1phx+EZ LXJ4HJ5rWzYgCKTK5FMLkm48xV8idEqywVEpN4zp1m/jcmmSs1eWfu8RU/mwNI1Rq90wxndTo aYy1uCrvgdtkzaB4rqfPZm0+0Ylm80vf5CeDi55jOBDBcmL72I X-UI-Loop:V01:IpgVy17U/wY=:UEKmP7hxSFfcEUT3Qbl3sBXGdCMuz02B6z/zN599F1g= X-UI-Out-Filterresults: notjunk:1; X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h1439878.stratoserver.net id s92ESt40001586 Status: R X-Status: X-Keywords: X-UID: 7615 Le 02/10/14 à 09h22, Ulrike Fischer a écrit : > Am Wed, 1 Oct 2014 17:39:46 +0200 schrieb >> Now I see what you mean and I agree with you. But I guess I'd choose the >> second case between the two following cases: >> >> 1. deliberately providing a many-to-one relation between keys and value, >> and writing code that ensures all these values of all theses *number* >> keys lead to the single issue's number, >> 2. be careful in providing a one-to-one relation between a single >> "number" key and issue's number value, and being able to specify that >> this key is required. > > That was what I meant with that you need to be careful to define and > use "basic keys". Did I give the impression I was going to define complex keys? That's already fairly complicated with simple ones! ;) > Beside this there is also the timing problem Joseph mentioned: when > should be tested if a key has been used? It is obviously not the key > code of the key that can do it. No, but as answered to Joseph, a `.required:' key property could automatically check at the end of document (\AtEndDocument) that the corresponding key has been used and, if not, emit an error message. > So imho you are not looking for a .required property but > a .enableifsettest property which adds and sets some boolean which you > can later check. I'm not sure to understand well such a .enableifsettest property, but I guess that's what I'm currently doing by hands: --8<---------------cut here---------------start------------->8--- \msg_new:nnnn{journal}{issue-number-needed}{Option~`#1'~needed!} {Please~specify~`#1='.} \int_new:N \l_journal_issue_number_int \keys_define:nn { journal/issuesetup } { number .int_set:N = \l_journal_issue_number_int, number .value_required:, % [...] } \NewDocumentCommand{\issuesetup}{ m } { \keys_set:nn { journal/issuesetup } { #1 } % If `number' is not set, the corresponding integer value is 0. \int_compare:nNnT {\l_journal_issue_number_int}<{1} { \int_set:Nn \l_journal_issue_number_int { \c_journal_first_issue_number_int } \msg_warning:nnn{journal}{issue-number-needed}{number} } % [...] } % [...] --8<---------------cut here---------------end--------------->8--- I must admit, checking the `number' key has been used only \AtEndDocument would be too late in this case. Maybe that's what you meant with `.enableifsettest': what I would need here is, for each ⟨key⟩ tagged as required by, say, a `.required:' property, a corresponding (/TF/ for `T', `F' or `TF'): ┌──── │ \keys_has_been_used:n/TF/ {⟨key⟩} │ {⟨true code⟩} {⟨false code⟩} └──── and, why not, a standardized (error? warning? etc.) message in `false' case. -- Denis