[NTG-context] expand date from CSV file

2014-12-17 Thread Pablo Rodriguez
Dear list, I have the following sample: \usemodule[scancsv] \unexpanded\def\lineaction{ \Name\ arrived on \Date\\ } \setheader \setsep{;} \setfiletoscan{mail.csv} \starttext \filelineaction \stoptext that reads data from mail.csv: Name;Date

[NTG-context] Date format problems

2014-07-29 Thread A.J. Bonnema
Hi all, I started using ConteXt a while ago, on the side line I still use LaTeX (old habits die hard). When converting my CV to ConTeXt I have a weird date problem. I hope one of you can point me in the right direction. I copy the start of the document from vi (line 4 is the relevant line

Re: [NTG-context] Date format problems

2014-07-29 Thread Herbert Voss
Am 29.07.2014 10:02, schrieb A.J. Bonnema: I started using ConteXt a while ago, on the side line I still use LaTeX (old habits die hard). When converting my CV to ConTeXt I have a weird date problem. I hope one of you can point me in the right direction. I copy the start of the document from

Re: [NTG-context] Date format problems

2014-07-29 Thread A.J. Bonnema
On 07/29/2014 11:14 AM, Herbert Voss wrote: Am 29.07.2014 10:02, schrieb A.J. Bonnema: I started using ConteXt a while ago, on the side line I still use LaTeX (old habits die hard). When converting my CV to ConTeXt I have a weird date problem. I hope one of you can point me in the right

[NTG-context] PDF document metadata: keyword and date

2014-03-30 Thread Pablo Rodriguez
Dear list, I have the following sample: \setupinteraction[state=start, author={I, Me}, keyword={interactive document, ConTeXt}, date=03-02-2004] \starttext Hi.\page Hi. \stoptext I have two questions: How can I avoid the removal of commas in the keyword option? How

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

Re: [NTG-context] Minor date formatting issue

2013-08-09 Thread Wolfgang Schuster
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

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,

[NTG-context] Minor date formatting issue

2013-08-08 Thread Matt Gushee
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

Re: [NTG-context] Left-justifying the date in the letter module

2013-07-31 Thread Wolfgang Schuster
Am 31.07.2013 um 03:32 schrieb Michael Ash m...@econs.umass.edu: I am still having a problem with left-justifying the date in letters. The date is towards the left but is aligned several mm to the right of the other text. This is fixed, there module produced a unwanted space

[NTG-context] Left-justifying the date in the letter module

2013-07-30 Thread Michael Ash
I am still having a problem with left-justifying the date in letters. The date is towards the left but is aligned several mm to the right of the other text. \usemodule[letter] %% Omit the word Date, attempt to left-justify date (doesn't align perfectly) \setupletterlayer[reference][alternative

[NTG-context] French letter style and date

2013-06-21 Thread Jean-Philippe Rey
Dear all, I can't manage to get the date on a french letter style. I am using ConTeXt ver: 2013.04.07 01:04 MKIV beta fmt: 2013.4.7 int: english/english I also tried some older versions and with ConTeXt ver: 2011.05.18 18:04 MKIV fmt: 2011.7.31 int: english/english I get a date

Re: [NTG-context] French letter style and date

2013-06-21 Thread Wolfgang Schuster
Am 20.06.2013 um 20:50 schrieb Jean-Philippe Rey jp...@noos.fr: Dear all, I can't manage to get the date on a french letter style. I am using ConTeXt ver: 2013.04.07 01:04 MKIV beta fmt: 2013.4.7 int: english/english I also tried some older versions and with ConTeXt ver

[NTG-context] date problem

2013-03-20 Thread H. van der Meer
There is a nasty problem when defining the \date. First approach: *** macro:-\date \def\thedate{\date}\writestatus{***}{\meaning\thedate} Alas, I get lateron a luatex error on \date: ! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\d'. Second

Re: [NTG-context] date problem

2013-03-20 Thread Meer H. van der
20.03.2013 um 14:26 schrieb H. van der Meer h.vanderm...@uva.nl: There is a nasty problem when defining the \date. First approach: *** macro:-\date \def\thedate{\date}\writestatus{***}{\meaning\thedate} Alas, I get lateron a luatex error on \date: ! LuaTeX error [string

Re: [NTG-context] date problem

2013-03-20 Thread Wolfgang Schuster
Am 20.03.2013 um 14:52 schrieb Meer H. van der h.vanderm...@uva.nl: One step further, thanks. But why does \edef\thedate{\rawdate[]}\writestatus{***}{\meaning\thedate} result in ** macro:-unknown march 2013 instead of 20 march 2013? Provide a *working* minimal example

Re: [NTG-context] date problem

2013-03-20 Thread Meer H. van der
with this, because fixing the current date in some macro shouldn't be impossible. And why all those extra ,s in month, ,day, , year? I would suggest that besides \currentdate one should be able to also use \currentdate[month][day][year][language], \currentdate[day][mont][year][language],etc

Re: [NTG-context] date problem

2013-03-20 Thread Wolfgang Schuster
{march} 20 2013 The problem is essentially the same. \starttext \writestatus{***}{\cldcontext{os.date(\letterpercent Y\space\letterpercent m\space\letterpercent d)}} \stoptext I am most unhappy with this, because fixing the current date in some macro shouldn't be impossible. \starttext

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
Trying to do some date and time processing myself, I ran into problems caused by ConTeXt makeing it incompatibel with the original plain TeX itself! In the TeX-book, Appendix B one finds citation (Some parameters are set by TeX itself as it runs, so it is inappropriate to initialize them: \time

Re: [NTG-context] date handling maltreated?

2013-03-20 Thread Meer H. van der
Sorry, not yes finished, accidently sent away too soon. Hans van der Meer On 20 mrt. 2013, at 16:26, H. van der Meer h.vanderm...@uva.nl wrote: Trying to do some date and time processing myself, I ran into problems caused by ConTeXt makeing it incompatibel with the original plain TeX

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
Trying to do some date and time processing myself, I ran into problems caused by ConTeXt makeing it incompatibel with the original plain TeX itself! In the TeX-book, Appendix B one finds citation (Some parameters are set by TeX itself as it runs, so it is inappropriate to initialize them: \time

Re: [NTG-context] date handling maltreated?

2013-03-20 Thread Wolfgang Schuster
Am 20.03.2013 um 16:40 schrieb H. van der Meer h.vanderm...@uva.nl: Trying to do some date and time processing myself, I ran into problems caused by ConTeXt makeing it incompatibel with the original plain TeX itself! In the TeX-book, Appendix B one finds citation (Some parameters are set

Re: [NTG-context] date handling maltreated?

2013-03-20 Thread Hans Hagen
On 3/20/2013 4:26 PM, H. van der Meer wrote: I strongly ask that ConTeXt abstains from changing the definition of \month and reverts to the exact result as given by plain TeX, i.e. a number in the range [1-12]. Because the change makes it impossible to do calculations on the month. well, it

[NTG-context] Bug in \date (experimental branch)

2011-12-30 Thread Andreas Harder
Hi Hans, a day is prefixed to every day-number. \starttext \date[d=29,m=12,y=2011] \currentdate \stoptext outputs December day29, 2011 December day30, 2011 Regards Andreas ___ If your question

Re: [NTG-context] Bug in \date (experimental branch)

2011-12-30 Thread Hans Hagen
On 30-12-2011 19:58, Andreas Harder wrote: \starttext \date[d=29,m=12,y=2011] \currentdate \stoptext in core-con.mkiv: \letvalue{\??conversionarguments3}\system_checked_conversion

[NTG-context] Possible bug with \date in french

2011-10-10 Thread Romain Diss
Hi, Since a recent upgrade of the beta the \date command give day+ octobre 2011 if \mainlanguage[fr] is set. Minimal example: \mainlanguage[fr] \starttext \date \language[en] (\date) \stoptext A rapid search lead me to these lines (560-571) in lang-def.mkiv: \installlanguage [\s

Re: [NTG-context] Possible bug with \date in french

2011-10-10 Thread Hans Hagen
On 10-10-2011 14:39, Romain Diss wrote: Hi, Since a recent upgrade of the beta the \date command give day+ octobre 2011 if \mainlanguage[fr] is set. Minimal example: \mainlanguage[fr] \starttext \date \language[en] (\date) \stoptext A rapid search lead me to these lines (560

Re: [NTG-context] Possible bug with \date in french

2011-10-10 Thread Romain Diss
On 10-10-2011, you wrote On 10-10-2011 14:39, Romain Diss wrote: Hi, Since a recent upgrade of the beta the \date command give day+ octobre 2011 if \mainlanguage[fr] is set. Minimal example: \mainlanguage[fr] \starttext \date \language[en] (\date

Re: [NTG-context] Possible bug with \date in french

2011-10-10 Thread Hans Hagen
On 10-10-2011 18:35, Romain Diss wrote: On 10-10-2011, you wrote On 10-10-2011 14:39, Romain Diss wrote: Hi, Since a recent upgrade of the beta the \date command give day+ octobre 2011 if \mainlanguage[fr] is set. Minimal example: \mainlanguage[fr] \starttext \date \language[en

Re: [NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-10-02 Thread Hans Hagen
On 1-10-2011 15:14, Wolfgang Schuster wrote: There is also a bug for the labels in the form “month:mnem” in lang-lab.lua function languages.labels.define() local variables = interfaces.variables local data = languages.data.labels local function define(command,list,prefixed)

Re: [NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-10-01 Thread Hans Hagen
” is defined. \starttext \date[d=1,m=8][day:ord,space,month,space,month:mnem] \starttabulate[|Tl|l|] \NC August \EQ \labeltext{August} \NC\NR \NC August:mnem \EQ \labeltext{August:mnem} \NC\NR \NC august:mnem \EQ \labeltext{august:mnem} \NC\NR \stoptabulate \stoptext which makes me wonder

Re: [NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-10-01 Thread Wolfgang Schuster
Am 01.10.2011 um 14:57 schrieb Hans Hagen: On 29-9-2011 13:49, Wolfgang Schuster wrote: Even when you patch this you don’t get any output because context tries (in the example below) to use the label “August:mnem” but only the label “august:mnem” is defined. \starttext \date[d=1,m

Re: [NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-09-29 Thread Mojca Miklavec
On Thu, Sep 29, 2011 at 01:06, Wolfgang Schuster wrote: Am 28.09.2011 um 23:58 schrieb Mojca Miklavec: Hello, MKII contains a macro \enordinaldaynumber which I don't find in MKIV. My main question: how can I setup the date to display 23\high{rd} Sep, 2011? \starttext \currentdate[day

Re: [NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-09-29 Thread Wolfgang Schuster
Am 29.09.2011 um 13:22 schrieb Mojca Miklavec: On Thu, Sep 29, 2011 at 01:06, Wolfgang Schuster wrote: Am 28.09.2011 um 23:58 schrieb Mojca Miklavec: Hello, MKII contains a macro \enordinaldaynumber which I don't find in MKIV. My main question: how can I setup the date to display 23

[NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-09-28 Thread Mojca Miklavec
Hello, MKII contains a macro \enordinaldaynumber which I don't find in MKIV. My main question: how can I setup the date to display 23\high{rd} Sep, 2011? Thank you, Mojca ___ If your question is of interest

Re: [NTG-context] writing date with ordinal numbers (\enordinaldaynumber) in mkiv

2011-09-28 Thread Wolfgang Schuster
Am 28.09.2011 um 23:58 schrieb Mojca Miklavec: Hello, MKII contains a macro \enordinaldaynumber which I don't find in MKIV. My main question: how can I setup the date to display 23\high{rd} Sep, 2011? \starttext \currentdate[day+,space,month,space,year] \startlines \language[en

Re: [NTG-context] \date bug with french

2011-07-13 Thread Romain Diss
Le lundi 04 juillet 2011, Romain Diss a écrit : The date printed with the \date command is not correct in french (but ok in english). See this example : \mainlanguage[fr] \starttext \date \stoptext It prints 44 juillet 2011 (today). Without \mainlanguage[fr], it’s prints

[NTG-context] \date bug with french

2011-07-04 Thread Romain Diss
Hi, The date printed with the \date command is not correct in french (but ok in english). See this example : \mainlanguage[fr] \starttext \date \stoptext It prints 44 juillet 2011 (today). Without \mainlanguage[fr], it’s prints July 4, 2011 (as expected). I have ConTeXt

Re: [NTG-context] \date bug with french

2011-07-04 Thread Wolfgang Schuster
Am 04.07.2011 um 15:10 schrieb Romain Diss: Hi, The date printed with the \date command is not correct in french (but ok in english). See this example : \mainlanguage[fr] \starttext \date \stoptext It prints 44 juillet 2011 (today). Without \mainlanguage[fr], it’s

Re: [NTG-context] \date bug with french

2011-07-04 Thread luigi scarso
On Mon, Jul 4, 2011 at 3:25 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 04.07.2011 um 15:10 schrieb Romain Diss: Hi, The date printed with the \date command is not correct in french (but ok in english). See this example :  \mainlanguage[fr]  \starttext     \date

Re: [NTG-context] \date bug with french

2011-07-04 Thread Wolfgang Schuster
Am 04.07.2011 um 15:29 schrieb luigi scarso: ok, but there is no the 44th day in July as 44 juillet 2011 said It’s not 44th, it’s 4 + 4th :) core-con.lua: function commands.currentdate(str,currentlanguage) -- j and jj obsolete ... if ordinal and whatordinal then --

Re: [NTG-context] \date bug with french

2011-07-04 Thread Romain Diss
think this problem appears recently because it was not the case with ConTeXt - 2011.05.18 22:26 LuaTeX-0.70.1. I still think it’s a bug because it’s not expected to have the day number typed twice when one call \date (in lang-def.mkiv, the date format is declared as \c!date={\v!day+,\v!space,\v

[NTG-context] How to typeset current year using \date command?

2011-06-13 Thread Verhaag, G.C.H.M.
Hi, I was wondering whether it is possible to automatically typeset ONLY the current year using the \date command? From the reference manual I don't think it is possible! Maybe another trick is available! Thanks! Regards, Gerard Verhaag

Re: [NTG-context] How to typeset current year using \date command?

2011-06-13 Thread Wolfgang Schuster
Am 13.06.2011 um 10:59 schrieb Verhaag, G.C.H.M.: Hi, I was wondering whether it is possible to automatically typeset ONLY the current year using the \date command? From the reference manual I don't think it is possible! Maybe another trick is available! \starttext \currentdate[year

Re: [NTG-context] How to typeset current year using \date command?

2011-06-13 Thread Verhaag, G.C.H.M.
On 06/13/2011 11:04 AM, Wolfgang Schuster wrote: Am 13.06.2011 um 10:59 schrieb Verhaag, G.C.H.M.: Hi, I was wondering whether it is possible to automatically typeset ONLY the current year using the \date command? From the reference manual I don't think it is possible! Maybe another

[NTG-context] 2 problems with \date[]

2011-05-18 Thread Peter Münster
Hello, The year is always 2011 and the French month août has wrong spelling: \mainlanguage[fr] \starttext \date[d=23, m=3, y=1985]: must be \quote{1985}\par \date[d=1, m=8, y=2011]: must be \quote{août} \stoptext Cheers, -- Peter

Re: [NTG-context] problems with \date[]

2011-05-18 Thread Reviczky, Adam
Hans, Don't we need rather this change too? line 487 in lang-txt.lua: -fr=aoât, +fr=août, Adam ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] 2 problems with \date[]

2011-05-18 Thread Hans Hagen
On 18-5-2011 1:29, Peter Münster wrote: Hello, The year is always 2011 and the French month août has wrong spelling: \mainlanguage[fr] \starttext \date[d=23, m=3, y=1985]: must be \quote{1985}\par \date[d=1, m=8, y=2011]: must be \quote{août} \stoptext solved in next beta

[NTG-context] \date problem with \mainlanguage[fr] in mkiv

2011-04-14 Thread Otared Kavian
Hi Hans, With the latest beta (ConTeXt version 2011.04.13 09:23) on the minimals I noticed a small bug with the command \date in mkiv: when the mainlanguage is st to [fr], the command \date gives: 14spaceavrilspace2011 that is the word « avril » is replaced with « spaceavrilspace

Re: [NTG-context] \date problem with \mainlanguage[fr] in mkiv

2011-04-14 Thread Wolfgang Schuster
Am 14.04.2011 um 13:33 schrieb Otared Kavian: Hi Hans, With the latest beta (ConTeXt version 2011.04.13 09:23) on the minimals I noticed a small bug with the command \date in mkiv: when the mainlanguage is st to [fr], the command \date gives: 14spaceavrilspace2011

Re: [NTG-context] \date problem with \mainlanguage[fr] in mkiv

2011-04-14 Thread Otared Kavian
2011.04.13 09:23) on the minimals I noticed a small bug with the command \date in mkiv: when the mainlanguage is st to [fr], the command \date gives: 14spaceavrilspace2011 that is the word « avril » is replaced with « spaceavrilspace ». With [it] or [es], there is no such problem. In mkii

Re: [NTG-context] \date problem in current beta

2011-04-13 Thread Florian Wobbe
core-con.mkiv \def\dodate[#1][#2]% {\begingroup \iffirstargument \getparameters[\??da][d=\normalday,m=\normalmonth,y=\normalyear,#1]% \normalday \@@dad\relax \normalmonth\@@dam\relax \normalyear \@@day\relax \fi - \docurrentdate{#2}% + \docurrentdate[#2]%

[NTG-context] \date problem in current beta

2011-04-12 Thread Florian Wobbe
Hi, this used to work in beta 2011.04.03 22:32 but now it doesn't anymore: \starttext \date\par \date[][year,--,mm,--,dd]\par \date[][year,{--},mm,--,dd] \stoptext Florian ___ If your question is of interest

Re: [NTG-context] \date problem in current beta

2011-04-12 Thread Wolfgang Schuster
Am 12.04.2011 um 08:54 schrieb Florian Wobbe: Hi, this used to work in beta 2011.04.03 22:32 but now it doesn't anymore: \starttext \date\par \date[][year,--,mm,--,dd]\par \date[][year,{--},mm,--,dd] \stoptext core-con.mkiv \def\dodate[#1][#2]% {\begingroup \iffirstargument

[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

[NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
I would like to use the date of the document in the generated PDF. (It is not interesting when the PDF is generated, but when the source was last changed.) How would I do this? -- Cecil Westerhof ___ If your question

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Philipp Gesang
On 2011-03-24 10:26:00, Cecil Westerhof wrote: I would like to use the date of the document in the generated PDF. (It is not interesting when the PDF is generated, but when the source was last changed.) How would I do this? Hi Cecil, this solution checks only the main file, you’d have

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de On 2011-03-24 10:26:00, Cecil Westerhof wrote: I would like to use the date of the document in the generated PDF. (It is not interesting when the PDF is generated, but when the source was last changed.) How would I do

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Marco
On 2011-03-24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de wrote: This should also work: \starttext \startluacode function modification_date (file) local f = file local attr = lfs.attributes (f) assert (type(attr) == table) if attr.mode ~= directory then return

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Marco net...@lavabit.com On 2011-03-24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de wrote: This should also work: \starttext \startluacode function modification_date (file) local f = file local attr = lfs.attributes (f) assert (type(attr) == table) if

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Aditya Mahajan
On Thu, 24 Mar 2011, Cecil Westerhof wrote: 2011/3/24 Marco net...@lavabit.com On 2011-03-24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de wrote: This should also work: \starttext \startluacode function modification_date (file) local f = file local attr = lfs.attributes (f)

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Aditya Mahajan adit...@umich.edu \getdate would return os.date(%Y-%m-%d,attr.modification) and \getdate{long} would return os.date(%Y-%m-%d %H:%M,attr.modification) I have looked at lua, but do not see how to do it. (Something else to learn.) I would like to do something

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Wolfgang Schuster
Am 24.03.2011 um 17:29 schrieb Cecil Westerhof: \def\getdate% {\dosinglegroupempty\dogetdate} \def\dogetdate#1% {context{modification_date(\jobname.tex, #1)}} \def\getdate {\dosingleempty\dogetdate} \def\dogetdate[#1]% {\ctalua{context(modification_date(\jobname.tex, #1))}}

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Wolfgang Schuster schuster.wolfg...@googlemail.com Am 24.03.2011 um 17:29 schrieb Cecil Westerhof: \def\getdate% {\dosinglegroupempty\dogetdate} \def\dogetdate#1% {context{modification_date(\jobname.tex, #1)}} \def\getdate {\dosingleempty\dogetdate}

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Philipp Gesang
On 2011-03-24 18:15:31, Cecil Westerhof wrote: 2011/3/24 Wolfgang Schuster schuster.wolfg...@googlemail.com Am 24.03.2011 um 17:29 schrieb Cecil Westerhof: \def\getdate% {\dosinglegroupempty\dogetdate} \def\dogetdate#1% {context{modification_date(\jobname.tex, #1)}}

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Marco
On 2011-03-24 Cecil Westerhof cldwester...@gmail.com wrote: \def\dogetdate[#1]% {\ctalua{context(modification_date(\jobname.tex, #1))}} ^^^ Try \ctxlua … Marco ___ If your question is of

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Florian Wobbe
\def\getdate {\dosingleempty\dogetdate} \def\dogetdate[#1]% {\ctalua{context(modification_date(\jobname.tex, #1))}} How would you automatically find out the filename which the macro is called from? For instance if the file with the macro is included in a master document. Florian

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de {\ctalua{context(modification_date(\jobname.tex, #1))}} ^ s/\\ctalua/\\ctxlua/ I have: \startluacode function modification_date(file, format) local f= file local attr = lfs.attributes(f) assert

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Aditya Mahajan
On Thu, 24 Mar 2011, Florian Wobbe wrote: \def\getdate {\dosingleempty\dogetdate} \def\dogetdate[#1]% {\ctalua{context(modification_date(\jobname.tex, #1))}} How would you automatically find out the filename which the macro is called from? For instance if the file with the macro is

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Philipp Gesang
On 2011-03-24 18:42:12, Cecil Westerhof wrote: 2011/3/24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de {\ctalua{context(modification_date(\jobname.tex, #1))}} ^ s/\\ctalua/\\ctxlua/ I have: \startluacode function modification_date(file, format) local f

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Florian Wobbe
How would you automatically find out the filename which the macro is called from? For instance if the file with the macro is included in a master document. \inputfilename So, if you want the name of the file in which this macro is defined in, then something like this should work:

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Hans Hagen
On 24-3-2011 6:30, Marco wrote: On 2011-03-24 Cecil Westerhofcldwester...@gmail.com wrote: \def\dogetdate[#1]% {\ctalua{context(modification_date(\jobname.tex, #1))}} ^^^ Try \ctxlua … or \cldcontext{modification_date(\jobname.tex, #1)} but ... is it clever to

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Philipp Gesang pges...@ix.urz.uni-heidelberg.de \getdate \getdate{short} \getdate[long] \getdate[nil] \getdate[false] In context optional args are specified in brackets. I had tried \getdate[long], but the quotes where wrong. It’s all documented on the wiki:

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Aditya Mahajan
On Thu, 24 Mar 2011, Florian Wobbe wrote: How would you automatically find out the filename which the macro is called from? For instance if the file with the macro is included in a master document. \inputfilename So, if you want the name of the file in which this macro is defined in, then

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Florian Wobbe
Thanks, nice! I suppose the filename is also directly reachable from inside \startluacode ... \stopluacode. How? \start-stop luacode expands its contents. So, the following should work (untested) \startluacode thisfilename = \thisfilename.tex \stopluacode No, that is not what I

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Cecil Westerhof
2011/3/24 Cecil Westerhof cldwester...@gmail.com \startluacode function modification_date(file, format) local f= file local attr = lfs.attributes(f) assert (type(attr) == table) if attr.mode ~= directory then if format == long then return

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Hans Hagen
On 25-3-2011 12:08, Cecil Westerhof wrote: I made the code a little better: \startluacode os.setlocale(nl_NL) blocked in mkiv to prevent unwanted side effects and that will stay function modification_date(file, format) local f= file local attr = lfs.attributes(f) why

Re: [NTG-context] Use date of the tex file in the document

2011-03-24 Thread Philipp Gesang
On 2011-03-25 00:30:40, Hans Hagen wrote: On 25-3-2011 12:08, Cecil Westerhof wrote: I made the code a little better: \startluacode os.setlocale(nl_NL) blocked in mkiv to prevent unwanted side effects and that will stay Still, one can access context’s language substitution tables to

Re: [NTG-context] problem with \date in beta 2011.01.31 16:59

2011-02-01 Thread Hans Hagen
On 31-1-2011 11:29, Florian Wobbe wrote: \date still used to work in beta 2011.01.26 11:02 now I get only v!. What is wrong? \starttext \date, \date[][year,--,mm,--,dd] \stoptext fixed .. side effect of cleaning up some code Thank you! I just noticed, that all numbers in front of the pdf

Re: [NTG-context] \date format according to ISO 8601

2011-02-01 Thread Stefan Müller
Hi, I wouldn't like the idea of displaying \date in ISO 8601 format. I'd rather prefer the human-readable version. The ISO 8601 is a standard for exchange of date and time-related data [1], not for text documents made for humans to read. How to get what you want is explained here [2], I

Re: [NTG-context] \date format according to ISO 8601

2011-02-01 Thread Marco
On 2011-02-01 Stefan Müller warrence@gmx.de wrote: Hi, I wouldn't like the idea of displaying \date in ISO 8601 format. I'd rather prefer the human-readable version. The ISO 8601 is a standard for exchange of date and time-related data [1], not for text documents made for humans

Re: [NTG-context] \date format according to ISO 8601

2011-02-01 Thread Mojca Miklavec
On Tue, Feb 1, 2011 at 00:03, Marco wrote: In case Hans does not like this idea, is it possible to change it to make ISO 8601 the default. Something like \setupdate [format={year, –, mm, –, day}] Your question wasn't clear at first. Is this what you want? \setuplanguage[en][date={year,–,mm

Re: [NTG-context] \date format according to ISO 8601

2011-02-01 Thread Marco
clear at first. Is this what you want? \setuplanguage[en][date={year,–,mm,–,dd}] Brilliant, that's exactly what I want. I didn't expect the date »hidden« in the language settings, I looked for \setupdate. Thanks Mojca Marco

Re: [NTG-context] \date format according to ISO 8601

2011-02-01 Thread Mojca Miklavec
question wasn't clear at first. Is this what you want? \setuplanguage[en][date={year,–,mm,–,dd}] Brilliant, that's exactly what I want. I didn't expect the date »hidden« in the language settings, I looked for \setupdate. It's because each language requires a different output, but I share your

Re: [NTG-context] \date format according to ISO 8601

2011-02-01 Thread Marco
On 2011-02-01 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: Your question wasn't clear at first. Is this what you want? \setuplanguage[en][date={year,–,mm,–,dd}] Brilliant, that's exactly what I want. I didn't expect the date »hidden« in the language settings, I looked

[NTG-context] problem with \date in beta 2011.01.31 16:59

2011-01-31 Thread Florian Wobbe
Hi, \date still used to work in beta 2011.01.26 11:02 now I get only v!. What is wrong? \starttext \date, \date[][year,--,mm,--,dd] \stoptext Thanks, Florian ___ If your question is of interest to others as well

Re: [NTG-context] problem with \date in beta 2011.01.31 16:59

2011-01-31 Thread Hans Hagen
On 31-1-2011 9:11, Florian Wobbe wrote: Hi, \date still used to work in beta 2011.01.26 11:02 now I get only v!. What is wrong? \starttext \date, \date[][year,--,mm,--,dd] \stoptext fixed .. side effect of cleaning up some code Hans

Re: [NTG-context] problem with \date in beta 2011.01.31 16:59

2011-01-31 Thread Florian Wobbe
\date still used to work in beta 2011.01.26 11:02 now I get only v!. What is wrong? \starttext \date, \date[][year,--,mm,--,dd] \stoptext fixed .. side effect of cleaning up some code Thank you! I just noticed, that all numbers in front of the pdf bookmark entries have gone as well

[NTG-context] \date format according to ISO 8601

2011-01-31 Thread Marco
Hi, in my opinion it makes sense to display the date in ISO 8601 format. now: \date results in: January 31, 2011 ISO 8601: \date would result in: 2011–01–31 In case Hans does not like this idea, is it possible to change it to make ISO 8601 the default. Something like \setupdate [format

[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

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

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

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

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

[NTG-context] Superscript in \date

2010-09-24 Thread Florian Wobbe
Dear all, I tried to change the output format of \date so that the day includes the letter suffixes as superscript. \definefontfeature[sups][sups=yes,script=latn] \usetypescript[antykwa-torunska] \setupbodyfont[antykwa,12pt] \starttext \date[][day,{\setff{sups}th},~,month,year

Re: [NTG-context] Superscript in \date

2010-09-24 Thread Aditya Mahajan
On Fri, 24 Sep 2010, Florian Wobbe wrote: 57{\setff{sups}th} or \date[][day,$^{\mr th}$,~,month,year] Don't know about \setff, but using \high{th} is better than going to math mode. Aditya ___ If your question

Re: [NTG-context] Superscript in \date

2010-09-24 Thread Florian Wobbe
Well, and I didn't know about \high - thanks for pointing out. My aim was actually to make use of the superscript font feature of Antykwa. Florian On Sep 24, 2010, at 17:18 , Aditya Mahajan wrote: On Fri, 24 Sep 2010, Florian Wobbe wrote: 57{\setff{sups}th} or \date[][day,$^{\mr th

Re: [NTG-context] questions regarding `\date`

2010-08-31 Thread Paul Menzel
Dear ConTeXt folks, Am Samstag, den 28.08.2010, 16:02 +0200 schrieb Paul Menzel: I have four questions regarding `\date`. I looked at the page in the Wiki [1], in the ConTeXt user manual on page 159 [2][3] and tried some things, but could not figure it out. I am using Debian Sid/unstable

Re: [NTG-context] questions regarding `\date`

2010-08-31 Thread Philipp Gesang
Hi Paul, On 2010-08-31 10:29:39, Paul Menzel wrote: 3. Spacing between numbers. Using LaTeX there were some suggestions to typeset a date using small spaces like `29.\,8.\,2010`. I guess this depends on the fonts used and personal taste? If there is a rule, maybe that could be added

Re: [NTG-context] questions regarding `\date`

2010-08-31 Thread Taco Hoekwater
On 08/31/2010 11:48 AM, Philipp Gesang wrote: Hi Paul, On 2010-08-3110:29:39, Paul Menzel wrote: 3. Spacing between numbers. Using LaTeX there were some suggestions to typeset a date using small spaces like `29.\,8.\,2010`. I guess this depends on the fonts used and personal taste

<    1   2   3   >