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
___


[NTG-context] setupinteraction and macroexpansion

2012-06-19 Thread Andreas Schneider
Hello,

I'm  a bit lost with macro expansion here. I try to use some macros to
set  the title (and subject) of the PDF document. The attached minimal
example shows what I want to achieve.

I tried def, edef, gdef, define, explicit expand, expandoneafter, etc.
etc.  without  any  success. Whatever I do, the title field in the PDF
metadata  always  contains  the  raw "\date..." command instead of the
formatted date.

Any suggestions?

-- 
Best Regards,
Andreas\edef\mytitle{Some date: \date[y=2012,m=6,d=19]}

\setupinteraction[title=\mytitle]

\starttext

\subject\mytitle

Hello World

\stoptext

pgpT4e9YDWt2T.pgp
Description: PGP signature
___
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] \date problem with \mainlanguage[fr] in mkiv

2011-04-14 Thread Otared Kavian
Thanks Wolfgang!
After adding the line you pointed out and remaking the formats the problem is 
solved.

Have a nice day, best regards: OK

On 14 avr. 2011, at 16:50, Wolfgang Schuster wrote:

> 
> 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
>> that is the word « avril » is replaced with « spaceavrilspace ». With [it] 
>> or [es], there is no such problem. In mkii everything is fine.
>> Minimal example:
>> 
>> \starttext
>> Here there is no problem: today's date: \date
>> \mainlanguage[fr]
>> Here there is a problem: aujourd'hui: \date
>> \stoptext
> 
> core-con.lua (missing “local v_space = variables.space“ at line 757):
> 
> local v_day  = variables.day
> local v_year = variables.year
> local v_month= variables.month
> local v_weekday  = variables.weekday
> local v_referral = variables.referral
> +local v_space= variables.space
> 
> 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
> ___

%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 avenue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: otared.kav...@math.uvsq.fr




___
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] Chapter-author in TOC

2010-09-19 Thread Andreas Harder

Am 19.09.2010 um 18:36 schrieb Wolfgang Schuster:

> 
> Am 19.09.2010 um 17:44 schrieb Andreas Harder:
> 
>> Hi all!
>> 
>> I’m using the structureuservariable to set an author on a per chapter basis. 
>> But I would also like to have them in the table of contents, so I tried the 
>> following:
>> 
>> [...]
>> 
>> … without success. I appreciate any help.
> 
> Hi Andreas,
> 
> your question comes just in time, here is a example i planned to send to 
> Harald only.
> 
> \define[3]\ChapterList
>  {\bTABLE[offset=0pt,strut=yes,frame=off,width=.5\textwidth]
> \bTR
>   \bTD \structurelistuservariable{date} \eTD
>   \bTD #2 \eTD
> \eTR
>   \eTABLE}
> 
> \setuplist
>  [chapter]
>  [alternative=command,
>   command=\ChapterList]
> 
> \define[2]\ChapterHead
>  {\startframedtext[frame=off,width=\textwidth,offset=0pt,align=middle]
>   
> \doifsomething{\structureuservariable{date}}{\structureuservariable{date}\blank}
>   #2
>   
> \doifsomething{\structureuservariable{author}}{\blank\structureuservariable{author}}
>   \stopframedtext}
> 
> \setuphead
>  [chapter]
>  [command=\ChapterHead]
> 
> \starttext
> \completecontent
> \startchapter[title=Rom][date=12.06.2010,author=Knuth]
> \input knuth
> \stopchapter
> \startchapter[title=Pisa][date=14.06.2010,author=Tufte]
> \input tufte
> \stopchapter
> \stoptext

Thank you very much Wolfgang, as always perfect!

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] groupedcommand with color

2012-02-14 Thread Wolfgang Schuster

Am 14.02.2012 um 14:26 schrieb Steffen Wolfrum:

> 
> Am 14.02.2012 um 13:44 schrieb Hans Hagen:
> 
>> On 14-2-2012 13:37, Steffen Wolfrum wrote:
>>> 
>>> Am 14.02.2012 um 13:21 schrieb Hans Hagen:
>>> 
>>>> On 14-2-2012 12:55, Steffen Wolfrum wrote:
>>>>> Hi,
>>>>> 
>>>>> due to \color[]{} now needs an argument, groupedcommand doesn't work as 
>>>>> before:
>>>>> 
>>>>> 
>>>>> \define\PlainSwitch%
>>>>> {\groupedcommand{\language[de]\ss}{}}
>>>>> 
>>>>> \define\ColorSwitch%
>>>>> {\groupedcommand{\language[de]\ss\color[darkred]}{}}
>>>>> 
>>>>> \starttext
>>>>> 
>>>>> English: \date
>>>>> 
>>>>> {\PlainSwitch German \date}
>>>>> 
>>>>> English: \date
>>>>> 
>>>>> {\ColorSwitch German \date}
>>>>> 
>>>>> Test \date
>>>>> 
>>>>> \stoptext
>>>>> 
>>>>> Someone knows what to change here (in order to get the red "G" back)?
>>>> 
>>>> something
>>>> 
>>>> {\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}
>>> 
>>> 
>>> In version 2012.01.16  this gives an error:
>>> 
>>> ! Extra }, or forgotten \endgroup.
>> 
>> and how about
>> 
>> {\groupedcommand{\language[de]\ss\directcolored[darkred]}{}}
> 
> now it works: directedcolor, as well as switchtolcolor


You can also use \definestartstop to create your command which can then be used 
with \ColorSwitch{…} and {\ColorSwitch …}.

\definestartstop
  [ColorSwitch]
  [commands={\language[de]},
   style=sans,
   color=darkred]

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] deferred variable lookup in environment?

2013-02-01 Thread Ingo Hohmann

Hi,

sorry if the subject is misleading, I'm not sure how to say it in few words.

I'm trying to have the date in a layer in an environment. In the text 
using the environment, I want to be able to set the date.
If the date is not set, the current date should be used, otherwise the 
set date.
This is what I've tried, but it is always the currentdate, that is 
displayes.


Environment file:

\def\mydate{}

\definelayer[firstpage]  % name of the layer
[x=0mm, y=0mm,  % from upper left corner of paper
 width=\paperwidth, height=\paperheight] % let the layer cover the 
full paper


\setlayer[firstpage]% name of the layer
[hoffset=14cm, voffset=3.5cm]  % placement (from upper left corner 
of the layer)

{\framed[frame=on, width=4cm, height=2cm]{

% always shows \currentdate
\doiftextelse{\mydate}{\mydate}{\currentdate}
}}

\setupbackgrounds[page][background={firstpage}]


File using this environment:

\environment[testenv]

\def\mydate{2011-11-11}

\starttext

% this shows the value from mydate
\doiftextelse{\mydate}{\mydate}{\currentdate}

\stoptext


Is it possible to get \mydate in the layer?


Kind regards,

Ingo


___
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] xml and buffers

2006-01-19 Thread Hans Hagen

Junod Antoine wrote:

Hello gurus, 


I'm a bit into trouble wih buffers and xml parsing. Here is my problem:

I've got a .xhtml with the following lines:

[...]


[...]
Auction: document d'analyse
[...]

I'm trying to store the content of the meta tag in a buffer, one per
meta tag, (ie "G�nie Logiciel" in buffer course_name, "23 d�cembre
2005" in buffer date) to use these buffers when I meet the title tag:

\XMLifequalelse{meta}{name}{course_name}
 {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer}{}
\XMLifequalelse{meta}{name}{date}
 {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{}
\defineXMLenvironment [title] {\startstandardmakeup
   \getbuffer[course_name]
   \getbuffer[date]}{\stopstandardmakeup}

But it does not print anything else than the title.
 

buffers serve a different purpose and are part if a text flow 


\starttext

\defineXMLsingular
 [meta]
 [name=,content=]
 {\setevariables[document:meta][\XMLop{name}=\XMLop{content}]}

\defineXMLenvironment
 [title]
 {}
 {\startstandardmakeup
  \getvariable{document:meta}{course_name} \endgraf
  \getvariable{document:meta}{date} \endgraf
  \stopstandardmakeup}

\startXMLdata




\stopXMLdata

With a little extension (i'll add it) we can prevent unwanted expansion: 


\unprotected \def\setvalueXMLpar#1#2#3%
[EMAIL PROTECTED]@EA\endcsname
   \csname\ifcsname\@@XMLvariable:#2:#3\endcsname
 \@@XMLvariable:#2:#3\else\s!empty\fi\endcsname}

\defineXMLsingular
 [meta]
 [name=,content=]
 {\setvalueXMLpar{document:meta:\XMLop{name}}{meta}{content}}

\defineXMLenvironment
 [title]
 {}
 {\startstandardmakeup
  \getvalue{document:meta:course_name} \endgraf
  \getvalue{document:meta:date} \endgraf
  \stopstandardmakeup}

\startXMLdata




\stopXMLdata


\stoptext



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


[NTG-context] Non-shortened month name in \date

2015-04-03 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,


\mainlanguage[cz]

\starttext
  \date[d=1,m=3,y=2000][d,~,m,~,y]\par
  \date[d=1,m=3,y=2000][d,~,mm,~,y]\par
  \date[d=1,m=3,y=2000][d,~,month,~,y]\par
\stoptext


gives:

"
1 břez. 2000
1 03 2000
1 břez. 2000
"

Is there a way to get non-shortened month name, i.e. "března" instead "břez."?

Kind regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] xml expression error

2016-04-28 Thread dr. Hans van der Meer
Why is there anexpression error here? I would expect that the expression 
number(-1101) evaluates to a negative number taking part in the comparsion. 
It looks as if the minus sign is not seen as an unary minus, while -1101 
should have be evaluated by Lua's tonumber(-1101).

relevant code snippet is:
\xmlfilter{#1}{lpath[number(@date) <= number(-1101)]/command(...)

xml > lpath > error in expression: number(@date) <= number(-1101) => 
expr.number((ll.at and ll.at['date'])) <= 
expr.number(expr.child(ll,'-')1101)

Changing number(-1101) to -10000101 does not make a difference. 
The @date attribute has no problem with a negative value.

Hans van der Meer

___
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] \setvariables and database module

2018-01-31 Thread Wolfgang Schuster



Otared Kavian <mailto:ota...@gmail.com>
30. Januar 2018 um 16:53
Hi again Wolfgang,

I think I understood what is going wrong with my example after your 
hint: I have to remove all spaces around the separator and remove also 
the braces around each entry.

That is the following works fine:

\startseplisttalk
Hacker;Up to date hacking;hacker.jpg
Hacker;Up to date hacking;hacker.jpg
\stopseplisttalk

while the following does not (as far as the filename is concerned):

\startseplisttalk
{Hacker};{Up to date hacking};{hacker.jpg}
Hacker ; Up to date hacking ; hacker.jpg
\stopseplisttalk


Add “strip=yes” to remove spaces around the cells.

\defineseparatedlist
  [seplisttalk]
  [separator={;},
   command=\maketalk,
   strip=yes]

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] 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 direction. I
copy the start of the document from vi (line 4 is the relevant line):

  \setuppapersize[A4]
   2 \setuplayout[style=\ss]
   3 %\setupfooter[style=]
   4 \setuplanguage[nl][date={dd, -, mm, -, year}]

\mainlanguage[nl]

Herbert


Thanks Herbert. I editted the wiki page of Command/date to add a remark 
on this  connection. Please check for accuracy.


Guus.
___
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] \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 "July 4, 2011" (as expected).
> 
> I have "ConTeXt - 2011.06.29 09:57" and "LuaTeX-0.70.1".
> I've never seen this bug before but I don't know if the problem is recent
> or not.

Corrected in the last beta (2011.07.13 20:14). It now works like expected.

Thank you.

-- 
Romain Diss



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

Re: [NTG-context] \date in LMTX

2019-08-18 Thread Hans Hagen

On 8/18/2019 9:59 AM, Otared Kavian wrote:

On 18 Aug 2019, at 05:25, Aditya Mahajan  wrote:

Hi,

There is a bug with \date in LMTX.

\starttext
\date[d=10]
\stoptext

does not change the date. Works okay in MKIV.


Hi,

Actually it does not work in mkiv version 2019.08.14 11:26, nor in lmtx version 
2019.08.14 11:44.
But it works in mkiv version 2019.03.21 21:39 from TeXLive 2019.

fixed in next beta

-
  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] space after \date[]

2021-01-08 Thread Peter Münster
Hi,

There is no more space after \date[] with the latest version.
Is this wanted, or a bug?

Example:

\starttext
\date[d=1] X % no space before "X"
\stoptext

Kind regards,
-- 
   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] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Axel Kielhorn


