Re: [NTG-context] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Pierre-François Bonnefoi
Dear Peter,

I run into some problem with font handling in MKIV so I'm stuck in MKII for 
some time.

I've tried the following :
\starttext
\def\ChapterPrefix#1{%
\the\numexpr\number#1/4\relax
}
\setupcombinedlist[content][level=1]
\setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]
\setuplist[section][]
\completecontent
\dorecurse{3}{\chapter{test} \dorecurse{4}{test \page}}
\stoptext

In MKII, I get a Missing number error.
I've isolated the problem : the value given to the \chapterprefix by the 
pagecommand option seems to be a text value and not a numeral value.

I've tried to find a function to translate text to number but I've not find it.

I hope to get some help.

kind regards,
Pierre-François.

Le 30 sept. 2010 à 14:12, Peter Münster a écrit :

 On Thu, Sep 30 2010, Pierre-François Bonnefoi wrote:
 
 I've tried it and I'm sorry to report that this only works in MK IV, that I
 don't use (I've tried but some of my documents don't translate correctly).
 
 Hello,
 
 Your \ChapterPrefix works out of the box with mkiv. Eventually it's easier to
 solve the problems you have with mkiv, than dividing the page number by 4 in
 mkii?  I don't know...
 
 Cheers, Peter
 
 -- 
 Contact information: http://pmrb.free.fr/contact/
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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


Re: [NTG-context] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Hans Hagen

On 3-10-2010 4:16, Pierre-François Bonnefoi wrote:

Dear Peter,

I run into some problem with font handling in MKIV so I'm stuck in MKII for 
some time.

I've tried the following :
\starttext
\def\ChapterPrefix#1{%
\the\numexpr\number#1/4\relax
}
\setupcombinedlist[content][level=1]
\setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]


manipulating the number that way is just a lucky guess: pagecommand (and 
numbercommand) get some text passes and it might not even be a number, 
as it all depends on conversion and special rendering


-
  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] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Pierre-François Bonnefoi
So, I've to forget it...
I'm a little bit disappointed that it's not possible.

But the waiting time for my students to get the lecture notes is over : I'll 
give them the handout with no page numbers.

Thank you for your support.

I hope that I could use MKIV in near future,
kind regards,
Pierre-François.

Le 3 oct. 2010 à 17:12, Hans Hagen a écrit :

 On 3-10-2010 4:16, Pierre-François Bonnefoi wrote:
 Dear Peter,
 
 I run into some problem with font handling in MKIV so I'm stuck in MKII for 
 some time.
 
 I've tried the following :
 \starttext
 \def\ChapterPrefix#1{%
 \the\numexpr\number#1/4\relax
 }
 \setupcombinedlist[content][level=1]
 \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]
 
 manipulating the number that way is just a lucky guess: pagecommand (and 
 numbercommand) get some text passes and it might not even be a number, as it 
 all depends on conversion and special rendering
 

-- 
Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
83, rue d'Isle  |  Mrs. Peel, we're needed...
87000 Limoges - FRANCE  | The Avengers.

___
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] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Hans Hagen

On 3-10-2010 5:25, Pierre-François Bonnefoi wrote:

So, I've to forget it...
I'm a little bit disappointed that it's not possible.

But the waiting time for my students to get the lecture notes is over : I'll 
give them the handout with no page numbers.


you can try to use \structurelistrealpagenumber which is set for each entry

-
  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] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Pierre-François Bonnefoi
But this function \structurelistrealpagenumber is not defined in MKII.

ok, ok I've to go to MKIV some day ;-)

Le 3 oct. 2010 à 17:34, Hans Hagen a écrit :

 On 3-10-2010 5:25, Pierre-François Bonnefoi wrote:
 So, I've to forget it...
 I'm a little bit disappointed that it's not possible.
 
 But the waiting time for my students to get the lecture notes is over : I'll 
 give them the handout with no page numbers.
 
 you can try to use \structurelistrealpagenumber which is set for each entry
 
 -
  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] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Wolfgang Schuster

Am 29.09.2010 um 13:13 schrieb Pierre-François Bonnefoi:

 Hello,
 
 I'use extensively context to write my lecture notes and for all of my 
 printing needs.
 
 For my students, I've made some lecture presentations in color, and I print 
 them in blackwhite, with four pages on one page for the handout.
 
 I would like to compute a correct Table of contents according to the handout 
 : so to divide the current page number by four to get a correct page number 
 for the handout.
 
 \def\ChapterPrefix#1{\the\numexpr#1/4 \relax}
 \setupcombinedlist[content][level=1]
 \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]
 
 That doesn't work, and I've some difficulties to figure how computation is 
 performed in e-TeX...
 
 Could you help me to resolve this issue ?

