Re: [NTG-context] numbering questions

2022-12-31 Thread Henning Hraban Ramm via ntg-context

Am 31.12.22 um 20:41 schrieb Pablo Rodriguez via ntg-context:

On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:

I’m playing with some examples of section numbering.

* Is there a setup to influence the order of number segments? I.e. can I
have “section.chapter.part“ instead of “part.chapter.section”?


I thought sectionsegments=section:chapter would work, but it doesn’t.


* How can I format the segments, e.g. to get two or three digits each
(leading zeros)?


The easy part is to have the leading zeros, but I cannot get it working
with numbercommand or deepnumbercommand.

   \startluacode
   function document.leadingzeros(str)
 local lzeros = 3-str:len()
 return ("0"):rep(lzeros)
   end
   \stopluacode
   \unexpanded\def\lzeros#1%
 {\cldcontext{document.leadingzeros("#1")}}


Same. With numbercommand, Lua gets "\s and can’t handle it, with 
deepnumbercommand it gets "1-\m". Is this a catcode issue?




* I can force a section number with “ownnumber”, but the next one is
back in the previous scheme. Itemize has “start”. How can I start
section chapter numbering at 3 (or -1 or whatever; I know I can start at
0 with “zero”) and let ConTeXt continue from there?


\setupheadnumber[chapter][3] % will start with 4


Thank you, that works.


I hope it helps. »Einen guten Rutsch ins Neujahr!«


Dito!

(In proper German that would be just “Guten Rutsch” or “Guten Rutsch ins 
neue Jahr”; Neujahr ist just the name of the holiday.)


All the best,
Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] numbering questions

2022-12-31 Thread Pablo Rodriguez via ntg-context
On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:
> I’m playing with some examples of section numbering.
> 
> * Is there a setup to influence the order of number segments? I.e. can I 
> have “section.chapter.part“ instead of “part.chapter.section”?

I thought sectionsegments=section:chapter would work, but it doesn’t.

> * How can I format the segments, e.g. to get two or three digits each 
> (leading zeros)?

The easy part is to have the leading zeros, but I cannot get it working
with numbercommand or deepnumbercommand.

  \startluacode
  function document.leadingzeros(str)
local lzeros = 3-str:len()
return ("0"):rep(lzeros)
  end
  \stopluacode
  \unexpanded\def\lzeros#1%
{\cldcontext{document.leadingzeros("#1")}}

> * I can force a section number with “ownnumber”, but the next one is 
> back in the previous scheme. Itemize has “start”. How can I start 
> section chapter numbering at 3 (or -1 or whatever; I know I can start at 
> 0 with “zero”) and let ConTeXt continue from there?

\setupheadnumber[chapter][3] % will start with 4

I hope it helps. »Einen guten Rutsch ins Neujahr!«

Happy New Year to all!

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] numbering questions

2022-12-31 Thread Henning Hraban Ramm via ntg-context

Am 31.12.22 um 19:20 schrieb Duncan Hothersall:

I can't test right now but would something like
\setuphead[Day][sectionsegments=Day:Month:Year]
help?


I forgot to mention that I tried this. It doesn’t work (while it would 
be the most easy syntax, I guess), you can set the segments only in 
order of hierarchy.


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] numbering questions

2022-12-31 Thread Duncan Hothersall via ntg-context
I can't test right now but would something like

\setuphead[Day][sectionsegments=Day:Month:Year]

help?

Duncan