> Am 15.08.2018 um 14:04 schrieb Hans Hagen :
> 
> On 8/15/2018 12:27 PM, Mike O'Connor wrote:
>> G’Day,
>> Having a first go at converting TEI XML to ConTeXt.
>> Steep learning curve, but easier (for me) than XSLT, and first results were 
>> amazing.  Using http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf as a 
>> guide.
>> Currently stuck on converting an ISO format date (eg. 1908-01-10) into 
>> something more readable (eg. 10 January 1908) in the output.  I presume I 
>> should create a function (?luacode) that can take any ISO value and output 
>> the readable form.  The following works but seems to me inefficient.
>> Grateful for any pointers.
>> Mike
>> Here is my MWE:
>> \startbuffer[demo]
>> 
>> 
>> 
>> 
>> 
>> 10.I.08
>> 
>> 
>> 19 Mar '08
>> 
>> 
>> 
>> 
>> 
>> \stopbuffer
>> \startxmlsetups xml:initialize
>> \xmlsetsetup{#1}{date}{xml:date}
>> \stopxmlsetups
>> \xmlregistersetup{xml:initialize}
>> \startxmlsetups xml:date
>> \xmldoifelse {#1}{.[@type='divDate']} {
>> \def\docdate{\ctxlua{
>> local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
>> local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
>> local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
>> context.date{d = tday, m = tmonth, y = tyear}
>> }}
>> \docdate[day,month,year] = Document Date \par
>> } {
>> \def\docdate{\ctxlua{
>> local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
>> local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
>> local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
>> context.date{d = tday, m = tmonth, y = tyear}
>> }}
>> \docdate[day,month,year] = Event Date\par
>> }
>> \stopxmlsetups
>> \starttext
>> \xmlprocessbuffer{main}{demo}{}
>> \stoptext
> Can be wikified ...
> 
> \startluacode
>function xml.finalizers.tex.MyDate(e,what,how)
>local t = string.split(e[1].at[what],"-")
>context.date(
>{ y = t[1], m = t[2], d = t[3] },
>{ how }
>)
>end
> \stopluacode
> 
> \startxmlsetups xml:date
> 
>   \xmldoifelse {#1}{.[@type='divDate']} {
>\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
>   Document Date \par
>} {
>\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
>Event Date\par
> 
>   }
> \stopxmlsetups

I couldn’t get this to work.
Had to change it to:

\startluacode
   function xml.finalizers.tex.MyDate(e,what,how)
   local ee = e[1].at[what]
   local t = (string.split(ee,"-"))
   context.date(
   { y = t[1], m = t[2], d = t[3] },
   { how }
   ) 
   end
\stopluacode

mtx-context | ConTeXt Process Management 1.03
mtx-context |
mtx-context | main context file: /Volumes/Macintosh 
HD/usr/local/texlive/context-109/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2020.01.30 14:13
mtx-context | main context file: /Volumes/Macintosh 
HD/usr/local/texlive/context-109/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2020.01.30 14:13

Greetings Axel

___
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] 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
___
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] printing the current date

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

> \currentdate% same as \date, but I would expect the day of today...

Should I fill a bug-report on the tracker?
Perhaps also for the missing space after \date[]?

TIA,
-- 
   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] Failure to compile with new date code

2021-10-25 Thread Hans Hagen via ntg-context

On 10/25/2021 10:31 PM, Rik Kabel wrote:
This has been part of my setup interaction for a couple of years. 
Documents all pass verapdf pdf3a testing.


On Oct 25, 2021 15:54, Hans Hagen via ntg-context  
wrote:


On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:
 > On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
 >> Hello all,
 >>
 >> The example below continues to work with MkIV, but now fails
with the
 >> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
 >>
 >>  \define\DraftOf   {Draft of \date}
 >>  \setupinteraction [date={\DraftOf}]
 >
     > Hi Rik,
 >
 > \setupinteraction[date=***] only accepts a date as input.
 >
 > Would it be possible that it was subtitle or title any of the options
 > you used?

we can of course accept anything but because these dates end up in
different spots it gets hairy ... also it can invalidate a pdf


next upload:

system  > invalid time specification 'Draft of October 25, 2021'
 -
  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] groupedcommand with color

2012-02-14 Thread Philipp Gesang
On 2012-02-14 13:37, Steffen Wolfrum wrote:
> 
> Am 14.02.2012 um 13:21 schrieb Hans Hagen:
> 
> > On 14-2-2012 12:55, Steffen Wolfrum wrote:
> >> Hi,
> >> 
> >> due to \color[]{} now needs an argument, groupedcommand doesn't work as 
> >> before:
> >> 
> >> 
> >> \define\PlainSwitch%
> >> {\groupedcommand{\language[de]\ss}{}}
> >> 
> >> \define\ColorSwitch%
> >> {\groupedcommand{\language[de]\ss\color[darkred]}{}}
> >> 
> >> \starttext
> >> 
> >> English: \date
> >> 
> >> {\PlainSwitch German \date}
> >> 
> >> English: \date
> >> 
> >> {\ColorSwitch German \date}
> >> 
> >> Test \date
> >> 
> >> \stoptext
> >> 
> >> Someone knows what to change here (in order to get the red "G" back)?
> > 
> > something
> > 
> > {\groupedcommand{\language[de]\ss\startcolor[darkred]}{\stopcolor}}
> 
> 
> In version 2012.01.16  this gives an error:
> 
> ! Extra }, or forgotten \endgroup.

Works when using “\switchtocolor”:


\define\ColorSwitch
  {\groupedcommand{\language[de]\ss\switchtocolor[darkred]}{}}
\starttext

foo \bgroup\ColorSwitch bar\egroup baz\par

\stoptext


Regards
Philipp



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

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpqh5EvCIQTj.pgp
Description: PGP signature
___
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] 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

(Some parameters are set by TeX itself as it runs, so it is inappropriate to 
initialize them: \time, \day, \month, and year are established at the beginning 
of a job; ..


Now the results in ConTeXT with a minimal example, put into the log for easier 
copying into the mail:
\starttext
\writestatus{}{\meaning\date -> \date}
\writestatus{}{\meaning\day -> \the\day}
\writestatus{}{\meaning\month -> \month WHY NOT monthname?}
\writestatus{}{\meaning\year -> \the\year}
\writestatus{}{\meaning\time -> \the\time}
\stoptext

Result:
> \time-> \time 
> \protected macro:->\dodoubleempty \syst_converters_date -> 
\date 
> \day-> 20
> macro:#1->\ctxcommand {monthname(#1)}-> \labeltext 
{unknown}RROR
> \year-> 2013
> \time-> 982

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.

Hans van der Meer



___
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] Failure to compile with new date code

2021-10-25 Thread Hans Hagen via ntg-context

On 10/25/2021 10:31 PM, Rik Kabel wrote:
This has been part of my setup interaction for a couple of years. 
Documents all pass verapdf pdf3a testing.


the date only ended up in some places but now we try to be consistent on 
all places


On Oct 25, 2021 15:54, Hans Hagen via ntg-context  
wrote:


On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:
 > On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
 >> Hello all,
 >>
 >> The example below continues to work with MkIV, but now fails
with the
 >> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
 >>
 >>  \define\DraftOf   {Draft of \date}
 >>  \setupinteraction [date={\DraftOf}]
 >
     > Hi Rik,
 >
 > \setupinteraction[date=***] only accepts a date as input.
 >
 > Would it be possible that it was subtitle or title any of the options
 > you used?

we can of course accept anything but because these dates end up in
different spots it gets hairy ... also it can invalidate a pdf

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

___





--

-
  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] \setvariables and database module

2018-01-30 Thread Otared Kavian
Hi again Wolfgang,

I think I understood what is going wrong with my example after your hint: I 
have to remove all spaces around the separator and remove also the braces 
around each entry.
That is the following works fine:

\startseplisttalk
Hacker;Up to date hacking;hacker.jpg
Hacker;Up to date hacking;hacker.jpg
\stopseplisttalk

while the following does not (as far as the filename is concerned):

\startseplisttalk
{Hacker};{Up to date hacking};{hacker.jpg}
Hacker ; Up to date hacking ; hacker.jpg
\stopseplisttalk

Is there a way to make the \defineseparatedlist command to be more tolerant for 
the filename? 
Best regards: OK

> On 30 Jan 2018, at 16:28, Otared Kavian  wrote:
> 
> 
>> On 30 Jan 2018, at 15:54, Wolfgang Schuster > <mailto:schuster.wolfg...@gmail.com>> wrote:
>>> […]
>> 
>> Use the command key which grabs the content of each column as argument (i.e. 
>> your commands needs as many arguments as your table has columns):
>> 
>> \defineseparatedlist
>>   [seplisttalk]
>>   [separator={;},
>>command=\maketalk]
> 
> 
> Thanks Wolfgang! That fixes the issues concerning the entries which are text, 
> but now the filename is not understood by the command \maketalk: here is the 
> modified code:
> 
> %% begin database-command.tex
> \usemodule[database]
> 
> \starttext
> \startbuffer[pagetalk]
>   \starttabulate[|f{\bi}l|p|][before=]%
>   \NC Speaker \EQ 
>   \goto{{\sc 
> \getvariable{talk}{speakername}}}[fig:\getvariable{talk}{speakername}]
>\NC\NR
>   \NC Title   \EQ \getvariable{talk}{title}\NC\NR
>   \stoptabulate
>   \startplacefigure[number=no]
>   \externalfigure[\getvariable{talk}{picture}]
>   \stopplacefigure
>   \page
> \stopbuffer
> 
> \setvariable{talk}{set}{\getbuffer[pagetalk]}
> 
> \define[3]\maketalk{%
>   \setvariables[talk]%
>   [speakername={#1},
>   title={#2},
>   picture={#3},
>   ]}
> 
> \defineseparatedlist[seplisttalk]
>   [separator={;},
>   command=\maketalk]
> 
> \startseplisttalk
> {Hacker} ; {Up to date hacking} ; {hacker.jpg}
> Hacker ; Up to date hacking ; hacker.jpg
> \stopseplisttalk
> 
> \stoptext
> %% end database-command.tex

___
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] Tables in headers

2008-04-28 Thread Wolfgang Schuster
Hi Stefan,

> I'll try to illustrate using a monospaced font:
>
> +--+ Company Name
> |  |
> | Logo |
> |  |
> +--+
>
> +
> Type of document| Page
> Report of something | 2 (10)
> ---++
> Name of document   | Issue  | Date
> My document name   | 1  | 2008-04-22
> ---++
> Issuer (dept, name, email)  | Appendix
> dept, name, email   | Appendix
> +
>
> This is the full header. A reduced header is used on the rest of the pages
> where the last row is excluded.
>
> (I am trying to convert a MS-Word template...)

\setvariables
  [document]
  [type={Report of something},
   name={My document name},
   issue={1},
   date=\currentdate,
   issue={dept, name, email},
   appendices={Appendix}]

\definelayer
  [head:table]
  [width=\paperwidth,
   height=\paperheight,
   state=start]

\definelayer
  [head:picture]
  [width=\paperwidth,
   height=\paperheight,
   state=repeat]

\startsetups head:table

\setlayer
  [head:table]
  [hoffset=\backspace,
   voffset=5cm]
  {\ifnum\pagenumber=\plusone
 \setups{head:table:first}%
   \else
 \setups{head:table:next}%
   \fi}

\stopsetups

\startsetups head:table:first

\bTABLE[textwidth=\textwidth,option=stretch,align=right]
  \bTR
\bTD[nx=2] Type of document\\\getvariable{document}{type} \eTD
\bTD Page\\\pagenumber\space(\lastpagenumber) \eTD
  \eTR
  \bTR
\bTD Name of document\\\getvariable{document}{name} \eTD
\bTD Issue\\\getvariable{document}{issue} \eTD
\bTD Date\\\getvariable{document}{date} \eTD
  \eTR
  \bTR
\bTD[nx=2] Issuer (dept, name, email)\\\getvariable{document}{issue} \eTD
\bTD Appendix\\\getvariable{document}{appendices} \eTD
  \eTR
\eTABLE

\stopsetups

\startsetups head:table:next

\bTABLE[textwidth=\textwidth,option=stretch,align=right]
  \bTR
\bTD[nx=2] Type of document\\\getvariable{document}{type} \eTD
\bTD Page\\\pagenumber\space(\lastpagenumber) \eTD
  \eTR
  \bTR
\bTD Name of document\\\getvariable{document}{name} \eTD
\bTD Issue\\\getvariable{document}{issue} \eTD
\bTD Date\\\getvariable{document}{date} \eTD
  \eTR
\eTABLE

\stopsetups

\setlayer
  [head:picture]
  [hoffset=\backspace,
   voffset=\topspace]
  {\externalfigure[Logo][width=3cm]}

\setlayer
  [head:picture]
  [preset=righttop,
   hoffset=\cutspace,
   voffset=\topspace]
  {Company Name}

\setupbackgrounds[page][setups={head:table},background={head:table,head:picture}]

\starttext
\dorecurse{3}{\page[empty]}
\stoptext

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


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\high{rd}
>>> Sep, 2011"?
>> 
>> \starttext
>> 
>> \currentdate[day+,space,month,space,year]
> 
> Interesting, thank you. I was looking at exactly the right page, but
> overlooked the +. And how do you print "Sep", "sep" and "SEP"? Wiki
> reference for \date lists
>\date[d=25,m=4,y=2008][day,~,{\monthshort\normalmonth},~,year] \par
>\date[d=25,m=4,y=2008][day,~,{\MONTHSHORT\normalmonth},~,year]
> but that doesn't work for me.


You can use “month:mnem” and “m:mnem” for the abbreviations of the months but 
there is a bug in core-con.lua

function commands.currentdate(str,currentlanguage) -- j and jj obsolete
local list = utilities.parsers.settings_to_array(str)
local year, month, day = tex.year, tex.month, tex.day
local auto = true
for i=1,#list do
local entry = list[i]
local tag, plus = match(entry,"^([^%+:]+)(.*)$")
local ordinal, mnemonic, whatordinal = false, false, nil
if not tag then
tag = entry
-   elseif plus == "+" or plus == "ord" then
-   ordinal = true
-   elseif plus == "mnem" then
+   elseif plus == "+" or plus == ":ord" then
+   ordinal = true
+   elseif plus == ":mnem" then
mnemonic = true
end
...
end

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

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] Internet archive integration into bibliography

2010-04-12 Thread Matija Šuklje
Hullo,

lately I got an great idea(TM) concerning citing internet sources.

\\ Initial problem:
the internet is ever changing, what says on a page today, might not be 
there tomorrow and in ten years' time the page might not exist at all.

\\ Solution so far:
just smack the date (and time) next to the link. I've seen that often and 
my faculty expects this from me as well.

\\ Problem with the solution so far:
it doesn't solve anything really.

\\ Solution(TM):
along with the URL and date, add the Internet Archive's link from that time 
next to it as well.

The ‘Solution(TM)’ is a bit tedious though, so it'd be great if ConTeXt 
could automate this process a bit. What I'm thinking is, if ConTeXt could 
take the URL and date stored in the bibliography (.bbl) and combine it 
together to form a URL of the Internet Archive's Wayback Machine to point 
to that particular page at that particular time.

In the document's bibliography then it could be rendered something like 
this:

Wikipedia: ConTeXt; http://en.wikipedia.org/wiki/ConTeXt; as seen on the 
day: 12th of April 2010 at 13:45

With "http://en.wikipedia.org/wiki/ConTeXt"; being a hyperlink to just that 
and "12th of April 2010" being a hyperlink to 
http://web.archive.org/web/20100412134500/en.wikipedia.org/wiki/ConTeXt

Note: using any date and time works OK with the archive.org, since if the 
date doesn't exist in its database, it falls back to the last archived site 
before the date requested.


What do you think? Would this make sense? If so, should we enable it by 
default?



Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suk...@gabbler.org
___
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] High level user macro (howto?)

