Re: [NTG-context] Problem with PocketDiary

2012-09-24 Thread Marcin Borkowski
Dnia 2012-09-23, o godz. 10:42:08
Wolfgang Schuster wolfgang.schus...@gmail.com napisał(a):

 It’s a bug in the pocketdiayry code when the \color command is used.
 
 This snippet from the code shows two problems.
 
   context.bTD({style=red})context(d) context(~)
 context.labeltext(n) context(~\\color[black]) context.labeltext(f)
 context.eTD()
 
 1. The color for the table cell is set with “style=red” but the
 correct setting is “color=red”. Even though it’s wrong the output is
 correct because context has a \red command which colors the content
 of the current group red.
 
 2. The \color command takes a argument, e.g.
 \color[colorname]{text} but here it’s used like a color switch
 (e.g. \red) which is active till the end of the group. Changing this
 will make the error message disappear.

Thanks a lot!

I changed the above line to

context.bTD({color=red})context(d) context(~) context.labeltext(n)
context(~\\color[black]{) context.labeltext(f) context(})
context.eTD()

and it seems to work.  May I ask for changing it in the official
source, too?

 
 Wolfgang
 

Best,

-- 
Marcin Borkowski
http://mbork.pl
___
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 PocketDiary

2012-09-24 Thread Wolfgang Schuster

Am 24.09.2012 um 15:21 schrieb Marcin Borkowski mb...@wmi.amu.edu.pl:

 Dnia 2012-09-23, o godz. 10:42:08
 Wolfgang Schuster wolfgang.schus...@gmail.com napisał(a):
 
 It’s a bug in the pocketdiayry code when the \color command is used.
 
 This snippet from the code shows two problems.
 
  context.bTD({style=red})context(d) context(~)
 context.labeltext(n) context(~\\color[black]) context.labeltext(f)
 context.eTD()
 
 1. The color for the table cell is set with “style=red” but the
 correct setting is “color=red”. Even though it’s wrong the output is
 correct because context has a \red command which colors the content
 of the current group red.
 
 2. The \color command takes a argument, e.g.
 \color[colorname]{text} but here it’s used like a color switch
 (e.g. \red) which is active till the end of the group. Changing this
 will make the error message disappear.
 
 Thanks a lot!
 
 I changed the above line to
 
 context.bTD({color=red})context(d) context(~) context.labeltext(n)
 context(~\\color[black]{) context.labeltext(f) context(})
 context.eTD()
 
 and it seems to work.  May I ask for changing it in the official source, 
 too?

I would go with

  context.color( {black}, function() context.labeltext(f) end )

or another method which is described in the CLD manual.

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] Problem with PocketDiary

2012-09-23 Thread Wolfgang Schuster

