From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84883 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: How to add a new unit for \unit{} command? Date: Fri, 18 Oct 2013 08:39:17 +0200 Message-ID: References: <5048421.3BEg9PJEov@nereid> <1502139.9LLrXD3FzT@nereid> <94541631-07D2-4E00-869E-2E5A1C95E807@gmail.com> <1517021.NeMYeNKAtn@nereid> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1382078360 7756 80.91.229.3 (18 Oct 2013 06:39:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 06:39:20 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 18 08:39:25 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VX3iX-00048N-Gu for gctc-ntg-context-518@m.gmane.org; Fri, 18 Oct 2013 08:39:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1F4C9101E9; Fri, 18 Oct 2013 08:36:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id erIyGZALlwoP; Fri, 18 Oct 2013 08:36:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D1DFE101E3; Fri, 18 Oct 2013 08:36:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 429CA101E3 for ; Fri, 18 Oct 2013 08:36:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id E43YXp7zjdyR for ; Fri, 18 Oct 2013 08:36:33 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 8A0D9101DE for ; Fri, 18 Oct 2013 08:36:33 +0200 (CEST) Original-Received: from mail-ea0-x231.google.com (mail-ea0-x231.google.com [IPv6:2a00:1450:4013:c01::231]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9I6dJXO010618 for ; Fri, 18 Oct 2013 08:39:19 +0200 Original-Received: by mail-ea0-f177.google.com with SMTP id f15so1639205eak.22 for ; Thu, 17 Oct 2013 23:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=vuaf1WLW/xMzs4+2sPCj5p5xd0n7dHGBY4Fsz0v8Wlg=; b=T4xvIEixCt0H3fFQS6n8mKkXFR+0k0P8J7/lG81SxneGA6r029pWvO+vgcxxBNmzLJ w6VgEO1YitxAc5Ppkdqok8BLuaQN4j1WoAwnpIi1Ro3AfRdJJU0Fdn9WwLA4SzXKOxUl 3XMY85gXZp4BKrZpPlBHNARxXRvxTN15hXfiDwzj/jkY1MGdAo2MIpiYdiCD36ZktmOh 6Mkg083g9BrxX8nLKTvyK3seA501OneT3W5tzQczISvyZIn8MY0iJM2vA2HyXhU2XvDl XiNRxkOJJdulqt3e5X1eODFYCPBrIl1L38k3p3wWMRDvPmWjzdBf4oV6P7LQoNeMiNx5 XJTA== X-Received: by 10.15.63.142 with SMTP id m14mr471787eex.106.1382078359139; Thu, 17 Oct 2013 23:39:19 -0700 (PDT) Original-Received: from keima.localdomain (x2f24685.dyn.telefonica.de. [2.242.70.133]) by mx.google.com with ESMTPSA id z12sm252463eev.6.2013.10.17.23.39.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 23:39:18 -0700 (PDT) In-Reply-To: <1517021.NeMYeNKAtn@nereid> X-Mailer: Apple Mail (2.1510) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c01::231; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TKCuDjhN - f2e111a61024 - 20131018 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:84883 Archived-At: Am 18.10.2013 um 08:35 schrieb Romain Diss : > Le jeudi 17 octobre 2013 06:40:21 Wolfgang Schuster a =E9crit : >>> \registerunit[unit][division=3Ddivision] >>> \setupunittext[division=3Ddiv] >> Context looks for language dependent value of "division" >> and prints the value from the unittext entry, with this method you can a= lso >> set different texts for different languages. > Thank you for these precisions. > = > Actually this feature interests me because I wondered how to translate ce= rtain > unit labels, like for example: > \unit{2 day} gives: "2 d" but I would like it to gives "2 j" in french. > = > So if I type this: > \setupunittext[day=3Dj] > I get the correct translation but how can I tell Context that this is the > translation for 'french' only? You can use the first optional argument for the language specifier, e.g. \setupunittext[en][day=3Dd] \setupunittext[fr][day=3Dj] Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________