2004-08-10 Thread Peter Münster
Pardon, I forgot the whole tex-file:

\useregime[il1]
\enableregime[il1]
\useencoding[ffr]
\definehspace[fr][:][.16667em]
\definehspace[fr][;][.16667em]
\definehspace[fr][!][.16667em]
\definehspace[fr][?][.16667em]
\mainlanguage[fr]
\newdimen\BigWidth \BigWidth=18cm
\setupscreens[screen=0.85]
\setupcolors[state=start]
\setupheadertexts[Rév.: \the\RevC]
\def\Vfil{\vskip0pt plus3fil\relax}
\def\In[#1,#2]{\ifx#1\empty\else\in[#1]\fi\if\relax#2\else, \In[#2]\fi}
\def\BigTitle{\centerline{\framed[width=\BigWidth,offset=2mm,
  background=screen]{\bfb\setupinterlinespace\cbox{Title

\def\startChanges{\hbox to \hsize\bgroup\hss\SetTableToWidth{\BigWidth}%
  \starttable[s1 | c | c | p(95mm) | p(17mm) | p(37mm) |]
  \HL\BL[5]\AR\VL Rév.\VL Date\VL Origine de la mise à jour\VL§ modifié\VL
  Auteur\VL\AR\HL}
\def\stopChanges{\stoptable\hss\egroup}\newcount\RevC
\def\Changes#1[#2]{%
  \getparameters[CH][#2]% Auteur, Modif, Labels, Date
  \ifnum\RevC=0 \BigTitle \vskip0.5ex \Vfil \startChanges \fi
  \global\advance\RevC by 1 \VL \the\RevC \VL \CHDate \VL \CHModif \VL
  XXX%\In[\CHLabels,\relax] % does not work, but not so important for now
  \VL \CHAuteur \VL\AR\HL}
\def\Destinataires#1{\stopChanges\Vfil
  \def\temp{#1}\ifx\temp\empty\else\noindenting Destinataires:\crlf#1\blank\fi
\centerline{\SetTableToWidth{\BigWidth}%
\bf\starttable[| c | c | c |]
\HL\BL[3]\AR\VL Approbateur\VL Date\VL Visa\VL\AR\HL
\VL\vbox to 2cm{}\VL\VL\VL\AR\HL
\stoptable}\par\page\completecontent}

\starttext
\Changes[Date=1/2/2004,Modif=First version,Auteur=Peter]
\Changes[Date=3/4/2004,Modif=Some modifications,Lables={sec:S1,sec:S2},
  Auteur=Peter Münster]
\Changes[Date=5/6/2004,Modif=Some other modifications,Lables={sec:S2},
  Auteur=Peter]
%
\Destinataires{Peter, Olivier}

\section[sec:S1]{A section}
some text
\subsection{Bla}
\subsection{Bla}

\section[sec:S2]{Another section}
some text
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Failure to compile with new date code

2021-10-25 Thread Wolfgang Schuster via ntg-context

Rik Kabel via ntg-context schrieb am 25.10.2021 um 16:45:


Hello all,

The example below continues to work with MkIV, but now fails with the 
most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:


\define\DraftOf   {Draft of \date}
\setupinteraction [date={\DraftOf}]
\starttext
Fail with LMTX, works with MkIV.
\stoptext

If the answer is "don't do that" I can find another way to accomplish 
what this does -- not a big problem. But I do want to point out the 
difference in behavior.




The date-key expects its argument in a certain format but you pass 
garbage values.


See the following thread for more information: 
https://mailman.ntg.nl/pipermail/ntg-context/2021/103884.html


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

[NTG-context] Expansion of date inside \section

2016-06-19 Thread Mojca Miklavec
Hi,

I'm trying to generate daily reports and wanted to include the date in
bookmarks, but there is some weird (non)expansion going on.

I might just as well switch to lua for certain parts of the document
(like cycling through dates), but I suspect that there must be some
trivial hack to prevent me from getting my sections labeled
    date[y={2016},m={06},d={25}]

\setupinteraction
[state=start]
\placebookmarks
[chapter,section,subsection]
[chapter,section]
\setupinteractionscreen
[option=bookmark]

\def\generatesection#1#2#3{%
\edef\dt{\date[y={#1},m={#2},d={#3}][year,-,mm,-,dd]}
\setupheadertexts[{\dt}][pagenumber]
\section{\dt}
% \externalfigure[#1#2#3.pdf]
}

\starttext
\chapter{Daily files}
\generatesection{2016}{06}{25}
\generatesection{2016}{06}{26}
\stoptext

Thank you,
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] \setvariables and database module

2018-01-30 Thread Wolfgang Schuster



Otared Kavian <mailto:ota...@gmail.com>
30. Januar 2018 um 16:53
Hi again Wolfgang,

I think I understood what is going wrong with my example after your 
hint: I have to remove all spaces around the separator and remove also 
the braces around each entry.

That is the following works fine:

\startseplisttalk
Hacker;Up to date hacking;hacker.jpg
Hacker;Up to date hacking;hacker.jpg
\stopseplisttalk

while the following does not (as far as the filename is concerned):

\startseplisttalk
{Hacker};{Up to date hacking};{hacker.jpg}
Hacker ; Up to date hacking ; hacker.jpg
\stopseplisttalk

Is there a way to make the \defineseparatedlist command to be more 
tolerant for the filename?



No but you can remove the space with Lua.

\externalfigure[\cldcontext{string.collapsespaces("\getvariable{talk}{picture}")}]

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] \date format according to ISO 8601

2011-02-01 Thread Mojca Miklavec
On Tue, Feb 1, 2011 at 18:38, Marco wrote:
> On 2011-02-01 Mojca Miklavec wrote:
>> 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,–,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 thoughts.

Please leave a note at http://wiki.contextgarden.net/Reference/en/date.

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] timestamps with \date

2011-08-02 Thread Mojca Miklavec
On Mon, Aug 1, 2011 at 17:25, Wolfgang Schuster
 wrote:
>
> Am 01.08.2011 um 17:15 schrieb Mojca Miklavec:
>
>> Hello,
>>
>> I would like to add timestamps to the document. The command \date
>> seems handy for that, but it doesn't offer any hour/minute/second
>> keyword, or at least I wasn't able to find it in documentation.
>>
>> Is there some more convenient way to add current date and time to the 
>> document?
>
> \starttext
> \startlines
> \currenttime
> \currenttime[h]
> \currenttime[m]
> \currenttime[h,{\,:\,},m]
> \stoplines
> \stoptext

Thank you. This should go to command reference, I guess (but I'm not
sure what is the current upstream method to add new commands; wiki?).

Is there any specific reason why hour and minutes are not supported in \date?

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
___


[NTG-context] \installlanguage questions

2010-05-05 Thread Tomáš Pustelník
Hello,

I have few questions about command \installlanguage. First, in file lang-ini is 
command \setuplanguage for default language. It has parameters lefthyphen, 
righthyphen and hyphen. I would like to ask if these parameters can be used in 
command \installlanguage or not and what is their funcionality becouse I have 
tried use command:

\setuplanguage[cz][lefthyphen=@,righthyphen=@,hyphen=€] 

and I didn't see any changes. I thought it's used to setup hyphen mark when the 
word is spilt at the end of line but I still get symbol -

Also I would like to know whats the difference in \date and parameter date in 
\installlanguage? In parameter date in \installlanguage are curly backets, it's 
just some mask for command \date? Or those two are entirely different?

Thank you answers.

Tomas Pustelnik
___
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] help needed with special macro

2005-02-21 Thread Hans Hagen
Peter Münster wrote:
On Fri, 18 Feb 2005, Hans Hagen wrote:

Peter Münster wrote:
On Thu, 17 Feb 2005, Hans Hagen wrote:

   \expanded{\bTR ... \eTR}
table data is collected and processed four times so you need to freeze
the content
can you send me a small sample

Of course:
\newcount\MyVersion
\def\MyMacro#1{%
  \getgparameters[XXX][#1]
  \global\advance\MyVersion by 1
  \expanded{\bTR\bTD \the\MyVersion \eTD \bTD \XXXDate \eTD\eTR}
}
\starttext
\bTABLE
\bTR \bTD Version \eTD \bTD Date \eTD \eTR
\MyMacro{Date=1.2.2005}
\MyMacro{Date=3.4.2005}
\MyMacro{Date=5.6.2005}
\eTABLE
\stoptext
Peter

\def\MyMacro#1{%
  \getgparameters[XXX][#1]
  \global\advance\MyVersion by 1
  \bTR \bTR\expanded{\bTD \the\MyVersion \eTD} \expanded{\bTD \XXXDate \eTD}\eTR
}

-
  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] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Hans Hagen

On 3/11/2020 2:14 PM, Axel Kielhorn wrote:




Am 15.08.2018 um 14:04 schrieb Hans Hagen :

On 8/15/2018 12:27 PM, Mike O'Connor wrote:

G’Day,
Having a first go at converting TEI XML to ConTeXt.
Steep learning curve, but easier (for me) than XSLT, and first results were 
amazing.  Using http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf as a 
guide.
Currently stuck on converting an ISO format date (eg. 1908-01-10) into 
something more readable (eg. 10 January 1908) in the output.  I presume I 
should create a function (?luacode) that can take any ISO value and output the 
readable form.  The following works but seems to me inefficient.
Grateful for any pointers.
Mike
Here is my MWE:
\startbuffer[demo]

 
 
 
 
 10.I.08
 
 
19 Mar '08
 
 
 
 

\stopbuffer
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{date}{xml:date}
\stopxmlsetups
\xmlregistersetup{xml:initialize}
\startxmlsetups xml:date
\xmldoifelse {#1}{.[@type='divDate']} {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}
\docdate[day,month,year] = Document Date \par
 } {
\def\docdate{\ctxlua{
local tyear = string.sub('\xmlatt{#1}{when-iso}',1,4)
local tmonth = string.sub('\xmlatt{#1}{when-iso}',6,7)
local tday = string.sub('\xmlatt{#1}{when-iso}',9,10)
context.date{d = tday, m = tmonth, y = tyear}
}}
\docdate[day,month,year] = Event Date\par
}
\stopxmlsetups
\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext

Can be wikified ...

\startluacode
function xml.finalizers.tex.MyDate(e,what,how)
local t = string.split(e[1].at[what],"-")
context.date(
{ y = t[1], m = t[2], d = t[3] },
{ how }
)
end
\stopluacode

\startxmlsetups xml:date

\xmldoifelse {#1}{.[@type='divDate']} {
\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
Document Date \par
} {
\xmlfilter{#1}{./MyDate("when-iso","day,month,year")}\
Event Date\par

}
\stopxmlsetups


I couldn’t get this to work.
Had to change it to:

\startluacode
function xml.finalizers.tex.MyDate(e,what,how)
local ee = e[1].at[what]
local t = (string.split(ee,"-"))
context.date(
{ y = t[1], m = t[2], d = t[3] },
{ how }
)
end
\stopluacode
You mean the () around the split? weird. Anyway, there's also a time 
splitter (dedicated to Alan who needed one):


print(os.time(utilities.parsers.totime("2019-03-05 12:12:12")))
print(os.time(utilities.parsers.totime("2019/03/05 12:12:12")))
print(os.time(utilities.parsers.totime("05-03-2019 12:12:12")))
print(os.time(utilities.parsers.totime("05/03/2019 12:12:12")))

inspect(utilities.parsers.totime("2019-03-05 12:12:12"))
inspect(utilities.parsers.totime("2019/03/05 12:12:12"))
inspect(utilities.parsers.totime("05-03-2019 12:12:12"))
inspect(utilities.parsers.totime("05/03/2019 12:12:12"))


-
  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] \installlanguage questions

2010-05-06 Thread Taco Hoekwater

Tomáš Pustelník wrote:

Hello,

I have few questions about command \installlanguage. First, in file
lang-ini is command \setuplanguage for default language. It has
parameters lefthyphen, righthyphen and hyphen. I would like to ask if
these parameters can be used in command \installlanguage or not and
what is their funcionality becouse I have tried use command:

\setuplanguage[cz][lefthyphen=@,righthyphen=@,hyphen=€]

and I didn't see any changes. 


I think this is a case of NYI (not yet implemented). Luatex has support
for these parameters, but it looks like mkiv only has the \setuplanguage
keys at the moment, not an actual implementation.


I thought it's used to setup hyphen
mark when the word is spilt at the end of line 


Yes, that is wat it is supposed to do.


Also I would like to know whats the difference in \date and parameter
date in \installlanguage? In parameter date in \installlanguage are
curly backets, 


That is just a syntax trick to solve a problem with embedded commas.
In context, "key=value" and "key={value}" are equivalent, except
that the second form allows embedded commas.


it's just some mask for command \date? Or those two
are entirely different?


The \setuplanguage parameter provides a formatting template for \date.

Best wishes,
Taco

___
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] xml and buffers

2006-01-19 Thread Junod Antoine
Thanks a lot!!!
-AJ


On Thu, Jan 19, 2006 at 05:55:22PM +0100, Hans Hagen wrote:
> Junod Antoine wrote:
> 
> >Hello gurus, 
> >
> >I'm a bit into trouble wih buffers and xml parsing. Here is my problem:
> >
> >I've got a .xhtml with the following lines:
> >
> >[...]
> >
> >
> >[...]
> >Auction: document d'analyse
> >[...]
> >
> >I'm trying to store the content of the meta tag in a buffer, one per
> >meta tag, (ie "G�nie Logiciel" in buffer course_name, "23 d�cembre
> >2005" in buffer date) to use these buffers when I meet the title tag:
> >
> >    \XMLifequalelse{meta}{name}{course_name}
> > {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer}{}
> >\XMLifequalelse{meta}{name}{date}
> > {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{}
> >\defineXMLenvironment [title] {\startstandardmakeup
> >   \getbuffer[course_name]
> >   \getbuffer[date]}{\stopstandardmakeup}
> >
> >But it does not print anything else than the title.
> > 
> >
> buffers serve a different purpose and are part if a text flow 
> 
> \starttext
> 
> \defineXMLsingular
>  [meta]
>  [name=,content=]
>  {\setevariables[document:meta][\XMLop{name}=\XMLop{content}]}
> 
> \defineXMLenvironment
>  [title]
>  {}
>  {\startstandardmakeup
>   \getvariable{document:meta}{course_name} \endgraf
>   \getvariable{document:meta}{date} \endgraf
>   \stopstandardmakeup}
> 
> \startXMLdata
> 
> 
> 
> 
> \stopXMLdata
> 
> With a little extension (i'll add it) we can prevent unwanted expansion: 
> 
> \unprotected \def\setvalueXMLpar#1#2#3%
> [EMAIL PROTECTED]@EA\endcsname
>\csname\ifcsname\@@XMLvariable:#2:#3\endcsname
>  \@@XMLvariable:#2:#3\else\s!empty\fi\endcsname}
> 
> \defineXMLsingular
>  [meta]
>  [name=,content=]
>  {\setvalueXMLpar{document:meta:\XMLop{name}}{meta}{content}}
> 
> \defineXMLenvironment
>  [title]
>  {}
>  {\startstandardmakeup
>   \getvalue{document:meta:course_name} \endgraf
>   \getvalue{document:meta:date} \endgraf
>   \stopstandardmakeup}
> 
> \startXMLdata
> 
> 
> 
> 
> \stopXMLdata
> 
> 
> \stoptext
> 
> 
> 
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] timestamps with \date

2011-08-01 Thread Mojca Miklavec
Hello,

I would like to add timestamps to the document. The command \date
seems handy for that, but it doesn't offer any hour/minute/second
keyword, or at least I wasn't able to find it in documentation.

Is there some more convenient way to add current date and time to the document?

Thank you,
Mojac
___
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] date format in Chinese environment

2007-05-17 Thread [EMAIL PROTECTED]
When I was trying to typeset date in Chinese 
environment(\usemodule[chinese])
 using the commond \currentdate, the date format was strange:

"2007 五月 18"(the month was in Chinese).

What I want is 2007.5.18 or 2007-5-18(the month should not be in Chinese).

How to achieve this?

Thanks !


___
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] setupinteraction and macroexpansion

2012-06-19 Thread Andreas Schneider
On Tuesday, June 19, 2012, at 10:42 Wolfgang Schuster wrote:

> Am 19.06.2012 um 10:39 schrieb Andreas Schneider:

>> Hello,
>> 
>> I'm  a bit lost with macro expansion here. I try to use some macros to
>> set  the title (and subject) of the PDF document. The attached minimal
>> example shows what I want to achieve.
>> 
>> I tried def, edef, gdef, define, explicit expand, expandoneafter, etc.
>> etc.  without  any  success. Whatever I do, the title field in the PDF
>> metadata  always  contains  the  raw "\date..." command instead of the
>> formatted date.
>> 
>> Any suggestions?

> You can’t use \date (or any other unexpandable command) in an expandable 
> context.

> Wolfgang

Hmm  I  see, so \date is simply not possible for that case. Ok, thanks
for  explaining  that  I wasn't aware (until now) that commands can be
unexpandable.

Thanks again! :-)

-- 
Best Regards,
Andreas

pgpkKmwFL3Lcy.pgp
Description: PGP signature
___
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] Failure to compile with new date code

