[NTG-context] Re: Why overbar is so big

2023-08-13 Thread Hans Hagen

On 8/13/2023 10:39 PM, Xavier B. wrote:

Running LMTX I have an error: lualibs-os not found:

lua error   > lua error on line 35 in file 
ng-pre-informacio-document.conTeXt:

token call, execute: 
...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: module 
'lualibs-os' not found:
 no field package.preload['lualibs-os']
 no file '/usr/local/share/lua/5.4/lualibs-os.lua'
 no file '/usr/local/share/lua/5.4/lualibs-os/init.lua'
 no file '/usr/local/lib/lua/5.4/lualibs-os.lua'
 no file '/usr/local/lib/lua/5.4/lualibs-os/init.lua'
 no file './lualibs-os.lua'
 no file './lualibs-os/init.lua'
stack traceback:
 [C]: in upvalue 'requiem'
 ...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in function 
<...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
 (...tail calls...)
 [ctxlua]:1: in main chunk
25 \subsubject{Versió}
26
27 Contínuament canvio aquest document, afegint, modificant o eliminant 
algunes parts seves. En aquest sentit, és una obra permanentment inacabada. Per 
aquest motiu convé saber quina versió del document esteu llegint.
28
29 \medskip
30 La versió d'aquest document és la {\bf 0.4.0-alfa.\currentdate[year,-, 
mm,-,dd]}.
31
32 \bigskip
33 Aquest document ha estat generat, \currentdate[weekday,{ },day,{ 
},month,{ },year] a les \currenttime, usant programari lliure 
(\goto{\Context}[url(http://wiki.contextgarden.net)] versió 
\contextversionnumber, \goto{\texenginename}[url(http://www.luatex.org)] versió 
\texengineversion\space i \goto{PGF/Ti{\em 
k}Z}[url(http://sourceforge.net/projects/pgf/)]) sota un entorn 
\goto{GNU/Linux}[url(https://www.linuxfoundation.org)] (\goto{Artix 
Linux}[url(https://artixlinux.org)]). La revisió d'aquest document és la número 
\goto{\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}}[url(https://repo.or.cz/apunts-espa-matematiques.git/shortlog/HEAD)]. El conjunt 
de les versions s'administra amb \goto{git}[url(http://git-scm.com/)]. Teniu el codi font del 
document en aquest repositori: 
\goto{https://repo.or.cz/apunts-espa-matematiques.git}[url(https://repo.or.cz/apunts-espa-matematiques.git)].
36


Can you give me the solution here?
I have no clue what lualibs-os is so ... if it's something third party 
you and try.


--permitloadlib

and cross your fingers. Also, whenever using lua code that is not part 
of context keep in mind that we use lua 5.4


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
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] Re: Why overbar is so big

2023-08-13 Thread Xavier B.
Running LMTX I have an error: lualibs-os not found:

lua error   > lua error on line 35 in file 
ng-pre-informacio-document.conTeXt:

token call, execute: 
...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: module 
'lualibs-os' not found:
no field package.preload['lualibs-os']
no file '/usr/local/share/lua/5.4/lualibs-os.lua'
no file '/usr/local/share/lua/5.4/lualibs-os/init.lua'
no file '/usr/local/lib/lua/5.4/lualibs-os.lua'
no file '/usr/local/lib/lua/5.4/lualibs-os/init.lua'
no file './lualibs-os.lua'
no file './lualibs-os/init.lua'
stack traceback:
[C]: in upvalue 'requiem'
...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in 
function <...nt/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
(...tail calls...)
[ctxlua]:1: in main chunk
25 \subsubject{Versió}
26
27 Contínuament canvio aquest document, afegint, modificant o eliminant 
algunes parts seves. En aquest sentit, és una obra permanentment inacabada. Per 
aquest motiu convé saber quina versió del document esteu llegint.
28
29 \medskip
30 La versió d'aquest document és la {\bf 0.4.0-alfa.\currentdate[year,-, 
mm,-,dd]}.
31
32 \bigskip
33 Aquest document ha estat generat, \currentdate[weekday,{ },day,{ 
},month,{ },year] a les \currenttime, usant programari lliure 
(\goto{\Context}[url(http://wiki.contextgarden.net)] versió 
\contextversionnumber, \goto{\texenginename}[url(http://www.luatex.org)] versió 
\texengineversion\space i \goto{PGF/Ti{\em 
k}Z}[url(http://sourceforge.net/projects/pgf/)]) sota un entorn 
\goto{GNU/Linux}[url(https://www.linuxfoundation.org)] (\goto{Artix 
Linux}[url(https://artixlinux.org)]). La revisió d'aquest document és la número 
\goto{\directlua{
34require "lualibs-os"
35 >> tex.sprint(math.floor(os.resultof("git log --pretty=oneline | wc 
-l")+1))}}[url(https://repo.or.cz/apunts-espa-matematiques.git/shortlog/HEAD)]. 
El conjunt de les versions s'administra amb 
\goto{git}[url(http://git-scm.com/)]. Teniu el codi font del document en aquest 
repositori: 
\goto{https://repo.or.cz/apunts-espa-matematiques.git}[url(https://repo.or.cz/apunts-espa-matematiques.git)].
36


Can you give me the solution here?

Thanks,
___
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] Regular online meet-up

2022-04-11 Thread Henning Hraban Ramm via ntg-context

You’re invited to join next *Wednesday*, April 13th, 15:00 CEST (UTC+2)
(Beware, we changed the weekday!)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans will probably give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.



(Same blurb as every time:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button. Beware 
there is only one presenter, so don’t kill someone else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* You can also join with a regular telephone (audio only, of course), 
call +49-6151-86275-22 (German landline); then you must enter a PIN that 
changes every time – if you need it, ask me for it via email. 
Mute/unmute your microphone with "0".


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, Hraban
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Regular online meet-up

2022-03-09 Thread Henning Hraban Ramm via ntg-context

That’s NOW, BTW. ;)

Am 06.03.22 um 13:28 schrieb Henning Hraban Ramm via ntg-context:

You’re invited to join next *Wednesday*, March 9th, 15:00 CET (UTC+1)
(Beware, we changed the weekday!)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans will probably give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.



(Same blurb as every time:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the 
audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button. Beware 
there is only one presenter, so don’t kill someone else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* You can also join with a regular telephone (audio only, of course), 
call +49-6151-86275-22 (German landline); then you must enter a PIN that 
changes every time – if you need it, ask me for it via email. 
Mute/unmute your microphone with "0".


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, Hraban

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Regular online meet-up

2022-03-06 Thread Henning Hraban Ramm via ntg-context

You’re invited to join next *Wednesday*, March 9th, 15:00 CET (UTC+1)
(Beware, we changed the weekday!)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans will probably give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.



(Same blurb as every time:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button. Beware 
there is only one presenter, so don’t kill someone else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* You can also join with a regular telephone (audio only, of course), 
call +49-6151-86275-22 (German landline); then you must enter a PIN that 
changes every time – if you need it, ask me for it via email. 
Mute/unmute your microphone with "0".


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, Hraban


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Regular online meet-up

2022-02-06 Thread Henning Hraban Ramm via ntg-context

Hi Alain,
in my current project I need the same. I use floats and move the 
externalfigure with \offset; can show you on Tuesday.


e.g.
\startplacefigure[title={},location=left]% or outer...
\offset[topoffset=-1em,leftoffset=-20mm]{%
% it would be nice to have outeroffset/inneroffset
\externalfigure[Schweinehund][width=50mm]}
\stopplacefigure

Hraban

Am 06.02.22 um 21:45 schrieb Alain Delmotte via ntg-context:

Hi!

I'll try to join and I have a question regarding inserting floats in 
outer margins in double sided document. The outer margins are large and 
the inner small. I want to insert my floats (mainly figures) in the 
outer margins and have them at level where they are called. Furthermore, 
sometimes the float is to large, so it should take part of the text, 
with the text surrounding it.


But this is perhaps answered in context garden, but I didn't find where.

And if there are more fundamental questions, my can wait.

See you on Tuesday.

Regards,

Alain

Le 5/02/2022 à 13:51, Henning Hraban Ramm via ntg-context a écrit :

You’re invited to join next Tuesday, February 8th, 15:00 CET (UTC+1)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans offered to give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.



Regarding the date:
Denis, who originally suggested Tuesday afternoon, can’t take part due 
to other obligations. I could also offer Wednesday or Thursday.
We could also change the weekday every time, but that might be 
confusing. I would keep the European afternoon time, since that makes 
participation possible for people from America and Asia.

What do you think?
Vote here: https://nuudel.digitalcourage.de/tB1MHH4jx6M5uwPg


(Same blurb as last time:)

[Howto]
* No special software installation required; most modern browsers 
should work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the 
audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.
* Minimize the default presentation with the "screen" button, bottom 
right.


* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button. 
Beware there is only one presenter, so don’t kill someone else’s 
presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency 
on your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* You can also join with a regular telephone (audio only, of course), 
call +49-6151-86275-22 (German landline); then you must enter a PIN 
that changes every time – if you need it, ask me for it via email. 
Mute/unmute your microphone with "0".


[Netiquette]
* Please use a name that we recognize from here. Some feel 
uncomfortable with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, Hraban
___ 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___ 



___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Regular online meet-up

2022-02-06 Thread Alain Delmotte via ntg-context

  
  
Hi!
I'll try to join and I have a question
regarding inserting floats in outer margins in double sided
document. The outer margins are large and the inner small. I
want to insert my floats (mainly figures) in the outer margins
and have them at level where they are called. Furthermore,
sometimes the float is to large, so it should take part of the
text, with the text surrounding it.
But this is perhaps answered in
context garden, but I didn't find where.
And if there are more fundamental
questions, my can wait.
See you on Tuesday.
Regards,
Alain

Le 5/02/2022 à 13:51, Henning Hraban
  Ramm via ntg-context a écrit :

You’re
  invited to join next Tuesday, February 8th, 15:00 CET (UTC+1)
  
  
  at https://lecture.senfcall.de/hen-rbr-rku-oke
  
  
  ConTeXt users of all levels are welcome!
  
  
  Hans offered to give a Q session again – please announce
  subjects you’d like to discuss ASAP, so that he can prepare.
  
  
  
  Regarding the date:
  
  Denis, who originally suggested Tuesday afternoon, can’t take part
  due to other obligations. I could also offer Wednesday or
  Thursday.
  
  We could also change the weekday every time, but that might be
  confusing. I would keep the European afternoon time, since that
  makes participation possible for people from America and Asia.
  
  What do you think?
  
  Vote here: https://nuudel.digitalcourage.de/tB1MHH4jx6M5uwPg
  
  
  
  (Same blurb as last time:)
  
  
  [Howto]
  
  * No special software installation required; most modern browsers
  should work (WebRTC required).
  
  * Open the above URL, accept the privacy statement,
  
  * enter your name,
  
  * click "join" (or "start" if you’re the first),
  
  * click "with microphone", allow your browser to access it, check
  the audio.
  
  * Your microphone is muted if you join. Activate microphone and/or
  camera with the buttons at the bottom.
  
  * Minimize the default presentation with the "screen" button,
  bottom right.
  
  
  * If you’d like to share your screen or upload a file, you can
  make yourself the presenter: Click on your user name, change the
  setting, then you’ll see the "screen sharing" button beside the
  camera button; also there’s now "manage presentations" behind the
  "plus" button. Beware there is only one presenter, so don’t kill
  someone else’s presentation.
  
  
  [Technical hints]
  
  * Sound is usually better if you use a headset (less noise for
  everyone).
  
  
  * Connection problems are mostly due to low bandwidth or high
  latency on your side, e.g. with mobile connections.
  
  * If audio/video doesn’t work for you, you can still use the text
  chat.
  
  * Screen sharing needs a lot of bandwidth.
  
  
  * You can also join with a regular telephone (audio only, of
  course), call +49-6151-86275-22 (German landline); then you must
  enter a PIN that changes every time – if you need it, ask me for
  it via email. Mute/unmute your microphone with "0".
  
  
  [Netiquette]
  
  * Please use a name that we recognize from here. Some feel
  uncomfortable with anonymous lurkers.
  
  * Mute your microphone while you’re not talking.
  
  * It’s nice to show your face at least when you join.
  
  * If there are connection problems, stop camera sharing.
  
  * The room is set to “everyone’s a moderator“, I trust you...
  
  
  See you, Hraban
  
___
  
  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://context.aanhet.net
  
  archive  : https://bitbucket.org/phg/context-mirror/commits/
  
  wiki : http://contextgarden.net
  
___
  

  

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Regular online meet-up

2022-02-05 Thread Henning Hraban Ramm via ntg-context

You’re invited to join next Tuesday, February 8th, 15:00 CET (UTC+1)

at https://lecture.senfcall.de/hen-rbr-rku-oke

ConTeXt users of all levels are welcome!

Hans offered to give a Q session again – please announce subjects 
you’d like to discuss ASAP, so that he can prepare.



Regarding the date:
Denis, who originally suggested Tuesday afternoon, can’t take part due 
to other obligations. I could also offer Wednesday or Thursday.
We could also change the weekday every time, but that might be 
confusing. I would keep the European afternoon time, since that makes 
participation possible for people from America and Asia.

What do you think?
Vote here: https://nuudel.digitalcourage.de/tB1MHH4jx6M5uwPg


(Same blurb as last time:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button. Beware 
there is only one presenter, so don’t kill someone else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* You can also join with a regular telephone (audio only, of course), 
call +49-6151-86275-22 (German landline); then you must enter a PIN that 
changes every time – if you need it, ask me for it via email. 
Mute/unmute your microphone with "0".


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, Hraban
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] printing the current date

2021-01-10 Thread Peter Münster
On Sun, Jan 10 2021, Fabrice L wrote:

> For exemple:
>
>  \date[][weekday,day,month,year] and \currenttime[h,{\,:\,},m] 

Sorry, I should have mentioned, that I use the latest version:
context-2021.01.08

-- 
   Peter
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] printing the current date

2021-01-10 Thread Fabrice L


> Le 10 janv. 2021 à 13:23, Peter Münster  a écrit :
> 
> Hi,
> 
> I would expect, that \currentdate prints the current date, but it does
> not:
> 
> --8<---cut here---start->8---
> \starttext
> \date[d=1]% first day of this month, ok
> 
> \date% again first day, last parameters are used, this is ok
> 
> \currentdate% same as \date, but I would expect the day of today...
> \stoptext
> --8<---cut here---end--->8---
> 
> How could I print the current date please?

For exemple:

 \date[][weekday,day,month,year] and \currenttime[h,{\,:\,},m] 

F.

> 
> TIA for any hints,
> -- 
>   Peter
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Weekdays and others as numbers

2021-01-08 Thread Jairo A. del Rio
ConTeXt has some inbuilt functions for dates. I see that the following

\mainlanguage[spanish]
\starttext

\dayoftheweek{4}{5}{1992}

\stoptext


gives "lunes" (Monday). How to get a weekday number (2 in this case)
instead?

Sincerely,

Jairo
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] dutch calendars 3 months

2021-01-05 Thread Taco Hoekwater

Knew that one. AKA: what is the weekday for “XX in month XX”?

> On 5 Jan 2021, at 14:06, Otared Kavian  wrote:
> 
> Best wishes for the new year !
> 
> Talking of calendars, this one is even more compact: each year is shown on 
> one page, and when changing the year only the three lines where the months 
> are shown will change:
> 
> http://www.professores.im-uff.mat.br/hjbortol/c1p/?fbclid=IwAR3EkoYjcxA2MCkfWU8J-KqaEReMluNaQ1DPkDNM8dxtWEwnGZ0mXsvQ640
> 
> Best regards: Otared
> 
>> On 5 Jan 2021, at 11:46, luigi scarso  wrote:
>> 
>> I guess this is a challenge for Willi :
>> a module to typeset "dutch calendars"
>> as in 
>> https://www.calendari.it/
>> (I am not involved at all with the site, it's the first I have found )
>> 
>> I like the slim version, with 3 months, the saint(s) of the day, the moon 
>> phases, the week number,
>> the day from the beginning and to the end of the year 
>> 
>> 
>> -- 
>> luigi
>> ___
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)







___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Short weekday option for date command

2020-04-08 Thread Adam Reviczky
Thank you Wolfgang!

Adam

On Wed, Apr 8, 2020 at 9:11 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Adam Reviczky schrieb am 08.04.2020 um 21:53:
> > Thank you Hans and Wolfgang,
> >
> > I have updated the wiki (https://wiki.contextgarden.net/Command/date)
> > with the new dayshort/daylong options, but I seem to get an empty value
> > for every day after day 7, see example:
> >
> > \starttext
> > \date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
> > \date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
> > \stoptext
> >
> > This gives me (note "sun" is missing in the second line):
> >
> > sat, 7 April 2008
> > , 8 April 2008
> >
> > Am I using the options correctly?
>
> No, the \daylong and \dayshort expect a number between 1 and 7 and
> result in a label for the requested day of the week but it's not meant
> to be used in \currentdate.
>
> > Still using luatex and not luametatex.
>
> To get the short names with \currentdate you have to append ":mnem" to
> the weekday, w, WEEKDAY or W keywords.
>
> \starttext
>
> \startlines
> \date[d=7,m=4,y=2008][weekday,{,~},day,~,month,~,year]
> \date[d=7,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
> \date[d=8,m=4,y=2008][weekday,{,~},day,~,month,~,year]
> \date[d=8,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
> \stoplines
>
> \stoptext
>
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Short weekday option for date command

2020-04-08 Thread Wolfgang Schuster

Adam Reviczky schrieb am 08.04.2020 um 21:53:

Thank you Hans and Wolfgang,

I have updated the wiki (https://wiki.contextgarden.net/Command/date) 
with the new dayshort/daylong options, but I seem to get an empty value 
for every day after day 7, see example:


\starttext
\date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
\date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
\stoptext

This gives me (note "sun" is missing in the second line):

sat, 7 April 2008
, 8 April 2008

Am I using the options correctly?


No, the \daylong and \dayshort expect a number between 1 and 7 and 
result in a label for the requested day of the week but it's not meant

to be used in \currentdate.


Still using luatex and not luametatex.


To get the short names with \currentdate you have to append ":mnem" to 
the weekday, w, WEEKDAY or W keywords.


\starttext

\startlines
\date[d=7,m=4,y=2008][weekday,{,~},day,~,month,~,year]
\date[d=7,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
\date[d=8,m=4,y=2008][weekday,{,~},day,~,month,~,year]
\date[d=8,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
\stoplines

\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Short weekday option for date command

2020-04-08 Thread Adam Reviczky
Thank you Hans and Wolfgang,

I have updated the wiki (https://wiki.contextgarden.net/Command/date) with
the new dayshort/daylong options, but I seem to get an empty value for
every day after day 7, see example:

\starttext
\date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
\date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
\stoptext

This gives me (note "sun" is missing in the second line):

sat, 7 April 2008
, 8 April 2008

Am I using the options correctly?
Still using luatex and not luametatex.

ConTeXt  ver: 2020.04.08 14:34 MKIV beta  fmt: 2020.4.8  int:
english/english
mtx-context | current version: 2020.04.08 14:34

This is LuaTeX, Version 1.13.0 (TeX Live 2020/Debian)
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.5
Compiled with mplib version 2.00
Compiled with zlib 1.2.11; using 1.2.11
Development id: 7330

Thanks,
Adam

On Sat, Apr 4, 2020 at 11:24 AM Hans Hagen  wrote:

> On 4/4/2020 11:47 AM, Adam Reviczky wrote:
> > Hi,
> >
> > Is there a way to achieve a short weekday option with \date[] to get 3
> > letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the
> > monthshort either through context or lua?
> Not currently but I will add the basics (I have to double check with WS
> to see where if conflicts as such an extension involves additional
> commands it has to go into the setups too) but others have to add the
> abbreviations.
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Short weekday option for date command

2020-04-04 Thread Hans Hagen

On 4/4/2020 11:47 AM, Adam Reviczky wrote:

Hi,

Is there a way to achieve a short weekday option with \date[] to get 3 
letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the 
monthshort either through context or lua?
Not currently but I will add the basics (I have to double check with WS 
to see where if conflicts as such an extension involves additional 
commands it has to go into the setups too) but others have to add the 
abbreviations.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Short weekday option for date command

2020-04-04 Thread Adam Reviczky
Hi,

Is there a way to achieve a short weekday option with \date[] to get 3
letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the
monthshort either through context or lua?

Thanks,
Adam
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \date is calculated wrong

2019-09-11 Thread Martin Althoff
On Wed, 2019-09-11 at 08:42 +0200, Hans Hagen wrote:
> On 9/11/2019 4:15 AM, Martin Althoff wrote:
> > Hi all,
> > 
> > the \date is output wrong. Whatever value is given for d= I get the 11th. 
> > That is todays
> > date. Not sure what would happen tomorrow
> > 
> > Thanks for any fix suggestions.
> > 
> > \starttext
> > \date[d=16,m=9,y=2019][weekday, day,{. }, month, year]
> > \stoptext
> also in the latest beta?
> 
> Hans
> 

All fixed after updating to current version: 2019.09.10 20:03

Sorry for the noise, 

Thanks, Martin

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \date is calculated wrong

2019-09-11 Thread Hans Hagen

On 9/11/2019 4:15 AM, Martin Althoff wrote:

Hi all,

the \date is output wrong. Whatever value is given for d= I get the 11th. That 
is todays
date. Not sure what would happen tomorrow

Thanks for any fix suggestions.

\starttext
\date[d=16,m=9,y=2019][weekday, day,{. }, month, year]
\stoptext

also in the latest beta?

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \date is calculated wrong

2019-09-10 Thread Martin Althoff
Hi all,

the \date is output wrong. Whatever value is given for d= I get the 11th. That 
is todays
date. Not sure what would happen tomorrow

Thanks for any fix suggestions.

\starttext
\date[d=16,m=9,y=2019][weekday, day,{. }, month, year]
\stoptext

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tex.month can't be overridden like tex.day and tex.year

2019-05-06 Thread Hans Hagen

On 5/2/2019 5:54 PM, Tristan Stenner wrote:

Dear list,

in the following document I can set the date as seen by LuaTeX so the
date functions use a different date:

---
\starttext
\ctxlua{tex.year=1980; tex.month=1; tex.day=15}

% Taken from https://wiki.contextgarden.net/Command/date,
% outputs 15 may 1980
\date[m=1][day,~,{\monthshort\normalmonth},~,year]

% outputs January 15, 1980
\ctxlua{context.date{m=tex.month};}
\stoptext
---

This works for all parts of the date (even the weekday), except the
month. I've looked through the core-con.lua and found nothing that would
explain this (or what I'd need to change), as the tex.month is properly set.

\meaning\day   \par
\meaning\month \par
\meaning\year  \par

\meaning\normalday   \par
\meaning\normalmonth \par
\meaning\normalyear  \par


context (re)defines \month so you need to use the original meanings 
(\normal..)


Jams

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] tex.month can't be overridden like tex.day and tex.year

2019-05-03 Thread Tristan Stenner
Dear list,

in the following document I can set the date as seen by LuaTeX so the
date functions use a different date:

---
\starttext
\ctxlua{tex.year=1980; tex.month=1; tex.day=15}

% Taken from https://wiki.contextgarden.net/Command/date,
% outputs 15 may 1980
\date[m=1][day,~,{\monthshort\normalmonth},~,year]

% outputs January 15, 1980
\ctxlua{context.date{m=tex.month};}
\stoptext
---

This works for all parts of the date (even the weekday), except the
month. I've looked through the core-con.lua and found nothing that would
explain this (or what I'd need to change), as the tex.month is properly set.

Best regards
Tristan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \date behaving strange

2019-02-10 Thread martin

Great, that worked. Thanks for the quick solution.


Changed the line, then ran:

luatools --generate
luatools --ini --compile cont-en


On 09.02.19 20:59, Hans Hagen wrote:

On 2/9/2019 2:39 PM, martin wrote:
I'm getting a bit confused. The \date function doesn't result in a 
formatted date. That goes for some files that are a few weeks old.


What am I missing?

\starttext
\date[d=2,m=3,y= 2018]
\stoptext

results in:

d=2m=3y= 2018


An optional formatting parameter has no effect

\date[d=1, m=4, y=2018][weekday, {\\}, dd,{-}, mm,-, year]

line 446 of core-con.mkiv should be:

  {#2}{\currentdatespecification}{\labellanguage}%


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \date behaving strange

2019-02-09 Thread Hans Hagen

On 2/9/2019 2:39 PM, martin wrote:
I'm getting a bit confused. The \date function doesn't result in a 
formatted date. That goes for some files that are a few weeks old.


What am I missing?

\starttext
\date[d=2,m=3,y= 2018]
\stoptext

results in:

d=2m=3y= 2018


An optional formatting parameter has no effect

\date[d=1, m=4, y=2018][weekday, {\\}, dd,{-}, mm,-, year]

line 446 of core-con.mkiv should be:

 {#2}{\currentdatespecification}{\labellanguage}%


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \date behaving strange

2019-02-09 Thread martin
I'm getting a bit confused. The \date function doesn't result in a 
formatted date. That goes for some files that are a few weeks old.


What am I missing?

\starttext
\date[d=2,m=3,y= 2018]
\stoptext

results in:

d=2m=3y= 2018


An optional formatting parameter has no effect

\date[d=1, m=4, y=2018][weekday, {\\}, dd,{-}, mm,-, year]

using:
mtx-context | current version: 2019.02.07 18:46
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] superscripts "th" "nd" "rd" "st" on dates etc..

2015-09-05 Thread Wolfgang Schuster

Hans Hagen <mailto:pra...@wxs.nl>
27. August 2015 22:10
On 8/27/2015 1:21 AM, Wolfgang Schuster wrote:

Mojca Miklavec <mailto:mojca.miklavec.li...@gmail.com>
26. August 2015 19:36

In case that you were looking for an automated way to print the date,
here's one option:
\setuplanguage[en][date={weekday,{, },day:ord,{~},month,{,~},year}]
(And the documentation is somewhat wrong, I think it suggests to use
"day+" which doesn't work. But I should check the details again.)

The keyword to create ordinal numbers in a date has changed in MkIV.

Unfortunately I didn't manage to figure out how to do the superscript
automatically. Yes, it's 1\highordinalstr{st} like Alan mentioned, but
that only works in "manual mode".


core-con.lua : 1275 :

context.highordinalstr(converters.ordinal(whatordinal,currentlanguage))
Please revert this change and let the user choose between a ordinal in 
text size and raised small size.


\starttext

\currentdate[day:ord]

\currentdate[day:highord]

\stoptext

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
___

Re: [NTG-context] superscripts th nd rd st on dates etc..

2015-08-27 Thread Hans Hagen

On 8/27/2015 1:21 AM, Wolfgang Schuster wrote:

Mojca Miklavec mailto:mojca.miklavec.li...@gmail.com
26. August 2015 19:36

In case that you were looking for an automated way to print the date,
here's one option:
\setuplanguage[en][date={weekday,{, },day:ord,{~},month,{,~},year}]
(And the documentation is somewhat wrong, I think it suggests to use
day+ which doesn't work. But I should check the details again.)

The keyword to create ordinal numbers in a date has changed in MkIV.

Unfortunately I didn't manage to figure out how to do the superscript
automatically. Yes, it's 1\highordinalstr{st} like Alan mentioned, but
that only works in manual mode.


core-con.lua : 1275 :


context.highordinalstr(converters.ordinal(whatordinal,currentlanguage))



You can’t show them as superscript when you use the \date command
but in manual mode you can also use \ordinaldaynumber.

\starttext
\dorecurse{10}{\ordinaldaynumber{\recurselevel}\crlf}
\stoptext

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
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___

Re: [NTG-context] superscripts th nd rd st on dates etc..

2015-08-26 Thread Mojca Miklavec
On Mon, Aug 24, 2015 at 11:19 PM, John Culleton wrote:
 Forgot how to do these.

In case that you were looking for an automated way to print the date,
here's one option:
\setuplanguage[en][date={weekday,{, },day:ord,{~},month,{,~},year}]
(And the documentation is somewhat wrong, I think it suggests to use
day+ which doesn't work. But I should check the details again.)

Unfortunately I didn't manage to figure out how to do the superscript
automatically. Yes, it's 1\highordinalstr{st} like Alan mentioned, but
that only works in manual mode.

Mojca
___
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
___

Re: [NTG-context] superscripts th nd rd st on dates etc..

2015-08-26 Thread Wolfgang Schuster

Mojca Miklavec mailto:mojca.miklavec.li...@gmail.com
26. August 2015 19:36

In case that you were looking for an automated way to print the date,
here's one option:
\setuplanguage[en][date={weekday,{, },day:ord,{~},month,{,~},year}]
(And the documentation is somewhat wrong, I think it suggests to use
day+ which doesn't work. But I should check the details again.)

The keyword to create ordinal numbers in a date has changed in MkIV.

Unfortunately I didn't manage to figure out how to do the superscript
automatically. Yes, it's 1\highordinalstr{st} like Alan mentioned, but
that only works in manual mode.

You can’t show them as superscript when you use the \date command
but in manual mode you can also use \ordinaldaynumber.

\starttext
\dorecurse{10}{\ordinaldaynumber{\recurselevel}\crlf}
\stoptext

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
___

Re: [NTG-context] Minor date formatting issue

2013-08-10 Thread Sietse Brouwer
 Perhaps someone should update the wiki? I suppose I could get an
 account and fix it myself ... if people don't mind someone as inexpert
 as me messing around in there ...

It would be very nice if you could do that. Don’t worry about
inexpertise -- people improving the documentation of how commands work
is always welcome. (If you can't get the formatting right, you can
leave it in plain text and I'll come in later and tidy it up.)

Cheers,
Sietse


On 10 August 2013 07:04, Matt Gushee m...@gushee.net wrote:
 Hi, Wolfgang--

 On Fri, Aug 9, 2013 at 6:58 AM, Wolfgang Schuster
 schuster.wolfg...@gmail.com wrote:

 I am experimenting with the \currentdate command. I am finding that

  \currentdate [weekday,{,~},month,day+,{,~},year]

 which should work according to the Wiki, produces:

  Thursday, Augustday+, 2013

 It’s recommended to use “day:ord” with \currentdate but you also use “day:+”.

 \starttext
 \currentdate[day,space,day:ord,space,day:+]
 \stoptext

 Ah, yes, thank you!

 Perhaps someone should update the wiki? I suppose I could get an
 account and fix it myself ... if people don't mind someone as inexpert
 as me messing around in there ...

 --
 Matt
 ___
 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
 ___
___
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
___

Re: [NTG-context] Minor date formatting issue

2013-08-09 Thread Wolfgang Schuster

Am 09.08.2013 um 05:43 schrieb Matt Gushee m...@gushee.net:

 Hello, all--
 
 I am experimenting with the \currentdate command. I am finding that
 
  \currentdate [weekday,{,~},month,day+,{,~},year]
 
 which should work according to the Wiki, produces:
 
  Thursday, Augustday+, 2013
 
 This command:
 
  \currentdate [weekday,{,~},month,day,{,~},year]
 
 works as expected. I also tried
 
  \date [][weekday,{,~},month,day+,{,~},year]
 
 but that produced the same result as above.
 
 I have a recent stable release of the standalone ConTeXt package from
 the Garden. Is there a new way to format a date with an ordinal
 indicator (-st, -nd, -rd, -th), or is that just not working at the
 moment? Please advise.


It’s recommended to use “day:ord” with \currentdate but you also use “day:+”.

\starttext
\currentdate[day,space,day:ord,space,day:+]
\stoptext

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
___


Re: [NTG-context] Minor date formatting issue

2013-08-09 Thread Matt Gushee
Hi, Wolfgang--

On Fri, Aug 9, 2013 at 6:58 AM, Wolfgang Schuster
schuster.wolfg...@gmail.com wrote:

 I am experimenting with the \currentdate command. I am finding that

  \currentdate [weekday,{,~},month,day+,{,~},year]

 which should work according to the Wiki, produces:

  Thursday, Augustday+, 2013

 It’s recommended to use “day:ord” with \currentdate but you also use “day:+”.

 \starttext
 \currentdate[day,space,day:ord,space,day:+]
 \stoptext

Ah, yes, thank you!

Perhaps someone should update the wiki? I suppose I could get an
account and fix it myself ... if people don't mind someone as inexpert
as me messing around in there ...

--
Matt
___
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
___


[NTG-context] Minor date formatting issue

2013-08-08 Thread Matt Gushee
Hello, all--

I am experimenting with the \currentdate command. I am finding that

  \currentdate [weekday,{,~},month,day+,{,~},year]

which should work according to the Wiki, produces:

  Thursday, Augustday+, 2013

This command:

  \currentdate [weekday,{,~},month,day,{,~},year]

works as expected. I also tried

  \date [][weekday,{,~},month,day+,{,~},year]

but that produced the same result as above.

I have a recent stable release of the standalone ConTeXt package from
the Garden. Is there a new way to format a date with an ordinal
indicator (-st, -nd, -rd, -th), or is that just not working at the
moment? Please advise.

--
Matt Gushee
___
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
___


Re: [NTG-context] Working with layers ... with example

2013-06-24 Thread Wolfgang Schuster

Am 25.06.2013 um 01:23 schrieb Sander Maijers s.n.maij...@student.ru.nl:

 At http://ideone.com/D6Mmj3 there is the title page for my document. I want 
 to place the table in the middle of the A4 page (horizontally and vertically) 
 and the logo beneath it, preferably at the bottom of the page.
 
 When I failed to get the table placed where I want it, at some point, I tried 
 to use a layer. In the end the table was placed okay, but in a messy way I 
 suppose.
 
 Now I have tried to add another layer but the logo appears to the right of 
 the table or not at all. As far as I understand there can only be one 
 background layer, so that trick with the table will not work again for the 
 logo I guess.
 
 Can someone please help me to use multiple layers that I can exactly position?

1. When you have multiple layers you have to to list them all in the 
\setupbackgrounds commands.

   \setupbackgrounds[page][background={document_logo,document_data}]

2. You can insert a certain numbers of empty lines in your document with 
\blank[n*line].

3. \startalignment makes no sense in a layer.

4. You can align single lines of text with \leftaligned, \midaligned or 
\rightaligned.


\startcomponent title_page

\product bachelors_thesis_text
\project bachelors_thesis
 
\definelayer
  [document_data]
  [x=0mm, y=0mm, width=20cm, height=30cm]

\definelayer
  [document_logo]
  [x=0mm, y=0mm, width=20cm, height=30cm]
 
\setupbackgrounds[page][background={document_logo,document_data}]
 
\setlayer
  [document_data]
  [hoffset=4cm, voffset=15cm]
  {\bTABLE[align=middle]
 \bTR 
   \bTD institution \eTD 
   \bTD[align=middle] \eTD 
 \eTR
 \bTR 
   \bTD in fulfillment of \eTD 
   \bTD[align=middle] \eTD
 \eTR
 \bTR 
   \bTD supervisors \eTD 
   \bTD[align=middle] \eTD 
 \eTR
 \bTR 
   \bTD revision date \eTD 
   \bTD[align=middle] \currentdate[weekday,month,day,{, },year] \eTD 
 \eTR
 \bTR 
   \bTD author e-mail \eTD 
   \bTD[align=middle]  \eTD 
 \eTR
 \bTR 
   \bTD further info \eTD 
   \bTD[align=middle]  \eTD
 \eTR
   \eTABLE}
 
\setlayer
  [document_logo]
  [hoffset=4cm, voffset=10cm]
  {\externalfigure[alogo.eps][factor=fit]}
 
\setupinteraction[state=start] 

\starttext

{\tfd Title}

\blank[3*line]

\rightaligned{\tfa\it Sander Maijers}   

\stoptext

\stopcomponent


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
___


[NTG-context] MKIV: Wrong conversion for \date

2011-04-04 Thread Wolfgang Schuster
Hi Hans,

there are a few problems with the keywords for \date in MkIV.

\starttext

\starttabulate[|l|l|l|]
\NC keyword  \NC MkII \NC MKIV   \NC\NR
\NC day  \NC 4\NC \currentdate[day]  \NC\NR
\NC day+ \NC 4\NC \currentdate[day+] \NC\NR
\NC month\NC April\NC \currentdate[month]\NC\NR
\NC year \NC 2011 \NC \currentdate[year] \NC\NR
\NC d\NC 4\NC \currentdate[d]\NC\NR
\NC d+   \NC 4\NC \currentdate[d+]   \NC\NR
\NC m\NC April\NC \currentdate[m]\NC\NR
\NC j\NC 2011 \NC \currentdate[j]\NC\NR
\NC y\NC 2011 \NC \currentdate[y]\NC\NR
\NC w\NC Monday   \NC \currentdate[w]\NC\NR
\NC dd   \NC 04   \NC \currentdate[dd]   \NC\NR
\NC dd+  \NC 4\NC \currentdate[dd+]  \NC\NR
\NC mm   \NC 04   \NC \currentdate[mm]   \NC\NR
\NC jj   \NC 11   \NC \currentdate[jj]   \NC\NR
\NC yy   \NC 11   \NC \currentdate[yy]   \NC\NR
\NC weekday  \NC Monday   \NC \currentdate[weekday]  \NC\NR
\NC referral \NC 20110404 \NC \currentdate[referral] \NC\NR
\stoptabulate

\stoptext

What i miss is also a way to get the month with a single digit, e.g. 

  \currentdate[day,.,month,.,year]

print “4.April.2011” but i want “4.4.2011”.

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
___

[NTG-context] Problem with \date command

2010-10-15 Thread Cedric Mauclair
Hi all,

Today I wanted to use the command \date[d=15,m=10,y=2010][weekday].
It gives Friday as it should. However
\date[d=2,m=1,y=2011][weekday] gives the same result which is wrong
(it's a Sunday). In fact, whatever the supplied date, it gives
Friday. I guess the parameter isn't taken into account here.

Bug or feature?

-- Cédric
___
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
___


Re: [NTG-context] Problem with \date command

2010-10-15 Thread Peter Münster
On Fri, Oct 15 2010, Cedric Mauclair wrote:
 
 Today I wanted to use the command \date[d=15,m=10,y=2010][weekday].
 It gives Friday as it should. However
 \date[d=2,m=1,y=2011][weekday] gives the same result which is wrong
 (it's a Sunday). In fact, whatever the supplied date, it gives
 Friday. I guess the parameter isn't taken into account here.

No problem here:
\starttext
\doifmodeelse{mkiv}{MKIV}{MKII}:
Sunday = \date[d=2,m=1,y=2011][weekday] ?
\stoptext

Perhaps you use a very old version?
There was a bug more than 2 years ago:
http://archive.contextgarden.net/message/20080331.082509.7fc304a9.en.html

Peter

-- 
Contact information: http://pmrb.free.fr/contact/
___
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
___


Re: [NTG-context] Problem with \date command

2010-10-15 Thread Cedric Mauclair
I use the minimal from 3 days ago.

Here is what I do actually.

\def\mydate{\doifnextcharelse\space\domydate\domydate }
\def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]}
\mydate 2/1/2011 -- Friday 2 january 2011

\date[d=2,m=1,y=2011][weekday,day+,month,year] -- Sunday 2 january 2011

Any ideas?

-- Cédric



On Fri, Oct 15, 2010 at 15:14, Peter Münster pmli...@free.fr wrote:
 \doifmodeelse{mkiv}{MKIV}{MKII}:
 Sunday = \date[d=2,m=1,y=2011][weekday] ?
___
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
___


Re: [NTG-context] Problem with \date command

2010-10-15 Thread Peter Münster
On Fri, Oct 15 2010, Cedric Mauclair wrote:

 Any ideas?

Test file:

\def\mydate{\doifnextcharelse\space\domydate\domydate }
\def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]}
\starttext
\mydate 2/1/2011   \par % token #3 = 2
\mydate 2/1/2  \par % token #3 = 2
\mydate 2/1/{2011} \par % token #3 = 2011
\stoptext 

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/
___
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
___


Re: [NTG-context] Problem with \date command

2010-10-15 Thread Cedric Mauclair
Right, I forgot about the catcodes. Thank you.

-- Cédric



On Fri, Oct 15, 2010 at 15:37, Peter Münster pmli...@free.fr wrote:
 On Fri, Oct 15 2010, Cedric Mauclair wrote:

 Any ideas?

 Test file:

 \def\mydate{\doifnextcharelse\space\domydate\domydate }
 \def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]}
 \starttext
 \mydate 2/1/2011   \par % token #3 = 2
 \mydate 2/1/2      \par % token #3 = 2
 \mydate 2/1/{2011} \par % token #3 = 2011
 \stoptext

 Cheers, Peter

 --
 Contact information: http://pmrb.free.fr/contact/
 ___
 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
 ___

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


Re: [NTG-context] PDF fields

2010-08-31 Thread Lutz Haseloff
2010/8/31 Andreas Harder andreas.har...@rz-online.de:
 Hi all,

 please have a look at my attached example. I've two problems.


 1) After I fill one field in the PDF-file all other fields inherit the text. 
 How can I prevent this?

The fields are all the same. You can:

\dorecurse{31}{\definefield [hours#1] [line] [setup] [] []}

\def\Feld#1%
  {\bTR\bTD \date[d=#1,m=8,y=2010][dd,{.},mm,{.},year,~,(,weekday,)] \eTD
   \bTD \field[hours#1] \eTD\eTR}

 2) The text in the left column an the text in the field are not on the same 
 baseline. The field-text is slightly higher.

 Thank you in advance

        Andreas

Lutz
___
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
___


Re: [NTG-context] PDF fields

2010-08-31 Thread Andreas Harder

Am 31.08.2010 um 14:30 schrieb Lutz Haseloff:

 1) After I fill one field in the PDF-file all other fields inherit the text. 
 How can I prevent this?
 
 The fields are all the same. You can:
 
 \dorecurse{31}{\definefield [hours#1] [line] [setup] [] []}
 
 \def\Feld#1%
  {\bTR\bTD \date[d=#1,m=8,y=2010][dd,{.},mm,{.},year,~,(,weekday,)] \eTD
   \bTD \field[hours#1] \eTD\eTR}

Okay, I see. Thanks a lot!

Greeting
Andreas
___
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
___


Re: [NTG-context] Calendar resources

2008-06-22 Thread Charles P. Schaum
Here's the main bit of code; the two documents from which I derived it
are over the 40k limit. One is the calendar FAQ text version. The other
is a file easter_date.txt that is a thread from:

Newsgroups: soc.religion.christian
From: [EMAIL PROTECTED] (Mike Siemon)
Subject: Easter algorithms I
Organization: ATT Bell Laboratories
Approved: [EMAIL PROTECTED]

Does anyone want such files?

Anyway, the implemented formulas are below. The header files are just
for keeping track of Palm-specific variables for different modules.

/*
 *
 * Created with Falch.net DeveloperStudio
 * http://www.falch.net/
 * 
 * Created : 4/11/01 12:18:42 AM
 * Creator : (Unknown)
 *

/
#include Pilot.h
#include Easter.h
#include Easter_res.h   

extern Boolean England;
extern UInt16 YearAD;
Char Orthodox_Julian[20], Orthodox_Gregorian[20], Western[20];

typedef enum {Julian,Gregorian} calendar;

/*  The Golden Number is the order of the year in the 19-year lunar
cycle.
 *  It is the same in Julian or Gregorian calendars, and is listed in the
 *  output of this program under the heading GN.
 */

int GoldenNumber(int year)
{
return ((year % 19) + 1);
}

/*  All dates in this program are referred to March 1st; so 32 means
 *  April 1 and 0 means February 28th or 29th.  Leap years are needed
 *  for printing February dates (and for dominical letters).
 */

int Leap(int year, calendar style)
{
if (year % 4)
return 0;
else switch(style) {
case Julian:return 1;
case Gregorian: return (year % 100 || year % 400 == 0);
}
}

#define century (year/100)

/*  Gregorian solar correction -- this is the number of days difference
 *  between Julian and Gregorian civil dates, in effect the number of
 *  excess leap years in the Julian calendar since the time of Nicea.
 *  This correction derives from the Gregorian introduction of non-leap
 *  century years, giving mean tropical year = 365.2425 days.
 */

int Solar(int year)
{
return (century - century/4 - 2);
}

/*  Gregorian lunar correction -- this is only used for the computation
of
 *  the paschal new moon (via epact), but might as well be pulled out on
 *  its own.  I give the pedantically correct version.
 *  This correction derives from the mean lunar month being 29.53059 days
 *  instead of the 6939.75/235 assumed in the Julian calendar.  It is one
 *  days in (roughly) 312.5 years, or 8 days in 2500 years.
 */

int Lunar(int year)
{
return ((century - 15 - (century-17)/25)/3);
}

/*  Epact is the age of the moon on March 1st (same as January 1st);
 *  It (may have) derived from Greek methods of calculating the extra
 *  (epagomenal) months intercalated into the regular 12 at 7 points
 *  of the 19-year Metonic cycle.  However, it is not used in Julian
 *  easter calculations and is provided here only for Gregorian NewMoon.
 */

int Epact(int year)
{
int epact;

epact = (11*GoldenNumber(year) - Solar(year) + Lunar(year)) % 30;
if (epact  0)
epact += 30;
return epact;
}

/*  Here's the hard one.  Keep in mind that there are several artificial
 *  conventions -- the equinox is ALWAYS March 21; new moon is ALWAYS the
 *  date on which a fictitious average moon is one day old, and the
full
 *  moon is 13 days later, on the 14th of the month.  In the Julian
version
 *  (and MOSTLY in the Gregorian) the pre-paschal month has 30 days.  All
 *  of this works out keeping fairly close to astronomical reality in the
 *  Gregorian case, but it is not necessarily exact.
 */

int NewMoon(int year, calendar style)
{
int new_moon, epact;

switch (style) {
case Julian:
new_moon = (4 - 11*GoldenNumber(year)) % 30;
while (new_moon  8)
new_moon += 30;
return new_moon;
case Gregorian:
epact = Epact(year);
new_moon = 31-epact;
if (new_moon  8) {
new_moon += 30;
if (epact == 24 || epact == 25  year%19  10)
new_moon--;
}
return new_moon;
}
}

int WeekDay(int date, int year, calendar style)
{
int d;

d = date + year + year/4;
if (style == Gregorian)
d -= Solar(year);
return  (d % 7);
}

/*  Given the Paschal full moon, we just step to the next Sunday ...
 */

int Easter(int year, calendar style)
{
int paschal_moon

[NTG-context] wrong weekday with MKIV

2008-03-30 Thread Peter Münster
Hello,

According to MKIV, today is Wednesday:

\starttext
\doifmodeelse{mkiv}{MKIV}{MKII}:
Sunday = \date[d=30,m=3,y=2008][weekday] ?
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
]
\synchronizationbar[name][alternative=page|local][settings]
\synchronize
\synonym[text]{text}{text}
\tab{text} text
# \tbox
\tex{text}
\textreference[reference]{text}
\textrule[top|bottom]{text}
\textvariable[name]
\thinrule
\thinrules[settings]
# \tightlayer
\title[references]{text}
# \to
\tooltip[left|right|middle]{text}{text}
\translate[name=text]
\typ{text}
\type{text}
\typebuffer[name]
\typefile[name]{text}
\underbar{text}
\underbars{text text}
# \unexpanded
# \unprotect
# \unprotected
\useblocks[names][names]
\usecommands{text}
\usedirectory[names|reset]
\useencoding[names]
\useexternaldocument[name][file][text]
\useexternalfigure[name][file][options]
\useexternalfile[name][name][file][font options]
\useexternalfiles[name][options]
\useexternalsoundtrack[name][file]
# \useJSscripts
\usemodule[names]
\usereferences[files]
\usespecials[names|reset]
\usesymbols[name]
# \usetypescript
# \usetypescriptfile
\useURL[name][URL][file][text]
# \useXMLfilter
\version[final|concept|temporary]
# \verticalstrut
# \vfilll
# \VL
\vl[number]
# \vpos
\WEEKDAY{text}
\weekday{text}
\whitespace
\WORD{text}
\Word{text}
\wordright{text}
\WORDS{text text}
\Words{text text}
\writebetweenlist[section|name]{text}
\writetolist[section|name]{text}{text}
\writetoreferencelist[name]{text}{text}
\writetoregister[singular][text]{text+text+text}
# \XMLerase
# \XMLflush
# \XMLop
# \XMLpar
# \zerocount
# \zerodimen
# \zeropoint

signature.asc
Description: This is a digitally signed message part.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Datenumber

2007-11-29 Thread Bart Wise
On Thursday November 29 2007, Mojca Miklavec wrote:
 On Nov 27, 2007 5:49 PM, Bart Wise wrote:
  LaTeX has a package called datenumber.  It basically allows you to
  several things:
 
  1) convert a date into a number,

 What number? What's the input and what's the output?

First you set the date:
\setdatenumber{year}{month}{day}
Example: \setdatenumber{2007}{1}{5}

Internally, this sets a counter called datenumber.
You print the date with \datedate.

Then, to increment by a week, you would add 7 to the datenumber and set the 
date as follows:  
\addtocounter{datenumber}{7}
\setdatebynumber{\thedatenumber}

I made a function that increments the date:
\def\IncDate{%
  \addtocounter{datenumber}{7}%
  \setdatebynumber{\thedatenumber}%
}%

Then, I created a table with the first column entries as follows:
\datedate\IncDate
\datedate\IncDate
\datedate\IncDate
\datedate\IncDate
\datedate\IncDate
...

The output would be:
Friday, 5 January, 2007
Friday, 12 January, 2007
Friday, 19 January, 2007
Friday, 26 January, 2007
Friday, 2 February, 2007

This way I do not have to put in anything except the first date and dates for 
the whole year are calculated and printed for me.


  2) add and subtract from that
  number, in essence adding and subtracting days, and
 
  3) converting a date number into a date string.

 The manual mentions this example
 \date[d=17,m=11,y=2007][weekday,month,day,{, },year]

 or simply
 \date[y=2007,m=11,d=27]
 or
 \currentdate

As best as I can tell, this only sets the date.  I can see of no way to add a 
given number of days to calculate a new date.


  I use this package to create a yearly lesson
  schedule and various other similiar things.  However, I have spent a
  considerable amount of time trying to find the same functionality in
  ConTeXt with no avail. Is there a solution for this?

 There are quite some macros in tex/context/base/core-con.tex (
 core-con.mkii) devoted to that. I didn't play with substraction yet,
 but I bet there is some simple way to do it.

I looked through the source code of core-con.mkii, core-con.mkiv and 
core-con.tex.  I don't see the functionality I need already constructed.  I 
was hoping that an existing solution existed without the need for creating 
new code.


 Mojca


Thanks for you help.  If I overlooked something, let me know.
Bart
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] arxiv.org: submitting ConText documents

2007-04-16 Thread Sanjoy Mahajan
Here is the (just tested!) procedure to submit ConTeXt documents to
arxiv.org and also provide source.

Suppose that document.tex is the source file, and has fig.mp as the
figure file that produces fig.1, etc.

1. Generate document.ps using 

  texexec --dvi --nobackend document.tex
  dvips -Ppdf document.dvi -o document.ps 
  /* the -o in case of stupid systems that send the output to lpr by default */

2. Make a directory src/ with document.tex and fig.mp.  Then make a
   .tgz file for uploading.  It is produced from this file structure

document.ps
src/
  fig.mp
  document.tex

   e.g. by 
   
   tar -czvf arxiv.tgz document.ps src/

3. arxiv.org will generate PDF from the PS using ghostscript, so make
   sure that ps2pdf on document.ps produces a working PDF.

4. If all is well, upload arxiv.tgz as your submission using the usual
   arxiv.org submission (or replacement) procedure.  Ideally you'll do
   step 4 at least 15 minutes (ideally an hour) before the 4pm (US
   Eastern) weekday deadline, so that you get back the submission date and
   preprint number from arxiv, leaving time for step 5

5. Incorporate the preprint number (or URL) and submission date into
   your document and produce an arxiv stampline along the left.  Then
   remake document.ps and arxiv.tgz in step 2, and replace the
   previous submission with the new arxiv.tgz.

6. Check that all is well.

When the paper becomes official (8pm US Eastern time), users should
get three choices for format: PS (what you provided), PDF (generated
by arxiv.org from the PS), and 'Other formats', which will offer an
option to download source.

Of course, all of the remaking should be done by a Makefile.  You can
see http://www.arxiv.org/abs/0704.1854 for an example with a
Makefile.

All of the above is wikified at
http://wiki.contextgarden.net/Posting_on_arxiv.org

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Week number

2006-12-30 Thread Aditya Mahajan
On Sat, 30 Dec 2006, Taco Hoekwater wrote:

 
 Hi all,
 
 
 I just posted this (the result of a rainy morning in Dordrecht, NL)
 to comp.text.tex. Someone here might be interested as well.

 [...]

 I was feeling a bit bored today, so I came up with this. It is a
 plain e-TeX input file instead of a LaTeX package, but it should
 run without problems.

If you are still bored, how about adding this to ConTeXt, so that one 
can say

Today is \currentdate[weekday] of the \currentdate[week] week of 
\currentday[year]

I do not know if someone will find it useful or not, but it seems like 
a nice feature to have :)

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Week number

2006-12-30 Thread Hans Hagen
Aditya Mahajan wrote:
 On Sat, 30 Dec 2006, Taco Hoekwater wrote:

   
 Hi all,


 I just posted this (the result of a rainy morning in Dordrecht, NL)
 to comp.text.tex. Someone here might be interested as well.

 [...]

 I was feeling a bit bored today, so I came up with this. It is a
 plain e-TeX input file instead of a LaTeX package, but it should
 run without problems.
 

 If you are still bored, how about adding this to ConTeXt, so that one 
 can say

 Today is \currentdate[weekday] of the \currentdate[week] week of 
 \currentday[year]

 I do not know if someone will find it useful or not, but it seems like 
 a nice feature to have :)
   
see core-con.tex, such things have been there for years now  -) 

(not sure if it does the same as what taco code does) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Image Database

2005-08-18 Thread Willi Egger



Jessica Holle wrote:

I've some questions about the Image Database.
I found no answers in the xfigure.pdf.

Can I generate the xml file automaticly?
I can use xmltools --dir --pattern=/home/tralal/*.jpg
--output=tralala.xml
but then in the xml file doesn't stad figure, there is file. so this
doesn't work I think.

Humble, I do not know what xmltools all can do. I use a perl-sript to 
generate the xml-file. - Please have a look into the attached file 
make-xml.pl



Must everything be in the same folder? the xmlfile, the images and
my document I'm writing?
Or can I specify a directory in the xmlfile? So that the images can
be on an other folder than the xmlfile?
Normally I prepare a directory with the figures. The xml-file is then 
generated and compiled. The resulting figure-databse I transfer then to 
the directory where the tex files reside.





Must the xmlfile be in the same directory than my document?


I hope this will help you.
Kind regards

Willi


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
#!/usr/bin/perl

## Prepare an XML-file for the preparation of a figure-database with TeX

## XML-file header information:

$Librarylanguage = en;
$Organization = Willi;
$Project = Restauratie;
$Product = Restauratie-cursus ;
$Comment = Figure database;
$CopyRight = WE ;


## Variables

$Filename = ;
$FileextensionA = pdf;
$FileextensionB = png;
#~ $FileextensionC = 1;
$Filedate = ;
$Filetimestamp ;
$Filesize= ;
$Globstring = *. . $FileextensionA;
$Outfile = Figure-lib.xml;

## Date
($Second, $Minute, $Hour, $DayOfMonth, $Month, $Year, $WeekDay, $DayOfYear, 
$IsDST) = localtime(time);
$RealMonth = $Month +1 ;
$RealYear  = $Year + 1900 ;

printf ('%02d.%02d.%04d', $DayOfMonth,$RealMonth,$RealYear);
print   \n;

## Open the XML-file for writing:
open(OUTFILE, $Outfile);

## Print XML-file header:
Header();

## Collect Figure files into an list:

@Files = glob($Globstring);
$Globstring = *. . $FileextensionB;
@MoreFiles = glob($Globstring);
push(@Files, @MoreFiles);
#~ $Globstring = *. . $FileextensionC;
#~ @MoreFiles = glob($Globstring);
#~ push(@Files, @MoreFiles);

## Work on each filename:

foreach $Filename (@Files) {

#~ $exifinfo = `identify -verbose -format %[EXIF:*] $Filename`;
#~ chomp($exifinfo);
#~ if(length($exifinfo)  2){
#~ $Filetimestamp = (-C $Filename) ;
#~ $Filedatestamp = time - $Filetimestamp ;
#~ ($Second, $Minute, $Hour, $DayOfMonth, $Month, $Year, $WeekDay, 
$DayOfYear, $IsDST) = localtime($Filedatestamp);
#~ $RealMonth = $Month +1 ;
#~ $RealYear  = $Year + 1900 ;
#~ $FileDate = $DayOfMonth . . . $RealMonth . . . $RealYear ;
#~ }
#~ else {
#~ @exiflines = split(/\n/,$exifinfo);
#~ foreach $exifline (@exiflines){
#~ ($exifHeader,$exifData) = split(/=/,$exifline,2);
#~ if($exifHeader eq DateTimeOriginal){
#~ $FileDate = substr($exifData,8,2) . . . substr($exifData,5,2) 
. . . substr($exifData,0,4);
#~ }
#~ }
#~ }
$Filesize = (-s $Filename) ;
if ($Filesize  1024){
$Filesize = int($Filesize / 1024) . k;
}
## Determine first part of filename - label in figure library
($Label,$Suffix) = split (/\./,$Filename) ;

## Print the XMLblock for the actual figurefile:

Printfigureblock();
}

print OUTFILE  /figurelibrary;

close(OUTFILE);

## End of main programme.


sub Header{
print OUTFILE !-- Figurelibrary: $Outfile --\n ;
print OUTFILE !-- Date of generation: ;
printf OUTFILE ('%02d.%02d.%04d', $DayOfMonth,$RealMonth,$RealYear) ;
print OUTFILE --\n ;
print OUTFILE !-- Figurelibrary generated automatically by PERL --\n ;
print OUTFILE !-- Script by W. Egger, 27.04.2003 --\n ;
print OUTFILE  \n ;
print OUTFILE !-- Generation of a PDF file with the database: texexec 
--pdf --use=fig-make figure-lib.xml --\n ;
print OUTFILE  \n ;
print OUTFILE  figurelibrary language=\$Librarylanguage\\n ;
print OUTFILE  \n ;
print OUTFILE description\n ;
print OUTFILE organization$Organization/organization\n ;
print OUTFILE project$Project/project\n ;
print OUTFILE product$Product/product\n ;
print OUTFILE comment$Comment/comment\n ;
print OUTFILE /description\n ;
print OUTFILE  \n ;
}

sub Printfigureblock{
print OUTFILE  figure\n ;
print OUTFILE file . lc($Filename) . /file\n ;
print OUTFILE label .lc($Label). /label\n ;
print OUTFILE copyright$CopyRight/copyright\n ;
print OUTFILE comment$FileDate  . $Filesize . B/comment\n ;
print OUTFILE  /figure\n\n ;

print Finished figureblock: $Filename\n;
}
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context