From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95652 Path: news.gmane.org!.POSTED!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: \mainlanguage[pe] Date: Mon, 1 Aug 2016 18:31:09 +0200 Message-ID: References: <577D4E30.6060608@gmail.com> <577E6100.6000009@gmail.com> <577E9210.5020103@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3996751613107955153==" X-Trace: blaine.gmane.org 1470069103 20664 195.159.176.226 (1 Aug 2016 16:31:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Aug 2016 16:31:43 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 01 18:31:39 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 1bUG7u-000537-51 for gctc-ntg-context-518@m.gmane.org; Mon, 01 Aug 2016 18:31:38 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F3F5513D65; Mon, 1 Aug 2016 18:31:23 +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 vsWK7x3-xH_b; Mon, 1 Aug 2016 18:31:23 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 36E5913D68; Mon, 1 Aug 2016 18:31:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D40C13D66 for ; Mon, 1 Aug 2016 18:31:22 +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 F7yRTF3Gsr9A for ; Mon, 1 Aug 2016 18:31:21 +0200 (CEST) Original-Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 620D313D65 for ; Mon, 1 Aug 2016 18:31:11 +0200 (CEST) Original-Received: by mail-lf0-f51.google.com with SMTP id g62so119404045lfe.3 for ; Mon, 01 Aug 2016 09:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Gocv583teOzih2kZ87ugCAOKNgSocx6s7ZxqyUAiogU=; b=IC2PGGjimvyZxnmTkQvlNvP/f7s6QOwcVUyexjZdkZtK1L41JAaLaUHp13fiwGWRqh VBVitu+rM1HvcSVBHdCKrhIoy7QNKE8f5PS5ZvezkWbsiiZhNRCu2uiKt1yyAdLlQ2a7 LT5YxrQ7D1VP3zSN0Y+cYWEnyC6Zqe5UASEzjZusRtzbmorqk5N3/b3YMqtXjDVTz1py xZgiqQVHFayOsXXWGh8B3YVlL/HU60iic/KVlMfY2aj310FnFIkont9DMwdzykO0AZAM 7zqbJYaGY5m+g86+VtGgEP2FY2r8YBV3Y5LQUapdrKoTjtQx4JDa+31nLFwlmW1xDuds l2og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Gocv583teOzih2kZ87ugCAOKNgSocx6s7ZxqyUAiogU=; b=Dl3doUkJyY8dPEzVydrTSLt7ExJkAVEW5HG3KTxTztOSjjzrcxIZf3G3qkoxgXrp4+ 5v2UPbeidux0LT1HpEtJFSpP5C5RakygH7IXRfJ0iwUEnq2bXtqQwFsmMz+nhxTvQTmW kKsz29jg4b2kTsi3E9/R47cqqexUuWGHuGIi2CJkaWfKacVQChyLa9H2yvESZpWJtTWm HmT6h8VSVzUNfqRGUYp8OpCGujtNzDvlT84GaGJJbEi5eQWs02Eg26Y2FcawJZ+T4gu/ eo9L1kqxNvu6ABs8eii3S04WVTui86dBklXefmcFN7sT54F4wjiFZILjYKT3mJAAxatS yHLA== X-Gm-Message-State: AEkooutrYIkUB/nBrt8lNbsevjpR1ohOty3SZMzP1se+c+lVq3UnRlAlAcyE0oovyH6VSrjcob9E5rz7Kj/blg== X-Received: by 10.25.76.139 with SMTP id z133mr18997138lfa.90.1470069070330; Mon, 01 Aug 2016 09:31:10 -0700 (PDT) Original-Received: by 10.25.215.164 with HTTP; Mon, 1 Aug 2016 09:31:09 -0700 (PDT) In-Reply-To: <577E9210.5020103@gmail.com> 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:95652 Archived-At: --===============3996751613107955153== Content-Type: multipart/alternative; boundary=001a114b0622bb805a053905204e --001a114b0622bb805a053905204e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Is there a trick to get over this issue? Until a conversion mechanism like what you suggested (\currentdate[persian->day,space,month,persian->month]) is implemented, can I somehow achieve a similar result, perhaps in a not so clean way? Can one reduce the result of \currentdate to a simple number by stripping the additional stuff that is there? Similarly, can I force \currentdate to expand or is it a fundamental implementation limitation? Can I access day, month and year values in Lua, to run some if statements, etc.? For instance, if it is the first day of April, change the font of the document or something like that. =E2=80=94MHB On Thu, Jul 7, 2016 at 7:32 PM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote: > Mohammad Hossein Bateni > 7. Juli 2016 um 16:31 > Thanks, Wolfgang! > > BTW why doesn't the following work? it gives the 'missing number' error. > > % \mainlanguage[en] > \romannumerals{\currentdate[day]} > > 1. The \currentdate command isn=E2=80=99t expandable and is therefore not= expanded > when you use it as argument for another command. > > 2. The \romannumerals commands expects a number as argument but > \currentdate returns more than a simple number. > > Wolfgang > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > 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 > > _________________________________________________________________________= __________ > --001a114b0622bb805a053905204e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Is there a trick to get over this issue?=C2=A0 Until a con= version mechanism like what you suggested (\currentdate[persian->day,space= ,month,persian->month]) is implemented, can I somehow achieve a s= imilar result, perhaps in a not so clean way?

Can one re= duce the result of \currentdate to a simple number by stripping the additio= nal stuff that is there?=C2=A0 Similarly, can I force \currentdate to expan= d or is it a fundamental implementation limitation?

Can I access day, month and year values in Lua, to run some if statements= , etc.?=C2=A0 For instance, if it is the first day of April, change the fon= t of the document or something like that.

=E2=80= =94MHB

On Thu, Jul 7, 2016 at 7:32 PM, Wolfgang Schuster <schuster.wol= fgang@gmail.com> wrote:
= 7.=20 Juli 2016 um 16:31
Thanks,=20 Wolfgang!

BTW why doesn't the following work?= =20 =C2=A0it gives the 'missing number' error.

% \mainlang= uage[en]
\romannumerals{\currentdate[day]}

1. The \currentdate command isn=E2=80=99t expandable and is therefore not= =20 expanded when you use it as argument for another command.

2. The \romannumerals commands expects a number as argument but=20 \currentdate returns more than a simple number.

Wolfgang

_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--001a114b0622bb805a053905204e-- --===============3996751613107955153== 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= --===============3996751613107955153==--