2021-10-25 Thread Rik Kabel via ntg-context
This has been part of my setup interaction for a couple of years. Documents all pass verapdf pdf3a testing.On Oct 25, 2021 15:54, Hans Hagen via ntg-context  wrote:On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:
> On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
>> Hello all,
>>
>> The example below continues to work with MkIV, but now fails with the
>> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
>>
>>  \define\DraftOf   {Draft of \date}
>>  \setupinteraction [date={\DraftOf}]
> 
> Hi Rik,
> 
> \setupinteraction[date=***] only accepts a date as input.
> 
> Would it be possible that it was subtitle or title any of the options
> you used?
we can of course accept anything but because these dates end up in 
different spots it gets hairy ... also it can invalidate a pdf
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
___

___
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] (no subject)

2010-02-22 Thread Roger Mason
Hello,

I'm working on a project to set up exams, basing the work on Aditya's
asignment class that was published in Practex in 2006.

I have a problem getting title information printed correctly.  This is a
cut-down version:

\setupcolors  [state=start]
\definecolor  [colorone][r=0.625,g=0,b=0] %dark red
\definecolor  [colortwo][b=0.625,g=0,r=0] %dark blue

\def\exam[#1]
  {\getrawparameters
[Exam]
[ title=
 course=,
   date=,
  start=,
   stop=,
  #1]
  \title{\Examtitle}}

\definefont [BigFontOne]  [RegularSlanted sa 2.5]
\definefont [BigFontTwo]  [Regular sa 1.5]

\setuphead[title]
 [  style=\BigFontOne,
  command=\examtitle,
   before={},
after={\blank[big] \bgroup \colortwo
 Date: \expanded{\date[Examdate]}
\hfill
Start: \expanded{Examstart}
Stop: \expanded{Examstop}
   \egroup\blank},
 ]

%D This macro does the actual typesetting of the title
\def\examtitle#1#2%
  {\framed[
  width=broad,
  frame=off,
  align=middle,
foregroundcolor=colortwo,
 % I want a shadow around the title frame
 background=shadow]
  {#2\\{Examcourse}}}

\exam[
  title=Mid-term 2010,
  course=ES2917,
  date={d=17,m=2,y=2010},
  start={9:00 am},
  stop={11:00 am}
]

I'm processing this with Mark II.  The problems are that

(1) The literal 'Examcourse' is typeset;
(2) Today's date is typset, not the one entered in the interface;
(3) The start and stop times are typeset as literals 'Examstart' &
'Examstop'

Thanks for any help,
Roger


%%% Local Variables: 
%%% mode: context
%%% TeX-master: t
%%% End: 
___
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] Exams

2010-02-22 Thread Roger Mason
Hello,

Sorry, I sent this message to the list without a subject earlier today.

I'm working on a project to set up exams, basing the work on Aditya's
asignment class that was published in Practex in 2006.

I have a problem getting title information printed correctly.  This is a
cut-down version:

\setupcolors  [state=start]
\definecolor  [colorone][r=0.625,g=0,b=0] %dark red
\definecolor  [colortwo][b=0.625,g=0,r=0] %dark blue

\def\exam[#1]
  {\getrawparameters
[Exam]
[ title=
 course=,
   date=,
  start=,
   stop=,
  #1]
  \title{\Examtitle}}

\definefont [BigFontOne]  [RegularSlanted sa 2.5]
\definefont [BigFontTwo]  [Regular sa 1.5]

\setuphead[title]
 [  style=\BigFontOne,
  command=\examtitle,
   before={},
after={\blank[big] \bgroup \colortwo
 Date: \expanded{\date[Examdate]}
\hfill
Start: \expanded{Examstart}
Stop: \expanded{Examstop}
   \egroup\blank},
 ]

%D This macro does the actual typesetting of the title
\def\examtitle#1#2%
  {\framed[
  width=broad,
  frame=off,
  align=middle,
foregroundcolor=colortwo,
 % I want a shadow around the title frame
 background=shadow]
  {#2\\{Examcourse}}}

\exam[
  title=Mid-term 2010,
  course=ES2917,
  date={d=17,m=2,y=2010},
  start={9:00 am},
  stop={11:00 am}
]

I'm processing this with Mark II.  The problems are that

(1) The literal 'Examcourse' is typeset;
(2) Today's date is typset, not the one entered in the interface;
(3) The start and stop times are typeset as literals 'Examstart' &
'Examstop'

Thanks for any help,
Roger
___
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] Out of Date? Up to Date?

2005-11-20 Thread Taco Hoekwater

David Arnold wrote:

All,

If I read:

http://www.pragma-ade.com/general/manuals/mfonts.pdf

How up to date or out of date is the information in this manual?


Hi David,

It looks like it is still quite up-to-date, but some of the
examples it gives may no longer be the very best and latest
way of doing things, and possibly there are some new developments
that do not get as much attention as desired (like texfont, and
the issues arising from font map files). Overall, the document
appears accurate, though.

An important thing to remember is this:

  ConTeXt does not share font metric conventions with LaTeX.

(at one point it started doing so, like supporting the Karl
Berry naming scheme and the psnfss style font family names,
but that has since been abandoned).

Another important thing is that it also does not share font
map files with LaTeX and, specifically,

  ConTeXt does not make pdfetex read pdftex.map.

(this is at the root of a great many problems reported by
users only familiar with nfss)


The preferred format for metric files in ConTeXt is

  //-.tfm

for metrics and

  --.map

for the mapping files.

   is usually derived from the font source (afm or ttf),
   is a 'controlled' list,
   and  are user-supplied (at install time).

There are ways to trick ConTeXt into using different conventions,
but if you do that you are likely to run into trouble (as you
have experienced).

Greetings,

Taco

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


Re: [NTG-context] Problem of displaying a date with a macro

2019-09-09 Thread Hans Hagen

On 9/9/2019 3:24 PM, Fabrice Couvreur wrote:

Hello,
I just updated my version of ConTeXt and the bug is still present.
Can you confirm ?
Thank you.
Fabrice

Le mer. 28 août 2019 à 16:34, Aditya Mahajan <mailto:adit...@umich.edu>> a écrit :


On Wed, 28 Aug 2019, Fabrice Couvreur wrote:

 > Hello,
     > The date display is incorrect : I get day 28 instead of day 2.
 > Thank you
 > Fabrice
 >
 > \defineframed
 >    [headerframed]
 >    [frame=off,
 >     height=fit,
 >     width=fit]
 >
 >  \definecolor[ColorA][0.8(white)]
 >
 >
 >  \startsetups [headertext]
 >
 >    \setupheadertexts
 >      [{\startframed [headerframed]
 >      [foregroundstyle=bold,background=framewithshadow]
 >      \getvariable{headertext}{title}
 > n\high{o}\,\getvariable{headertext}{number}
 >      \stopframed}]
 >
 >    \setupheadertexts
 >      [{\startframed [headerframed]
 >      [align=flushleft,foregroundstyle=]
 >       Lycée LA SALLE, Lille\\
 >       \getvariable{headertext}{location}
 >       \stopframed}]
 >
 >      [{\startframed [headerframed]
 >          [align=flushright,foregroundstyle=]
 >
 >

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
 >          \stopframed}]
 >
 >  \stopsetups
 >
 >  \setvariable{headertext}{set}{\directsetup{headertext}}
 >
 > \startuseMPgraphic{framewithshadow}
 > path p;
 >

p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle;
 > fill p shifted (2,-2);
 > fill p withcolor 0.8white;
 > draw p;
 > setbounds currentpicture to p;
 > \stopuseMPgraphic
 >
 > \defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}]
 >
 > \starttext
 > \setvariables
 >   [headertext]
 >   [title={Devoir maison},
 >    number={6},
 >    day={02},
 >    month={09},
 >    year={2019},
 >    location={Seconde B},
 >    time={}]
 > \input knuth
 > \stoptext

There was a bug with the \date macro which I had reported a few days
ago.
This appears to be related to that. Should be fixed in the next beta.


I have a chicken-egg issue to solve (probebly in the end have to drop 
something for consistency deep down)


can you use for now:

\date[d=21,m=2,y=2219] [month,{ },D,{, },year]
\date[d=22,m=12,y=2119][month,{ },D,{, },year]



--

-
  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] sections, subsections, indenting, startnarrower, alignment

2009-05-22 Thread afsmith
Hi again ntg-context.

I have been working on my own CV/Resume module. Up until now I've just
been asking about specific bits of the implementation of this thing I
want to do, but perhaps that was a mistake as it hasn't really helped
progress much, so:
What I am trying to achieve is to define some three-argument command
to give a section/subject header and a date, and then a block of text.
The header and date should be on the same line, but aligned in either
direction (subject aligned left, date aligned right)
This block of text underneath it should be indented and able to
include an instance of the same command. Let me try to explain the
desired output in a little monospaced text diagram..

|(Subject)___(Date)|
|__(Subsubject)__(Date)|
|texttexttexttexttexttexttexttext__|
|textmoretextmoretextmoretexttext__|
|__(Subsubject)__(Date)|
|texttexttexttexttexttextexttext___|
|textmoretextmoretextmoretexttext__|

The "subject" and "subsubject" parts don't need to literally use
"\subject" , for example I also tried to use "\start(description){..."
for this purpose as well but that failed equally. Just something that
works reasonably as a section header.

I promise I have looked in the archives before asking :) for example
http://www.mail-archive.com/ntg-context@ntg.nl/msg2.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html

And here is an example of something I was playing with...

---
\definehead[mysubject][subject]

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUBJ
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]
\starttext
\CHRONSUBJ
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUBJ
{This happened from June 08 to December 08}
{06/08--12/08}
{\input tufte }
  \CHRONSUBJ
{This happened from January 09 to June 09}
{01/09--06/09}
{\input zapf }}
\stoptext
---