A very dirty hack:

\setuppapersize[A6][A6]

\let\normaltranslatednumber\translatednumber

\def\translatednumber[#1]%
  {\number\numexpr(\normaltranslatednumber[#1]+1)/4\relax}
  
\starttext

\completecontent

\dorecurse{12}
  {\chapter{Chapter #1}
   \dorecurse{#1}{\input knuth\par}}

\stoptext

Wolfgang

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

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


Re: [NTG-context] [NTG-Context] How to compute correct page number for handout

2010-10-03 Thread Pierre-François Bonnefoi
You saved my day !

Le 3 oct. 2010 à 17:52, Wolfgang Schuster a écrit :

 
 Am 29.09.2010 um 13:13 schrieb Pierre-François Bonnefoi:
 
 Hello,
 
 I'use extensively context to write my lecture notes and for all of my 
 printing needs.
 
 For my students, I've made some lecture presentations in color, and I print 
 them in blackwhite, with four pages on one page for the handout.
 
 I would like to compute a correct Table of contents according to the handout 
 : so to divide the current page number by four to get a correct page number 
 for the handout.
 
 \def\ChapterPrefix#1{\the\numexpr#1/4 \relax}
 \setupcombinedlist[content][level=1]
 \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]
 
 That doesn't work, and I've some difficulties to figure how computation is 
 performed in e-TeX...
 
 Could you help me to resolve this issue ?
 
 A very dirty hack:
 
 \setuppapersize[A6][A6]
 
 \let\normaltranslatednumber\translatednumber
 
 \def\translatednumber[#1]%
  {\number\numexpr(\normaltranslatednumber[#1]+1)/4\relax}
 
 \starttext
 
 \completecontent
 
 \dorecurse{12}
  {\chapter{Chapter #1}
   \dorecurse{#1}{\input knuth\par}}
 
 \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
 ___

___
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] [NTG-Context] How to compute correct page number for handout

2010-09-30 Thread Hans Hagen

On 29-9-2010 1:13, Pierre-François Bonnefoi wrote:

Hello,

I'use extensively context to write my lecture notes and for all of my printing 
needs.

For my students, I've made some lecture presentations in color, and I print them in 
blackwhite, with four pages on one page for the handout.

I would like to compute a correct Table of contents according to the handout : 
so to divide the current page number by four to get a correct page number for 
the handout.

\def\ChapterPrefix#1{\the\numexpr#1/4 \relax}
\setupcombinedlist[content][level=1]
\setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]

That doesn't work, and I've some difficulties to figure how computation is 
performed in e-TeX...

Could you help me to resolve this issue ?

\starttext

\setupuserpagenumber[way=bychapter]

\dorecurse{3}{\chapter{test} \dorecurse{4}{test \page}}

\stoptext



-
  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] [NTG-Context] How to compute correct page number for handout

2010-09-30 Thread Pierre-François Bonnefoi
Dear Hans,

Thank you to answer my question.

I've tried it and I'm sorry to report that this only works in MK IV, that I 
don't use (I've tried but some of my documents don't translate correctly).

From my point of view, I don't know if it is the correct answer because I want 
to get some altered page number, and I think that I have to alter them 
artificially, only for display purpose.

best regards,
Pierre-François Bonnefoi.

Le 30 sept. 2010 à 09:47, Hans Hagen a écrit :

 On 29-9-2010 1:13, Pierre-François Bonnefoi wrote:
 Hello,
 
 I'use extensively context to write my lecture notes and for all of my 
 printing needs.
 
 For my students, I've made some lecture presentations in color, and I print 
 them in blackwhite, with four pages on one page for the handout.
 
 I would like to compute a correct Table of contents according to the handout 
 : so to divide the current page number by four to get a correct page number 
 for the handout.
 
 \def\ChapterPrefix#1{\the\numexpr#1/4 \relax}
 \setupcombinedlist[content][level=1]
 \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix]
 
 That doesn't work, and I've some difficulties to figure how computation is 
 performed in e-TeX...
 
 Could you help me to resolve this issue ?
 \starttext
 
 \setupuserpagenumber[way=bychapter]
 
 \dorecurse{3}{\chapter{test} \dorecurse{4}{test \page}}
 
 \stoptext
 
 
 
 -
  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
 ___

-- 
Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
83, rue d'Isle  |  Mrs. Peel, we're needed...
87000 Limoges - FRANCE  | The Avengers.

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