Am 22.09.2012 um 16:30 schrieb Marcin Borkowski mb...@wmi.amu.edu.pl:

 Hello,
 
 I have just installed a fresh Standalone and t-pocketdiary, and
 compilation of the example file (from PocketDiary's docs) results in an
 error.  (Below I enclose the source and log files.)  What is going
 wrong?

It’s a bug in the pocketdiayry code when the \color command is used.

This snippet from the code shows two problems.

  context.bTD({style=red})context(d) context(~) context.labeltext(n) 
context(~\\color[black]) context.labeltext(f) context.eTD()

1. The color for the table cell is set with “style=red” but the correct setting 
is “color=red”. Even though it’s wrong the output is correct because context 
has a \red command which colors the content of the current group red.

2. The \color command takes a argument, e.g. \color[colorname]{text} but 
here it’s used like a color switch (e.g. \red) which is active till the end of 
the group. Changing this will make the error message disappear.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Problem with PocketDiary

2012-09-22 Thread Marcin Borkowski
Hello,

I have just installed a fresh Standalone and t-pocketdiary, and
compilation of the example file (from PocketDiary's docs) results in an
error.  (Below I enclose the source and log files.)  What is going
wrong?

TIA


 tex file
\usemodule[pocketdiary]

% Setup the bodyfont
\setupbodyfont[palatino,rm,9pt]

% Setup the language used: en, de, nl, it, fr interface is available
\mainlanguage[en]

% Setup the variables for the calculations

\setvariables
[PocketDiary]
[Year=2011,
Week=16,
Day=5,
Month=4,
Nextyear=yes]

% Setup the personal organizer: 
\setvariables
[PocketDiaryLayout]
[Page1=Lost-Returnto,
Page2=Week,
Page3=Day,
Page4=Weeknext,
Page5=Monthcurrent,
Page6=Yearcalendar,
Page7=Caro,
Page8=Contact]

% Setup variables with personal information
\setvariables
[PocketDiaryAddress]
[Familyname=Yourfamiliname,
Forename=Yourname,
Street=Yourstreet xx
Zipcode=Yourzip
City=Yourcity,
Country=Yourcountry
Phone=+Yourphonenumber
Mobile=+Yourmobilenumber,
E-mail=Your-e-mail,
Web=Yourwebsite]

% Setup your personal footer
\setvariables
[PocketDiaryFooter]
[Lefttext=PocketDiary,
 Centertext=\pagenumber,
 
Righttext={\getvariable{PocketDiaryAddress}{Forename},{\currentdate[year]}}]

% Setup your favorite colors

\setvariables
[PocketDiaryColors]
[Separatorline=blue,
Gridline={s=.75}]

% Do the typesetting
\starttext
\setups{PocketDiary}
\stoptext
 end tex file


 log file
(/home/marcin/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2012.09.21 20:58 MKIV  fmt: 2012.9.22  int:
english/english

system   cont-new.mkiv loaded
(/home/marcin/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
fontslatin modern fonts are not preloaded
languageslanguage en is active
(2012-09-22.tex
resolversmodules  loaded: 'pocketdiary'
(/home/marcin/context/tex/texmf-modules/tex/context/third/pocketdiary/t-pocketdiary.tex+
 
/home/marcin/context/tex/texmf-modules/tex/context/third/pocketdiary/t-calendar.lua
loading  ConTeXt User Module / PocketDiary
(/home/marcin/context/tex/texmf-context/tex/context/base/symb-imp-mvs.mkiv)
fontssymbols  loaded: library 'mvs'
colors   rgb color space is supported
colors   cmyk color space is supported
)
fontstypescripts  unknown: library 'loc'
(/home/marcin/context/tex/texmf-context/tex/context/base/type-imp-texgyre.mkiv){/home/marcin/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-px.map}
fontsvirtual math  the mapping is incomplete for 'pxmath'
at 5pt
{/home/marcin/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}

% begin of command line arguments
%
% script   = true
% fulljobname  = ./2012-09-22.tex
% input= ./2012-09-22.tex
% no-parse-first-line  = true
% kindofrun= 1
% currentrun   = 1
%
% end of command line arguments

% begin of command line files
%
% 1  ./2012-09-22.tex
%
% end of command line files

 (virtual://buffer.Lost-Returnto.1)
backend  xmp  using file
 '/home/marcin/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
 system   1.1 arranged at 1 (virtual://buffer.Week.2
! Missing number, treated as zero.

system   tex  error on line 147 in file
virtual://buffer.Week.2: Missing number, treated as zero ...

empty file

to be read again 
   \3532:2   
argument ...n \tabl_ntb_get_aut \c_tabl_ntb_col 
  \relax \ifdim
\localwidth ... \secondoftwoarguments #1#2-#2
  
\tabl_ntb_cell_process ...\tabl_tnb_cell_finalize 
  }}\scratchdimen
\tabl_ntb_... inserted text ...column_next \tabl_ntb_pass 6 2 
  \tabl_ntb_column_next
\tab... \tabl_ntb_flush_content ...p \cr \the \t_tabl_ntb 
  \dostoptagged \egroup
\dos... ...
l.13 ...y}{Week}}{\getvariable{PocketDiary}{Year}}
  
? x

system   files  start used files

used files  1: filename=cont-yes.mkiv | filetype=tex |
foundname=/home/marcin/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
| usedmethod=database used files  2: filename=cont-new.mkiv |
filetype=tex |
foundname=/home/marcin/context/tex/texmf-context/tex/context/base/cont-new.mkiv
| usedmethod=database used files  3: filename=lang-us.lua |
filetype=lua |
foundname=/home/marcin/context/tex/texmf-context/tex/context/patterns/lang-us.lua
| usedmethod=database used