-A
___
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] High level user macro (howto?)

2004-08-10 Thread Vit Zyka
\useregime[il1]
\enableregime[il1]
\useencoding[ffr]
\definehspace[fr][:][.16667em]
\definehspace[fr][;][.16667em]
\definehspace[fr][!][.16667em]
\definehspace[fr][?][.16667em]
\mainlanguage[fr]
\newdimen\BigWidth \BigWidth=18cm
\setupscreens[screen=0.85]
\setupcolors[state=start]
\setupheadertexts[Rév.: \the\RevC]
\def\Vfil{\vskip0pt plus3fil\relax}
\def\In[#1,#2]{\ifx#1\empty\else\in[#1]\fi\if\relax#2\else, \In[#2]\fi}
\def\BigTitle{\centerline{\framed[width=\BigWidth,offset=2mm,
  background=screen]{\bfb\setupinterlinespace\cbox{Title
\def\startChanges{\hbox to \hsize\bgroup\hss\SetTableToWidth{\BigWidth}%
  \starttable[s1 | c | c | p(95mm) | p(17mm) | p(37mm) |]
  \HL\BL[5]\AR\VL Rév.\VL Date\VL Origine de la mise à jour\VL§ modifié\VL
  Auteur\VL\AR\HL}
\def\stopChanges{\stoptable\hss\egroup}\newcount\RevC
\def\Changes#1[#2]{%
  \getparameters[CH][#2]% Auteur, Modif, Labels, Date
  \ifnum\RevC=0 \BigTitle \vskip0.5ex \Vfil \startChanges \fi
  \global\advance\RevC by 1 \VL \the\RevC \VL \CHDate \VL \CHModif \VL
  XXX%\In[\CHLabels,\relax] % does not work, but not so important for now
  \VL \CHAuteur \VL\AR\HL}
\def\Destinataires#1{\stopChanges\Vfil
  \def\temp{#1}\ifx\temp\empty\else\noindenting Destinataires:\crlf#1\blank\fi
\centerline{\SetTableToWidth{\BigWidth}%
\bf\starttable[| c | c | c |]
\HL\BL[3]\AR\VL Approbateur\VL Date\VL Visa\VL\AR\HL
\VL\vbox to 2cm{}\VL\VL\VL\AR\HL
\stoptable}\par\page\completecontent}
\starttext
\Changes[Date=1/2/2004,Modif=First version,Auteur=Peter]
\Changes[Date=3/4/2004,Modif=Some modifications,Lables={sec:S1,sec:S2},
  Auteur=Peter Münster]
\Changes[Date=5/6/2004,Modif=Some other modifications,Lables={sec:S2},
  Auteur=Peter]
%
\Destinataires{Peter, Olivier}
\section[sec:S1]{A section}
some text
\subsection{Bla}
\subsection{Bla}
\section[sec:S2]{Another section}
some text
\stoptext
Cheers, Peter
> The problem:
> the parameter values are not updated in the two last calls of the
> macro.
In the second and later call of \Changes you are in the table (\halign 
or \hbox?, it depends on table mechanism) cell. In both cases you are 
inside a group. Since \getparameters expands to local assignments, the 
contents is forgotten outside this cell.

Try \getgparameters
Vit Zyka
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Pointer to manual.

2012-08-16 Thread Peter Münster
On Thu, Aug 16 2012, Bill Meahan wrote:

> FYI: The version at the wiki has a Cover Date of June 1, 2011 while the
> version that comes with Tex Live 2012 has a Cover Date of June 9, 2011

That's the date of PDF compilation.


> I haven't looked at the SVN version (yet).

It's behind the cover (bottom right corner).

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


Re: [NTG-context] Makeup on same page as main content

2022-03-05 Thread śrīrāma via ntg-context
On Sunday, March 6, 2022 5:17 AM mastermind_ x via ntg-context wrote:
> Any pointers on how I can achieve this?

You don't have a MWE, so based on my understanding of your illustration, I have 
the following:

%%% SOF
  % required for 'cow'
  \setupexternalfigures[location={local,default}]

  \setvariables
[assignments]
[set={\setups[assignments:set]}]

  \startsetups assignments:set
  \writestatus{variables}{assignments:set is being called..}
  \startalignment[middle]
  \bTABLE[frame=off]
  \setupTABLE[c][1][align=flushleft,style=bold,distance=2cm]
  \setupTABLE[c][2][align={flushright,lohi}]
  \bTR
\bTD \externalfigure[cow][height=2cm] \eTD
\bTD 
\doiftextelse{\getvariable{assignments}{date}}{\getvariable{assignments}{date}}{\date}
 \eTD
  \eTR
  \bTR
\bTD Course: \getvariable{assignments}{code} \eTD
\bTD \getvariable{assignments}{assignment} \eTD
  \eTR
  \bTR
\bTD Name \eTD
\bTD \getvariable{assignments}{name} \eTD
  \eTR
  \bTR
\bTD Class \eTD
\bTD \getvariable{assignments}{class} \eTD
  \eTR
  \eTABLE
  \stopalignment
  \stopsetups

  \starttext
  \setvariables
[assignments]
[code={AB1234},
date={January 1, 2038},
assignment={whatever},
name={the name},
class={1970}]
  \input tufte

  \page
  \setvariables
[assignments]
[code={AB1234},
date=,
assignment={whatever},
name={the name},
class={2038}]
  \input knuth
  \stoptext
%%% EOF

Essentially, variables in ConTeXt has a nice set key which can be made to 
trigger anything when the variables are set. So you can give it a setup to do 
whatever you want by just saying 
\setvariables[assignments][...]
wherever in the document you desire. See here for an example [there is also a 
'reset' key]:
https://wiki.contextgarden.net/Setups

[Since you said 'framed assignment box' you can enable the frames of the cell 
you want, and change formatting as needed]

Sreeram


___
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] What happened to the ePub script?

2015-01-19 Thread Hans Hagen

On 1/17/2015 1:52 PM, Henning Hraban Ramm wrote:

Hi there,

I started documenting ConTeXt’s current ePub/export behaviour in 
http://wiki.contextgarden.net/ePub and will merge/delete the content of the 
current wiki pages as soon as I’m content with its content ;)

* Do you think it would be better to document export and ePub separately?


Of course I have questions, e.g.:

* How can I set the current \date in a metadata variable?
(I know it’s also in the date tag of , but I know how to format \date 
…)

This doesn’t work (i.e. I get „\date“ in XML/XHTML):

\settaggedmetadata[
version={\date}
]


\the\normalyear-\the\normalmonth-\the\normalday


* Can I influence the directory/file names of the export from within the source?
E.g. if I compile „minimal.tex“, I get minimal-export and minimal-epub
The —result switch doesn’t change anything.


hm, honoring --result is doable but in general i'd like to keep the 
export quite basic and predictable (the less options the better)



* BTW: Can I set —result from within my ConTeXt source?


no, because the context script also does some cleanup and checking (like 
not replacing the tuc file when there is an issue)


(letting tex influence its own run is somewhat tricky and has limitations)

Hans

-
  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] What happened to the ePub script?

2015-01-20 Thread Henning Hraban Ramm
Am 2015-01-19 um 15:48 schrieb Hans Hagen :

> On 1/17/2015 1:52 PM, Henning Hraban Ramm wrote:
>> * How can I set the current \date in a metadata variable?
>> (I know it’s also in the date tag of , but I know how to format 
>> \date …)
>> 
>> This doesn’t work (i.e. I get „\date“ in XML/XHTML):
>> 
>> \settaggedmetadata[
>>  version={\date}
>> ]
> 
> \the\normalyear-\the\normalmonth-\the\normalday

Thanks, but that’s not the same. Not only because I get „2015-1-20“ and not 
„2015-01-20“.

Is there a way to get „everything“ expanded within \settaggedmetadata ?

>> * Can I influence the directory/file names of the export from within the 
>> source?
>> E.g. if I compile „minimal.tex“, I get minimal-export and minimal-epub
>> The —result switch doesn’t change anything.
> 
> hm, honoring --result is doable but in general i'd like to keep the export 
> quite basic and predictable (the less options the better)

Ok, that means we have no influence on files names at all?

>> * BTW: Can I set —result from within my ConTeXt source?
> 
> no, because the context script also does some cleanup and checking (like not 
> replacing the tuc file when there is an issue)
> (letting tex influence its own run is somewhat tricky and has limitations)

Ok, would have been nice. Will write a wrapper script for my use case.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Include 'urldate' in *.bst (Url citations with last checked date)

2015-09-11 Thread Alan BRASLAU
The new mkiv bibliography module does not use *.bst files at all.
We can handle access date but there needs to be some sort of
specification. I believe that the APA style only specifies "Retrieved
from". I can work something in to use the fields "lastchecked" and/or
"urldate".

Alan


On Fri, 11 Sep 2015 15:12:50 +0200
Hans Hagen  wrote:

> On 9/11/2015 10:29 AM, Jens Bertram wrote:
> > Hi,
> >
> > for a document I'm currently writing I need to cite some online
> > resources including their last accessed date. Adding
> > \insertbiburl[..] to a citation style does work fine to get the urls
> > printed.
> > However, the *.bst styles only check for 'lastchecked' tag for a
> > last accessed date. I don't know if there's any standard way for
> > specifying the date but 'lastchecked' and 'urldate' seem to be two
> > commonly used variants (as far as a quick web search tells - I'm on
> > Zotero which also uses the last mentioned type).
> >
> > To get this temporary working for me I replaced the plain
> > 'lastcheck' output in *.bst with:
> >   ..
> >   lastchecked empty$
> > {"" "\lastchecked" urldate do.out}
> > {"" "\lastchecked" lastchecked do.out} if$
> >   ..
> > and added urldate to the list of known tags.
> >
> > Are there any chances to get this changed in the 'official' version
> > (if there are no other points against this I don't see right
> > now :))?  
> 
> I have no clue how bst files work (nor time to look into it) so
> others have to decide on that.


___
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] Document title (was: (no subject))

2011-09-10 Thread Wolfgang Schuster

Am 22.02.2010 um 15:25 schrieb Roger Mason:

> Hello,
> 
> I'm working on a project to set up exams, basing the work on Aditya's
> asignment class that was published in Practex in 2006.
> 
> I have a problem getting title information printed correctly.  This is a
> cut-down version:
> 
> […]
> 
> I'm processing this with Mark II.  The problems are that
> 
> (1) The literal 'Examcourse' is typeset;
> (2) Today's date is typset, not the one entered in the interface;
> (3) The start and stop times are typeset as literals 'Examstart' & 'Examstop'

You forgot the backslash in front of your values.

It’s also bad style to misuse the \title command for your document title
because \title is only the unnumbered version of \chapter, nothing else.

Another way to create your document title is the following code:

\setupcolors  [state=start]

\definecolor  [colorone][r=0.625,g=0,b=0] %dark red
\definecolor  [colortwo][b=0.625,g=0,r=0] %dark blue

\startsetups examtitle

\startframedtext
[
width=broad,
frame=off,
align=middle,
foregroundcolor=colortwo,
background=shadow,
]

{\definedfont[RegularSlanted sa 2.5]\getvariable{exam}{title}}
\blank
\getvariable{exam}{course}

    \stopframedtext

\blank[big]

    \startcolor[colortwo]


\doifelsevariable{exam}{date}{\expanded{\date[\getvariable{exam}{date}]}}{\currentdate}
\hfill
Start: \getvariable{exam}{start}
\space
Stop: \getvariable{exam}{stop}

\stopcolor

\blank

\stopsetups

\setvariables[exam][set={\setups[examtitle]}]

\starttext

\setvariables
  [exam]
  [ title=Mid-term 2010,
   course=ES2917,
 date={d=17,m=2,y=2010},
start={9:00 am},
 stop={11:00 am}]

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


[NTG-context] Using variables and macros for styling of section title and line in table of contents

2020-07-22 Thread James Withers
Dear list


I have a document with section headings which include a title, date and
reference spread over two lines with different font style and
justification, plus a slightly different text for the table of contents.


So that I can alter the styling of the section headings without having to
recode each \startsection command, I have used variables and a macro
command for the style.


This works for section 'title' and 'marking', but not for the 'list'
attribute.


The minimal working example below shows what I'm trying to do.


Best wishes and many thanks in advance.


James



\define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}}
\define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}}

\starttext

\completecontent

\setvariables[myvar][
title={What I would like},
date={2020},
ref={Reference No 1},
list={Variation on title},
]

\startsection[title=\mytitle,list={Variation on title---{\bf 2020}}]

Contents line to look like this:

\mylist

\stopsection


\setvariables[myvar][
title={What I get},
date={2021},
ref={Reference No 2},
list={Something for the contents},
]