On Sat, 31 Dec 2022 at 17:24, Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> A happy new year to everyone!
>
> I’m playing with some examples of section numbering.
>
> * Is there a setup to influence the order of number segments? I.e. can I
> have “section.chapter.part“ instead of “part.chapter.section”?
>
> * How can I format the segments, e.g. to get two or three digits each
> (leading zeros)?
>
> * I can force a section number with “ownnumber”, but the next one is
> back in the previous scheme. Itemize has “start”. How can I start
> section chapter numbering at 3 (or -1 or whatever; I know I can start at
> 0 with “zero”) and let ConTeXt continue from there?
>
>
> My example tries to (ab)use the section numbering for a date (e.g. for a
> diary):
>
> -
> \definestructureconversionset[default][n,n,month,n][n]
> \definestructureseparatorset [default][-,-,-,-]
>
> \definehead[Year][chapter]
> \definehead[Month][section]
> \definehead[Day][subsection]
>
> \define[2]\TitleCmd{#1} % number only
>
> \setuphead[Year,Month,Day][number=yes,page=no,command=\TitleCmd]
> \setuphead[Year][page=yes]
> %\setuphead[Month][]
> \setuphead[Day][style={\ss\bf}]
>
> \def\Dummycontent{
>  \dorecurse{12}{
>  \startMonth
>  New Month.
>
>  \dorecurse{5}{
>  \startDay
>  Another day.
>
>  \stopDay
>  }
>
>  \stopMonth
> }}
>
> \starttext
>
> \startYear[ownnumber=2023,title=This]
> A new year begins.
>
> \Dummycontent
>
> \stopYear
>
> \startYear
> Next year.
>
> \Dummycontent
>
> \stopYear
>
> \stoptext
> -
>
> Hraban
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] numbering questions

2022-12-31 Thread Henning Hraban Ramm via ntg-context

A happy new year to everyone!

I’m playing with some examples of section numbering.

* Is there a setup to influence the order of number segments? I.e. can I 
have “section.chapter.part“ instead of “part.chapter.section”?


* How can I format the segments, e.g. to get two or three digits each 
(leading zeros)?


* I can force a section number with “ownnumber”, but the next one is 
back in the previous scheme. Itemize has “start”. How can I start 
section chapter numbering at 3 (or -1 or whatever; I know I can start at 
0 with “zero”) and let ConTeXt continue from there?



My example tries to (ab)use the section numbering for a date (e.g. for a 
diary):


-
\definestructureconversionset[default][n,n,month,n][n]
\definestructureseparatorset [default][-,-,-,-]

\definehead[Year][chapter]
\definehead[Month][section]
\definehead[Day][subsection]

\define[2]\TitleCmd{#1} % number only

\setuphead[Year,Month,Day][number=yes,page=no,command=\TitleCmd]
\setuphead[Year][page=yes]
%\setuphead[Month][]
\setuphead[Day][style={\ss\bf}]

\def\Dummycontent{
\dorecurse{12}{
\startMonth
New Month.

\dorecurse{5}{
\startDay
Another day.

\stopDay
}

\stopMonth
}}

\starttext

\startYear[ownnumber=2023,title=This]
A new year begins.

\Dummycontent

\stopYear

\startYear
Next year.

\Dummycontent

\stopYear

\stoptext
-

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Adding support for German language to the Words conversion

2022-12-31 Thread Henning Hraban Ramm via ntg-context

Hi Marcus,
any news on that?
Seems like you didn’t send your work to Hans or it didn’t arrive.

Happy new year,
Hraban

Am 31.10.22 um 10:05 schrieb Wolfgang Schuster via ntg-context:

Hi Marcus,

do you have an update on the support for german verbose numbers?

Wolfgang


Hans Hagen via ntg-context schrieb am 10.10.2022 um 23:44:

On 10/10/2022 9:21 PM, Marcus Christopher Ludl via ntg-context wrote:

Hello all,

this is my first contribution to this mailing list. 

Recently, when I posted a question on StackExchange.com regarding 
adding support for another language (German) to the "Words" 
conversion in ConTeXt (see here: 
https://tex.stackexchange.com/questions/657534/how-to-add-support-for-another-language-german-to-the-words-conversion-in-cont), @mickep suggested that I post the patched file (core-con.lua) to the mailing list, once I have it finished, so that it can be added for all to use. So, now that I'm confident my code works well, I would like to do just that. 


How should I proceed? Should I just send the file including my new 
code as an attachement to the mailing list? Or would it be 
preferrable to paste only the new parts of the code inline into an 
e-mail? Is that even the correct mailing list or would it be better 
to send this to dev-cont...@ntg.nl?

just mail them to me and wolfgang and we'll have a look at it

Hans


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Ajami script

2022-12-31 Thread Henning Hraban Ramm via ntg-context

I just read this:
https://www.bu.edu/articles/2022/fallou-ngom-discovers-ajami-african-writing-system/

And now I’d like to know if ConTeXt is capable of typesetting this 
variant of Arabic. (Just out of curiosity, I can’t read any Arabic and 
don’t know any African language.)


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___