ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mohammad Hossein Bateni <bateni@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \mainlanguage[pe]
Date: Mon, 1 Aug 2016 18:31:09 +0200	[thread overview]
Message-ID: <CAMHZ1dbXxUCbq9_bMP9tW5iBppA4P04c4NJcjDXtKAHDzEN9dw@mail.gmail.com> (raw)
In-Reply-To: <577E9210.5020103@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1781 bytes --]

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.

—MHB

On Thu, Jul 7, 2016 at 7:32 PM, Wolfgang Schuster <
schuster.wolfgang@gmail.com> wrote:

> Mohammad Hossein Bateni <bateni@gmail.com>
> 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’t 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3566 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2016-08-01 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 18:02 \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-06 18:30 ` \mainlanguage[pe] Wolfgang Schuster
2016-07-07  8:53   ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07 12:40     ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07 21:28       ` \mainlanguage[pe] Hans Hagen
2016-07-08  9:40         ` \mainlanguage[pe] Meer, Hans van der
2016-07-07 14:02     ` \mainlanguage[pe] Wolfgang Schuster
2016-07-07 14:31       ` \mainlanguage[pe] Mohammad Hossein Bateni
2016-07-07 17:32         ` \mainlanguage[pe] Wolfgang Schuster
2016-08-01 16:31           ` Mohammad Hossein Bateni [this message]
2016-07-07  5:20 ` \mainlanguage[pe] Mojca Miklavec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMHZ1dbXxUCbq9_bMP9tW5iBppA4P04c4NJcjDXtKAHDzEN9dw@mail.gmail.com \
    --to=bateni@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).