\startsection[title=\mytitle,list=\mylist]

Contents line to look like this:

\mylist

\stopsection
\stoptext

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
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] Exams

2010-02-22 Thread Aditya Mahajan

On Mon, 22 Feb 2010, Roger Mason wrote:


Hello,

Sorry, I sent this message to the list without a subject earlier today.

I'm working on a project to set up exams, basing the work on Aditya's
asignment class that was published in Practex in 2006.

I have a problem getting title information printed correctly.  This is a
cut-down version:

\setupcolors  [state=start]
\definecolor  [colorone][r=0.625,g=0,b=0] %dark red
\definecolor  [colortwo][b=0.625,g=0,r=0] %dark blue

\def\exam[#1]
 {\getrawparameters
   [Exam]
   [ title=
course=,
  date=,
 start=,
  stop=,
 #1]
 \title{\Examtitle}}

\definefont [BigFontOne]  [RegularSlanted sa 2.5]
\definefont [BigFontTwo]  [Regular sa 1.5]

\setuphead[title]
[  style=\BigFontOne,
 command=\examtitle,
  before={},
   after={\blank[big] \bgroup \colortwo
Date: \expanded{\date[Examdate]}



This should be \Examdate


   \hfill
   Start: \expanded{Examstart}


No need for \expanded here. Just \Examstart is enough


   Stop: \expanded{Examstop}


\Examstop


  \egroup\blank},
]

%D This macro does the actual typesetting of the title
\def\examtitle#1#2%
 {\framed[
 width=broad,
 frame=off,
 align=middle,
   foregroundcolor=colortwo,
% I want a shadow around the title frame
background=shadow]
 {#2\\{Examcourse}}}


Again, \Examcourse



\exam[
 title=Mid-term 2010,
 course=ES2917,
 date={d=17,m=2,y=2010},
 start={9:00 am},
 stop={11:00 am}
]

I'm processing this with Mark II.  The problems are that

(1) The literal 'Examcourse' is typeset;
(2) Today's date is typset, not the one entered in the interface;
(3) The start and stop times are typeset as literals 'Examstart' &
'Examstop'


You need to use \Exam... to access the values.

Aditya
___
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] How to indent a paragraph

2007-03-31 Thread Taco Hoekwater
Mari Voipio wrote:
> I frankly don't know if it exists with all distributions and you don't 
> state what you use, but I recently found out that my WinConTeXt includes 
> a stand-alone version of TeXShow, which is very hand for this kind of 
> use - and I think the program is more up to date than any paper manuals; 
> the developers will be able to tell, if they make a new one for a new 
> distribution of ConTeXt or just occasionally. Searching for file texshow 
> might find yours (no luck on my Mac...); the online version is at 
> http://texshow.contextgarden.net/

The standalone texshow is by me. It is a perl/Tk script, so if you
have a proper perl+Tk installed on your system, you should be able
to run it.

Both the texshows: Patrick's web version and my standalone version are
always up-to-date with Hans' XML files. By definition, since they use
the XML files as their primary data source (barring errors or
omissions in the XML files, of course).

> THIS might be what you were asking for:
> There's a "quick reference" file that can be handy as augmentation to 
> other manuals: <http://www.pragma-ade.com/show-man-10.htm> or, if your 
> preferred language is English, directly here: 
> <http://www.pragma-ade.com/general/qrcs/setup-en.pdf> - at least the 
> English version is *very* new, dated on March 19, 2007, so it should be 
> quite up to date [probably too up-to-date for my old ConTeXt 
> distribution...].

I am do not know if the qrcs are always up-to-date, but I know they are
periodically regenerated by Hans himself, using those same XML files
as source.


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


[NTG-context] Re: XML processing beginner's question

2023-08-21 Thread Thomas A. Schmitz

On 8/21/23 17:59, Michael Löscher wrote:
Yes, I have done that. But I don't seem to have the basic context of how 
the processing works in order. All I have so far is this as a starting 
point:


Really? I told you about the various commands \xmldoif, but there's 
nothing in your starting point. I don't want to provide anybody homework 
solutions, so just to give you an idea to get you started:


\startxmlsetups xml:mysetup
\xmlsetsetup{main}{document|element|mdata|tdata|name|date|num|content|shortdescription|p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:mysetup}

\startxmlsetups xml:document
\xmlflush {#1}
\stopxmlsetups

\startxmlsetups xml:element
\xmlflush {#1}
\stopxmlsetups

\startxmlsetups xml:mdata
\xmldoifelsetext {#1} {/date}
{{\bf \xmltext {#1} {name}}\par
{\it \xmltext {#1} {date}}\par}
{\xmltext {#1} {content}\par}
\stopxmlsetups

This will process the name in bold and the date in italic. But I'm sure 
you can do better after reading and digesting the chapter I referred to.


Thomas

___
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] Include 'urldate' in *.bst (Url citations with last checked date)

2015-09-11 Thread Jens Bertram

Hi,

for a document I'm currently writing I need to cite some online 
resources including their last accessed date. Adding
\insertbiburl[..] to a citation style does work fine to get the urls 
printed.
However, the *.bst styles only check for 'lastchecked' tag for a last 
accessed date. I don't know if there's any standard way for specifying 
the date but 'lastchecked' and 'urldate' seem to be two commonly used 
variants (as far as a quick web search tells - I'm on Zotero which also 
uses the last mentioned type).


To get this temporary working for me I replaced the plain 'lastcheck' 
output in *.bst with:

 ..
 lastchecked empty$
   {"" "\lastchecked" urldate do.out}
   {"" "\lastchecked" lastchecked do.out} if$
 ..
and added urldate to the list of known tags.

Are there any chances to get this changed in the 'official' version (if 
there are no other points against this I don't see right now :))?


Best regards,
Jens

___
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] Expansion of date inside \section

2016-06-19 Thread Mojca Miklavec
On 19 June 2016 at 22:17, Mojca Miklavec wrote:
> Hi,
>
> I'm trying to generate daily reports and wanted to include the date in
> bookmarks, but there is some weird (non)expansion going on.
>
> I might just as well switch to lua for certain parts of the document
> (like cycling through dates), but I suspect that there must be some
> trivial hack to prevent me from getting my sections labeled
> date[y={2016},m={06},d={25}]

... other than using \section{#1-#2-#3} (which might also do the job for now).

> \setupinteraction
> [state=start]
> \placebookmarks
> [chapter,section,subsection]
> [chapter,section]
> \setupinteractionscreen
> [option=bookmark]
>
> \def\generatesection#1#2#3{%
> \edef\dt{\date[y={#1},m={#2},d={#3}][year,-,mm,-,dd]}
> \setupheadertexts[{\dt}][pagenumber]
> \section{\dt}
> % \externalfigure[#1#2#3.pdf]
> }
>
> \starttext
> \chapter{Daily files}
> \generatesection{2016}{06}{25}
> \generatesection{2016}{06}{26}
> \stoptext
>
> Thank you,
> 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] 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 bookmark 
entries have gone as well. Partitioned numbers of sections, subsections etc., 
have only the dot left.

\setupinteraction[state=start]
\placebookmarks[chapter,section,subsection]

\starttext
\chapter{A Chapter}
\section{A Section}
\subsection{The Subsection}
\stoptext


line 551 in core-con.lua should be

return n -- instead of context(n)

(i.e. the converters now return converted numbers and another function 
does the printing to tex)


Hans

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


[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 should I specify the date option? (Even with the format
D:199812231952-08'00, I don’t get it working.)

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] timestamps with \date

2011-08-01 Thread luigi scarso
On Mon, Aug 1, 2011 at 5:15 PM, Mojca Miklavec
 wrote:
> Hello,
>
> I would like to add timestamps to the document. The command \date
> seems handy for that, but it doesn't offer any hour/minute/second
> keyword, or at least I wasn't able to find it in documentation.
>
> Is there some more convenient way to add current date and time to the 
> document?
with mkiv you have
os.time
os.date
-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] weird Spanish date default formatting

2011-08-07 Thread Pablo Rodríguez
Hi there,

compiling this minimal document:

\mainlanguage[es]
\starttext
\currentdate\par
\date
\stoptext

I get

7 agosto 2011
7 agosto 2011

Being a Spanish native speaker, excuse me, but I guess it makes no sense
for a date.

Default formatting should read: day,{ de },month,{ de },year, which
would give "7 de agosto de 2011".

Could you fix this?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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 of displaying a date with a macro

2019-09-09 Thread Pablo Rodriguez
On 9/9/19 3:24 PM, Fabrice Couvreur wrote:
> Hello,
> I just updated my version of ConTeXt and the bug is still present.
> Can you confirm ?

Hi Fabrice,

I confirm that latest beta (from 2019.09.09 13:44), doesn’t change the
date in the following sample:

\starttext
\date[d=25]
\stoptext

I hope it helps,

Pablo
--
http://www.ousia.tk
___
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] Up-to-date documentation / tutorials. Where?

2020-02-29 Thread Gerben Wierda
Hello community,

I have been (unsuccessfully) hunting for up-to-date tutorials/documentation on 
ConTeXt/LuaTeX/METAPOST. What I find is sites that for instance end in 2011. 
documentation that is from 2013, or on Pragme-ADE a show-man.pdf PDF with an 
overview of documentation that doesn’t open any underlying document.

Is there not a simple place to get all the up-to-date documentation?

G
___
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] t-letter

2013-01-20 Thread Wolfgang Schuster

Am 20.01.2013 um 11:32 schrieb Henning Hraban Ramm :

> Hi Wolfgang et.al.,
> 
> once again I struggle with your fine letter module.
> 
> For my job application setup (that worked a year before) I already gave up, 
> but I need my invoices working.
> 
> Did you recently change anything WRT subject line? It doesn’t show up any 
> more.
> (Latest ConTeXt MkIV beta in standalone.)

I changed the way how section and layer layouts defined, the current version of 
the module provides
the new command \definelettersectionalternative and 
\defineletterlayeralternative. For backwards
compatibility I still provide the old \defineletterlement command but there was 
a bug when
the command is used to create layouts for a section, a new version which fixes 
this is already online.

> This used to work:
> 
> % Subject and date on the same line, date below logo
> \defineletterelement[section][subject][fiee]%
>   {\bTABLE[frame=off]
>   \bTR
>   
> \bTD[width=\dimexpr169mm-\backspace\relax]\correspondenceparameter{subject}\eTD
>   \bTD{\tf\correspondenceparameter{date}}\eTD
>   %\bTD{\tf 2011-11-14}\eTD
>   \eTR
> \eTABLE}
> 
> \setuplettersection[subject][alternative=fiee]
> 
> \startletter[subject={Invoice 1}]
> ...
> \stopletter
> 
> (Yes, this isn’t a working minimal example. Perhaps you can tell me you 
> changed this or that - otherwise I must dig deeper…)


Below are two additional methods to create a customized layout for the section.

\usemodule[letter]

% Method 1: unique name for the element
%
% \definelettersectionalternative[mysubject][renderingsetups=mysubject]
%
% \startsetups[mysubject]
%   \bTABLE[frame=off]
% \bTR
%   
\bTD[width=\dimexpr169mm-\backspace\relax]\correspondenceparameter{subject}\eTD
%   \bTD{\tf\correspondenceparameter{date}}\eTD
%  %\bTD{\tf 2011-11-14}\eTD
% \eTR
%   \eTABLE
% \stopsetups
%
% \setuplettersection[subject][alternative=mysubject]

% Method 2: shared name (fiee) for the element with its name (subject) as prefix

\definelettersectionalternative[subject:fiee][renderingsetup=subject:fiee]

\startsetups[subject:fiee]
  \bTABLE[frame=off]
\bTR
  
\bTD[width=\dimexpr169mm-\backspace\relax]\correspondenceparameter{subject}\eTD
  \bTD{\tf\correspondenceparameter{date}}\eTD
 %\bTD{\tf 2011-11-14}\eTD
\eTR
  \eTABLE
\stopsetups

\setuplettersection[subject][alternative=fiee]

% Method 3: using the predefined setups alternative
%
% \startsetups[letter:section:subject]
%   \bTABLE[frame=off]
% \bTR
%   
\bTD[width=\dimexpr169mm-\backspace\relax]\correspondenceparameter{subject}\eTD
%   \bTD{\tf\correspondenceparameter{date}}\eTD
%  %\bTD{\tf 2011-11-14}\eTD
% \eTR
%   \eTABLE
% \stopsetups
%
% \setuplettersection[subject][alternative=setups]

\startletter[subject={Invoice 1}]
...
\stopletter

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] Failure to compile with new date code

2021-10-25 Thread Rik Kabel via ntg-context

Hello all,

The example below continues to work with MkIV, but now fails with the 
most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:


   \define\DraftOf   {Draft of \date}
   \setupinteraction [date={\DraftOf}]
   \starttext
   Fail with LMTX, works with MkIV.
   \stoptext

If the answer is "don't do that" I can find another way to accomplish 
what this does -- not a big problem. But I do want to point out the 
difference in behavior.


--
Rik
___
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 with three-letter month

2008-04-23 Thread richard . stephens
Hello All,

I have consulted the manuals and even the source (core-con.tex) but I 
cannot find a way of getting a three-letter month using the \date command.
For example, I would like to display today's date as 23-Apr-08.  This 
gives a short display suitable for use in a margin, but avoids the 
confusion of American (04-23-08) vs English (23-04-08) ordering when using 
numbers.
Can anyone help?

Thanks.

Richard.

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

-
  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] timestamps with \date

2011-08-01 Thread Wolfgang Schuster

Am 01.08.2011 um 17:15 schrieb Mojca Miklavec:

> Hello,
> 
> I would like to add timestamps to the document. The command \date
> seems handy for that, but it doesn't offer any hour/minute/second
> keyword, or at least I wasn't able to find it in documentation.
> 
> Is there some more convenient way to add current date and time to the 
> document?

\starttext
\startlines
\currenttime
\currenttime[h]
\currenttime[m]
\currenttime[h,{\,:\,},m]
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Datenumber

2007-11-27 Thread Bart Wise
LaTeX has a package called datenumber.  It basically allows you to several 
things: 1) convert a date into a number, 2) add and subtract from that 
number, in essence adding and subtracting days, and 3) converting a date 
number into a date string.  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?
___
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] ConTeXt meeting 2023(!)

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

Hi y’all,

at the latest online meeting as well as within the CG board, we were 
discussing the ConTeXt meeting in 2023, since nothing is planned yet.


[date]

The usual fall date makes it difficult for students and teachers to attend.

We were discussing a date in August (or even July). Would that make a 
difference for you? What would you prefer?


One argument against a date within the summer holidays is that many 
venues are booked for years in advance, but we got at least one offer 
(see below).


[place]

While we were due to go to Eastern Europe again, it looks like Jano as 
well as Mojca are too busy to organize a meeting. (And I’m very sorry if 
I misunderstood!)


Please stand up whoever would like to organize next year’s meeting!

Otherwise I might invite you to Maibach again (where we were in 2017), 
they told me they still have open slots in summer.



Hoping for many more exciting ConTeXt meetings,
Hraban

👉 https://meeting.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] Various ConTeXt Questions

2008-04-03 Thread Peter Münster
On Thu, Apr 03 2008, Edd Barrett wrote:

> Just a way of isolating each of the marco's values that cvs defines. How 
> about:
> 
> ---8<---
> \definecvskeyword[cvsdate][D/M/Y]{$Date$}% will be expanded upon
> commit to something like $Date: 1999/12/23 01:59:22 $
> \starttext
> Last Updated: \cvskeyword[cvsdate]
> \stoptext
> ---8<---
> 
> would produce:
> Last Updated: 1999/12/23 01:59:22

Hello Edd,

Perhaps like this:

% engine=luatex

\startluacode
thirddata = thirddata or { }

-- write the replacement string
-- p: pattern
-- r: replacement pattern
-- s: subject
function thirddata.replace(p, r, s)
s = string.gsub(s, "^.-" .. p .. ".-$", r)
tex.print(s)
end
\stopluacode

\def\definereplacement{\doquadrupleargument\dodefinereplacement}

\def\dodefinereplacement[#1][#2][#3][#4]{\expandafter
  \def\csname #1\endcsname{\ctxlua{thirddata.replace("#2", "#3", "#4")}}}

\definereplacement[cvsdate] [(\%d+)/(\%d+)/(\%d+)] [\%3.\%2.\%1]
  [$Date: 1999/12/23 01:59:22 $]
\definereplacement[cvstime] [(\%d+):(\%d+):(\%d+)] [\%1h \%2m \%3s]
  [$Date: 1999/12/23 01:59:22 $]
\definereplacement[cvsfile] [: (.+),] [\\type{\%1}]
  [$RCSfile: keyword.html,v $]

\starttext
File: \cvsfile, last Updated: \cvsdate\ at \cvstime
\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] \date bug with french

2011-07-04 Thread Romain Diss
Le lundi 04 juillet 2011, Wolfgang Schuster a écrit :
> 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 :)
I tried some different dates and the number is indeed typed twice every time in 
french. I 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!month,\v!space,\v!year" for french).

> core-con.lua:
> 
> function commands.currentdate(str,currentlanguage) -- j and jj obsolete
> ...
> if ordinal and whatordinal then
> --  commands.ordinal(whatordinal,currentlanguage)
> context("%s",converters.ordinal(whatordinal,currentlanguage))
> end
> end
> end
I checked my "core-con.lua" file and there is not the context("%s", ...) 
command in the currentdate function.

Am I missing something ?

-- 
Romain Diss



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

Re: [NTG-context] Problem of displaying a date with a macro

2019-09-09 Thread Otared Kavian
Hi, 

On my installation of lmtx (version 2019.08.20 17:34), as well as mkiv (version 
2019.08.24 22:42 MKIV) the following gives:

\starttext
   \date[d=25,m=10,y=1999]
\stoptext

October 09, 1999. So the month and the year are correct, but not the day.

Best regards: OK

> On 9 Sep 2019, at 16:27, Pablo Rodriguez  wrote:
> 
> On 9/9/19 3:24 PM, Fabrice Couvreur wrote:
>> Hello,
>> I just updated my version of ConTeXt and the bug is still present.
>> Can you confirm ?
> 
> Hi Fabrice,
> 
> I confirm that latest beta (from 2019.09.09 13:44), doesn’t change the
> date in the following sample:
> 
>\starttext
>\date[d=25]
>\stoptext
> 
> I hope it helps,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> 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] problems with t-letter - reference line

2011-12-28 Thread Thomas Engel
Hello,

I have updated my context system (recent beta) and get some problems with the 
t-letter module. (also updated)
I'm not able to get a reference line. See attached example. Are there some 
changes in the interface?

The date is in English, but I have switched the mainlanguage to German.

Thanks!
Thomas

\setuppapersize[A4,A4]
\enableregime[utf]
\mainlanguage[de]
\setupcolors[state=start]

\usemodule[cor-01] % will change

%\setupletteroptions
% [bodyfont=calluna]
\setupletter
  [phone=0123/456789,
   email=max.mus...@mail.me,
   room=414,
   date=\currentdate]

\setupletterstyle
  [phone,email,room,date]
  [separator=: ,
   titlecolor=blue,
   textcolor=red,
   width=4cm]

\setupletterstyle
  [room]
  [titlestyle=bold,
   textstyle=italic]

\setupletterlayer
  [reference]
  [list={phone,email,room,date}] 

\setupletter
[fromname={John Simmons},
fromaddress={Parkstreet 12\\8257 Green Bay}]

\setupletter
[toname={Steve Wilson},
toaddress={Nightstreet 4a\\9183 Cotton Village}]

\setuplettertext
[copy=cc: ,
enclosure=encl: ]

\setupletter
[copy=Copy,
enclosure=Enclosure,
postscript=Postscript]
\starttext
%\letterelement[layer][reference][a]
\setupletterlayer[reference][list=reference]

\startletter
[opening={Dear Mr Wilson,},
subject={Brand new templates for Word},
closing={Best regards},
signature={John Simmons}]

\dorecurse{4}{\input knuth\par}

\stopletter 
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] High level user macro (howto?)

2004-08-10 Thread Peter Münster
On Mon, 28 Jun 2004, Taco Hoekwater wrote:

> The 'key' to the keyval functionality in ConTeXt are two macros called
> \getparameters and \processaction.
> 
> Here is a 'quickstart', assuming you want to define \myzigzag:
> 
> [...]

Hello Taco,
thank you for your 'quickstart'!
I've just tried to apply \getparameters to the \Changes macro on the Wiki
(http://contextgarden.net/Changes). But there is a problem and any help
would be nice.

Here is the new macro:

\def\Changes#1[#2]{%
  \getparameters[CH][#2]% Auteur, Modif, Labels, Date
  \ifnum\RevC=0 \BigTitle \vskip0.5ex \Vfil \startChanges \fi
  \global\advance\RevC by 1 \VL \the\RevC \VL \CHDate \VL \CHModif \VL
  XXX%\In[\CHLabels,\relax] % does not work, but not so important for now
  \VL \CHAuteur \VL\AR\HL}

And later on, the usage of the macro:

\Changes[Date=1/2/2004,Modif=First version,Auteur=Peter]
\Changes[Date=3/4/2004,Modif=Some modifications,Lables={sec:S1,sec:S2},
  Auteur=Peter Münster]
\Changes[Date=5/6/2004,Modif=Some other modifications,Lables={sec:S2},
  Auteur=Peter]

The problem:
the parameter values are not updated in the two last calls of the macro.

Regards, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: strange tabulate

2003-09-25 Thread Patrick Gundlach
Hi,

>> >> > \starttabulate[|l|p|]
>> >> > \HL
>
>\FL

OK, but then the up-to-date (4) is not up-to-date anymore.

Patrick

-- 
You are your own rainbow!
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Why is header page number appearing when I define a header?

2024-03-16 Thread Joel via ntg-context

\starttext
            
\setupheadertexts[Name:~][Date:~__][Date:~__][Name:~]
            \setupfootertexts[][pagenumber][][pagenumber]


    \input knuth

\stoptext



I used this code to create header texts that prints Name / Date on the top and 
page numbers in the bottom corners. But somehow when I define this code, its 
also adding the page number not just to the bottom of the page, but to the top 
of the page as well. How do I remove the page number from the header texts?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


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

2011-02-01 Thread Marco
On 2011-02-01 Mojca Miklavec  wrote:

> 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,–,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


___
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] printing the current date

2021-01-27 Thread Hans Hagen

On 1/27/2021 6:28 PM, Peter Münster wrote:

On Sun, Jan 10 2021, Peter Münster wrote:


\currentdate% same as \date, but I would expect the day of today...


Should I fill a bug-report on the tracker?
Perhaps also for the missing space after \date[]?

Reporting here is faster. Can (lazy me) Wolfgang confirm the issue?

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] MKIV in TL2009

2009-09-22 Thread Arthur Reutenauer
> The included luatex binary is (the date seems wrong?)
>
> Version beta-0.40.6-2009090923 (TeX Live 2009/Arch Linux) luatex.web >= v14240

  The appended date and time in the version number is always the compilation
date, it does not reflect anything about the sources that were used.

> Does this basically mean that in order to use mkiv with TL, I have to  
> manually update the luatex binary?

  Yes, this is the assumption.  It has just been discussed on the TeX Live
list, see http://tug.org/pipermail/tex-live/2009-September/022524.html

Arthur
___
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] Issue with the latest beta of context standalone

2019-01-27 Thread Otared Kavian
Hi Hans,

I can confirm that with version 2019.01.25 20:06, when the main language is set 
to fr, the \date command does not work correctly.
However setting
\mainlanguage[en]
gives the correct behavior of \date, in english, in the example file sent by 
Fabrice.

Also this minimal example gives a wrong date:

\mainlanguage[fr]
 \starttext
  \currentdate
 \stoptext

gives 27 mars 2019 (with two months in advance… :-)
\mainlanguage[en]
or any other language, gives the same error (March 27, 2019).

Best regards: OK

> On 27 Jan 2019, at 13:17, Fabrice Couvreur  
> wrote:
> 
> Hi,
> I just updated context standalone and if I compile the following file, the 
> date does not appear anymore.
> Thank you
> Fabrice
> 
>   \mainlanguage[fr]
> 
>   \setupbackgrounds
> [header]
> [text]
> [frame=off,
>  topframe=off,
>  bottomframe=on,
>  framecolor=,
>  rulethickness=1pt]
> 
>   \defineframed
>[headerframed]
>[frame=off,
> height=fit,
> width=fit]
> 
>\startsetups [headertext]
> \setupheadertexts
> [{
> \startframed [headerframed] [foregroundstyle=bold]
> \getvariable{headertext}{title} 
> n\high{o}\,\getvariable{headertext}{number}
> \stopframed
> }]
> 
> \setupheadertexts
> [{
> \startframed [headerframed] [align=flushleft,foregroundstyle=\ssx]
> \getvariable{headertext}{location}\\
> \getvariable{headertext}{time}
> \stopframed
> }]
> [{
> \startframed [headerframed] 
> [align=flushright,foregroundstyle=\ssx]
> Lycée LA SALLE\\
> 
> \date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
> \stopframed
> }]
> 
>   \stopsetups
> 
>   \setvariable{headertext}{set}{\directsetup{headertext}}
> 
>   \setvariables
>   [headertext]
>   [title={Interrogation écrite},
>number={6},
>day={29},
>month={01},
>year={2019},
>location={Seconde GTE},
>time={55 minutes}]
> 
>\starttext
>  \input Knuth
>\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
> ___

___
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] sections, subsections, indenting, startnarrower, alignment

2009-05-26 Thread Amaël Broustet
Wouldn't be easier to achieve this using section personalized section
numbering ?

Best,
Amaël  


Le vendredi 22 mai 2009 à 14:40 -0700, afsmith a écrit :
> Hi again ntg-context.
> 
> I have been working on my own CV/Resume module. Up until now I've just
> been asking about specific bits of the implementation of this thing I
> want to do, but perhaps that was a mistake as it hasn't really helped
> progress much, so:
> What I am trying to achieve is to define some three-argument command
> to give a section/subject header and a date, and then a block of text.
> The header and date should be on the same line, but aligned in either
> direction (subject aligned left, date aligned right)
> This block of text underneath it should be indented and able to
> include an instance of the same command. Let me try to explain the
> desired output in a little monospaced text diagram..
> 
> |(Subject)___(Date)|
> |__(Subsubject)__(Date)|
> |texttexttexttexttexttexttexttext__|
> |textmoretextmoretextmoretexttext__|
> |__(Subsubject)__(Date)|
> |texttexttexttexttexttextexttext___|
> |textmoretextmoretextmoretexttext__|
> 
> The "subject" and "subsubject" parts don't need to literally use
> "\subject" , for example I also tried to use "\start(description){..."
> for this purpose as well but that failed equally. Just something that
> works reasonably as a section header.
> 
> I promise I have looked in the archives before asking :) for example
> http://www.mail-archive.com/ntg-context@ntg.nl/msg2.html
> http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
> http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
> http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html
> 
> And here is an example of something I was playing with...
> 
> ---
> \definehead[mysubject][subject]
> 
> \defineframed[lrframe][
> width=\localhsize,
> align=normal,
> rulethickness=1pt]
> 
> \setuphead[mysubject][style={\bf}]
> \define[3]\CHRONSUBJ
> {\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
> \startnarrower[left]{#3}\stopnarrower}
> 
> \showframe[text]
> \starttext
> \CHRONSUBJ
>   {This happened from June 08 to June 09}
>   {06/08--06/09}
>   {\CHRONSUBJ
> {This happened from June 08 to December 08}
> {06/08--12/08}
> {\input tufte }
>   \CHRONSUBJ
> {This happened from January 09 to June 09}
> {01/09--06/09}
> {\input zapf }}
> \stoptext
> ---
> 
> -A
> ___
> 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
> ___

___
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] Expansion of date inside \section

2016-06-19 Thread Hans Hagen

On 6/19/2016 10:17 PM, Mojca Miklavec wrote:

Hi,

I'm trying to generate daily reports and wanted to include the date in
bookmarks, but there is some weird (non)expansion going on.

I might just as well switch to lua for certain parts of the document
(like cycling through dates), but I suspect that there must be some
trivial hack to prevent me from getting my sections labeled
    date[y={2016},m={06},d={25}]

\setupinteraction
[state=start]
\placebookmarks
[chapter,section,subsection]
[chapter,section]
\setupinteractionscreen
[option=bookmark]

\def\generatesection#1#2#3{%
\edef\dt{\date[y={#1},m={#2},d={#3}][year,-,mm,-,dd]}
\setupheadertexts[{\dt}][pagenumber]
\section{\dt}
% \externalfigure[#1#2#3.pdf]
}

\starttext
\chapter{Daily files}
\generatesection{2016}{06}{25}
\generatesection{2016}{06}{26}
\stoptext


first of all, did you try

\startsection[title=foo,bookmark=bar]

to separate between typeset text and bookmark (bookmark then can be 
#1-#2-#3)


another possibility is

\enabledirectives[references.bookmarks.preroll]

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] mail merge in mkiv?

2014-11-09 Thread Jaroslav Hajtmar

Hello Pablo.
Here is example of add days in Lua:

\startluacode
x=5 -- add five days
tex.print ('Actual date is :'..os.date('%d.%m.%Y')..'\\crlf')
tex.print ( 'And x days added date is :'.. os.date('%d.%m.%Y',os.time()+ 
x * 24 * 3600))

\stopluacode


Jaroslav Hajtmar



Dne 9.11.2014 22:49, Pablo Rodriguez napsal(a):

On 11/09/2014 03:59 PM, Jaroslav Hajtmar wrote:

Hello Pablo.
The module I created about before 4 years ago, when I wanted to learn to
program in Lua. Therefore, I think that my module is too rudimentary and
not quite optimized. Unfortunately, since I do not now use much Lua, so
I dare not reasonably somehow finish. Before inclusion in third party
modules that would probably have to take some experienced Lua expert and
redo the whole module. For my needs it is enough. I use this module very
often for my practise (I am teacher). Perhaps it helped a little.
Greetings Jaroslav Hajtmar

Many thanks for the module, Jaroslav.

BTW, wouldn’t you know how can I set a \date using Lua that adds x
working days to the current date?

Many thanks for your help,


Pablo


___
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] Letter backaddress

2008-07-09 Thread Olivier Guéry
> I tried myself to find information about letter in france.
>
> http://www.anglaisfacile.com/pages/mie/1lettre.php

It's an ugly one !

> http://www.mdeduchinonais.fr/contenu.php?id_noeud=57&id=11

This one look good. Sometime you can see « Ville et date » (town and
date) under « Coordonnées du recruteurs », like in the link under. But
I just call my grand-father (94 years, from the time they learn how to
write a letter in school) and he told me that the Place and Date are
above !

> http://www.aide-emploi.net/moti.htm

See the « Place and Date » question above.

> http://french.about.com/library/weekly/aa111000.htm

The sender should not be centered in the page.

> http://www.ctan.org/tex-archive/macros/latex/contrib/lettre/

Maybe small diffrence because the creator is from suisse ! But it's a
« reference ».

> http://www.la-lettre.com/

Not realy intresting for us.


Remaning question are alignment. What should be flushed left, right…
The Latex extention create a center environment in the upper left. For
me it looks ugly… I realy prefer it to be left fluched.

Cheers,
Olivier.

-- 
[Message tapé sur un clavier Bépo : http://www.clavier-dvorak.org ]
http://nemolivier.blogspot.com
___
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] about SimpleSlide

2019-07-29 Thread Atsuhito Kohda
Hi all,
SimpleSlide is very useful for novice users so I do use it.
I'm afraid these might be known but I encountered few problems.

When we use a style BigNumber or Embossed, an error occured:
-
tex error   > tex error on line 87 in file
/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-BigNumber.tex:
! Undefined control sequence

l.87 \beginOLDTEX
-
I modified s-simpleslides-BigNumber.tex as follows:
comment out from line #87 to #99
% \beginOLDTEX
...
% \endLUATEX
except line #98
\definefontsynonym  [BigNumberFont] [name:texgyreherosbold]
then it seems to work fine.  But I suspect unconditional
definition is not good so I'd like to know the correct fix.

Another problem is with style Split. Browsing simpleslides.pdf,
date, author, title and page number would be displayed on each
slide but we can't see them in fact except page number.

It seems, e.g. the following in s-simpleslides-Split.tex
fails to get the "date".
draw
\sometxt[simpleslides:sometxt:left]{\getvariable{simpleslides:title}{date}}
I think it is very helpful to see date, title on a slide
so I'd like to know the fix.

Thanks in advance.
Best regards,
Atsuhito Kohda
___
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] about SimpleSlides

2019-07-29 Thread Atsuhito Kohda
Hi all,
SimpleSlides is very useful for novice users so I do use it.
But I encountered few problems which, I'm afraid, might be known.

When we use a style BigNumber (or Embossed), an error occured:
-
tex error   > tex error on line 87 in file
/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-BigNumber.tex:
! Undefined control sequence

l.87 \beginOLDTEX
-
I modified s-simpleslides-BigNumber.tex as follows:
comment out from line #87 to #99
% \beginOLDTEX
...
% \endLUATEX
except line #98
\definefontsynonym  [BigNumberFont] [name:texgyreherosbold]
then it seems to work fine.  But I suspect unconditional
definition is not good so I'd like to know the correct fix.

Another problem is with style Split. Browsing simpleslides.pdf,
I think date, author, title and page number should be displayed
on each slide but, in fact, we can't see them except page number.

It seems, e.g. the following in s-simpleslides-Split.tex
fails to get the "date".
draw
\sometxt[simpleslides:sometxt:left]{\getvariable{simpleslides:title}{date}}
I think it is very helpful to see date, title on a slide
so I'd like to know the fix.

Thanks in advance.
Best regards,
Atsuhito Kohda
___
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] Problem of displaying a date with a macro

2019-08-28 Thread Aditya Mahajan

On Wed, 28 Aug 2019, Fabrice Couvreur wrote:


Hello,
The date display is incorrect : I get day 28 instead of day 2.
Thank you
Fabrice

\defineframed
   [headerframed]
   [frame=off,
height=fit,
width=fit]

 \definecolor[ColorA][0.8(white)]


 \startsetups [headertext]

   \setupheadertexts
 [{\startframed [headerframed]
 [foregroundstyle=bold,background=framewithshadow]
 \getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
 \stopframed}]

   \setupheadertexts
 [{\startframed [headerframed]
 [align=flushleft,foregroundstyle=]
  Lycée LA SALLE, Lille\\
  \getvariable{headertext}{location}
  \stopframed}]

 [{\startframed [headerframed]
 [align=flushright,foregroundstyle=]

\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
 \stopframed}]

 \stopsetups

 \setvariable{headertext}{set}{\directsetup{headertext}}

\startuseMPgraphic{framewithshadow}
path p;
p:=origin--(OverlayWidth,0)--(OverlayWidth,OverlayHeight)--(0,OverlayHeight)--cycle;
fill p shifted (2,-2);
fill p withcolor 0.8white;
draw p;
setbounds currentpicture to p;
\stopuseMPgraphic

\defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}]

\starttext
\setvariables
  [headertext]
  [title={Devoir maison},
   number={6},
   day={02},
   month={09},
   year={2019},
   location={Seconde B},
   time={}]
\input knuth
\stoptext


There was a bug with the \date macro which I had reported a few days ago. 
This appears to be related to that. Should be fixed in the next beta.


Aditya___
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] Re: usage of conversion in \date

2023-11-29 Thread Peter Münster
On Wed, Nov 29 2023, Hans Hagen wrote:

> \setuplanguage[fr][date={day:++,\ ,month,\ ,year}]

Unfortunately this does not work as I need. Only the "1" should be
converted to 1er, not the other numbers.

French is a bit special:
You say "le premier novembre" but not "le un novembre".
You say "le deux novembre" but not "le deuxième novembre".

According to https://wiki.contextgarden.net/Command/date:
"The name suffixes indicate number conversions. Any conversion, either
 built-in or defined by \defineconversion, can be used there."

But it does not seem to work...

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.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] setupinteraction and macroexpansion

2012-06-19 Thread Wolfgang Schuster

Am 19.06.2012 um 10:39 schrieb Andreas Schneider:

> Hello,
> 
> I'm  a bit lost with macro expansion here. I try to use some macros to
> set  the title (and subject) of the PDF document. The attached minimal
> example shows what I want to achieve.
> 
> I tried def, edef, gdef, define, explicit expand, expandoneafter, etc.
> etc.  without  any  success. Whatever I do, the title field in the PDF
> metadata  always  contains  the  raw "\date..." command instead of the
> formatted date.
> 
> Any suggestions?

You can’t use \date (or any other unexpandable command) in an expandable 
context.

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] Out of Date? Up to Date?

2005-11-21 Thread Hans Hagen

David Arnold wrote:

Wanna send me what you have and I'll annotate it with suggestions,  
much as we did with Metafun?


sure, suggestions (goes for all manuals) are welcome,

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


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

2013-07-30 Thread Wolfgang Schuster

Am 31.07.2013 um 03:32 schrieb 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.

This is fixed, there module produced a unwanted space at the begin of the 
reference line which is now gone.

> BTW are the values for the "alternative" key ("example", "e", "c", etc.) 
> documented somewhere?

You can look at the predefined arguments in the old manual which is available 
online: https://bitbucket.org/wolfs/correspondence/downloads.

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] Date with three-letter month

2008-04-23 Thread Taco Hoekwater


[EMAIL PROTECTED] wrote:
> Hello All,
> 
> I have consulted the manuals and even the source (core-con.tex) but I 
> cannot find a way of getting a three-letter month using the \date command.
> For example, I would like to display today's date as 23-Apr-08.  This 
> gives a short display suitable for use in a margin, but avoids the 
> confusion of American (04-23-08) vs English (23-04-08) ordering when using 
> numbers.
> Can anyone help?

These are available (sort of)

   \currentdate[day,--,{\monthshort\normalmonth},--,year] % lowercase

or

   \currentdate[day,--,{\MONTHSHORT\normalmonth},--,year] % uppercase

Best wishes,
Taco

___
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-27 Thread Aditya Mahajan
On Tue, 27 Nov 2007, Bart Wise wrote:

> LaTeX has a package called datenumber.  It basically allows you to several
> things: 1) convert a date into a number, 2) add and subtract from that
> number, in essence adding and subtracting days, and 3) converting a date
> number into a date string.  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?

Have you looked at a lua solution using LuaTeX?

Aditya
___
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] How up-to-date is cont-enp.pdf

2005-09-26 Thread Alexander Lazic

Hi,

i hope it's not a to bad question but how up-to-date is:

cont-enp.pdf => November 12, 2001

and are the .tex-Files available for look and learn ;-)

Just to satisfy my curiosity ;-)

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


[NTG-context] setup for paragraph styles

2015-03-12 Thread mf
Hello,
I'd like to kwnow the commands I should use in ConTeXt to define styles
for paragraphs of text that are not headers/titles nor normal text.
With titles I know I must use:
\definehead[MyTitle][title]
\setuphead[MyTitle][...]

What should I use for texts like subtitles, dates of letters,
signatures? They are "paragraphs" often made by a few words, with a
different alignment, margins, style and vertical space above and below.
For a long quote I've seen that I can use:
\definedelimitedtext[MySpecialText]
\setupdelimitedtext[MySpecialText]

Are those the right commands for my purpose in ConTeXt?

In particular, I'm typesetting XHTML, where all those elements are , ,  and so
on.
An example taken from my xml environment:

...
\startxmlsetups xml:myenv
  \xmlsetsetup{\xmldocument}{*}{-}
  \xmlsetsetup{\xmldocument}{html|body|h3|p|i}{xml:*}
  ...
  \xmlsetsetup{\xmldocument}{p[@class='letter-date']}{xml:p:letter-date}
  ...
\stopxmlsetups
...
\startxmlsetups xml:p:letter-date
  \page[no]\rightaligned{\noindent\xmlflush{#1}}\par\page[no]
\stopxmlsetups
...

Is that the right way or is it better to define and setup a style like
this?
\define_???_[LetterDate]
\setup_???_[LetterDate][
  before=...,
  after=...,
  ...,
]

and use it like this:
\startxmlsetups xml:p:letter-date
  \startLetterDate \xmlflush{#1} \stopLetterDate
\stopxmlsetups

And if it's better like that, what should I write instead of _???_ ?

Thanks,
Massi

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

<    1   2   3   4   5   6   7   8   9   10   >