[NTG-context] PDF output routine in lmtx

2019-04-29 Thread Christian Prim
Hi

in lmtx the pdf output routine has changed afaik. I just wanted to report,
that in lmtx our printer/copier (Ricoh 8200S or Ricoh 8110S) doesn't print
any character. A standard document as the MWE prints well under mkiv. Under
lmtx, there is no output (blank sheet). In a document with a tikz-figure,
the tikz-figure (without labels, as they are text) is printed. Something
with text output must have changed, that makes it incompatible with the
copier at our school. I tried to print with different drivers and also used
the printers interface (direct print via usb-stick). No success. Are they
some flags I can play with (like other pdf-version or so) to find a
solution to this problem? This "bug" prevents me to use lmtx at out school.

MWE:

\starttext
That is a test.
\stoptext

Of course there is no problem with the preview and the output works on a
HP-Printer.

Many thanks for all suggestions!

Christian
___
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] PDF output routine in lmtx

2019-04-29 Thread Christian Prim
Hi

converting the document to ps and back to pdf works (pdf2ps and ps2pdf).
But I think there must be a simpler solution...

Christian

Am Mo., 29. Apr. 2019 um 11:46 Uhr schrieb Christian Prim <
christian.p...@gmx.ch>:

> Hi
>
> in lmtx the pdf output routine has changed afaik. I just wanted to report,
> that in lmtx our printer/copier (Ricoh 8200S or Ricoh 8110S) doesn't print
> any character. A standard document as the MWE prints well under mkiv. Under
> lmtx, there is no output (blank sheet). In a document with a tikz-figure,
> the tikz-figure (without labels, as they are text) is printed. Something
> with text output must have changed, that makes it incompatible with the
> copier at our school. I tried to print with different drivers and also used
> the printers interface (direct print via usb-stick). No success. Are they
> some flags I can play with (like other pdf-version or so) to find a
> solution to this problem? This "bug" prevents me to use lmtx at out school.
>
> MWE:
>
> \starttext
> That is a test.
> \stoptext
>
> Of course there is no problem with the preview and the output works on a
> HP-Printer.
>
> Many thanks for all suggestions!
>
> Christian
>
___
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] PDF output routine in lmtx

2019-04-29 Thread Hans Hagen

On 4/29/2019 11:46 AM, Christian Prim wrote:

Hi

in lmtx the pdf output routine has changed afaik. I just wanted to 
report, that in lmtx our printer/copier (Ricoh 8200S or Ricoh 8110S) 
doesn't print any character. A standard document as the MWE prints well 
under mkiv. Under lmtx, there is no output (blank sheet). In a document 
with a tikz-figure, the tikz-figure (without labels, as they are text) 
is printed. Something with text output must have changed, that makes it 
incompatible with the copier at our school. I tried to print with 
different drivers and also used the printers interface (direct print via 
usb-stick). No success. Are they some flags I can play with (like other 
pdf-version or so) to find a solution to this problem? This "bug" 
prevents me to use lmtx at out school.


MWE:

\starttext
That is a test.
\stoptext


Any font?

Of course there is no problem with the preview and the output works on a 
HP-Printer.

hard to say ... we output rather straightforward pdf 1.7

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] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 10:52:59AM +0200, Bahr Rudolf wrote:
> On Sun, Apr 28, 2019 at 11:12:43PM +0200, Hans Hagen wrote:
> > On 4/28/2019 8:10 PM, Rudolf Bahr wrote:
> > > 
> > > Dear list,
> > > 
> > > I'm getting unexplainable artefacts in the pdf-output.
> > > 
> > > My MWE is:
> > > 
> > > --
> > > \starttext
> > > 
> > > \externalfigure
> > >  [input.png]
> > >  [width=100mm]
> > > 
> > > \stoptext
> > > --
> > > 
> > > I append the output "MWE.pdf" and the input-figure "input.png" for 
> > > comparison.
> > > 
> > > I'm experiencing the artefacts with some figures which are all several 
> > > years old.
> > > Until now it never happened in conTeXt programs. Because I installed a 
> > > new OS
> > > (LinuxMint) on my workstation at the same time I tried 3 pdfviewers 
> > > (okular,
> > > evince, xpdf) all with the same result.
> > 
> > different inclusion code
> > 
> > > I'm using LuaMetaTeX, Version 2.00.0,
> > > ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15
> > > 
> > > Please, do you have any idea what could be the reason?
> > no problems here .. can you update?
> > 
> > Hans
> 
> 
> Sorry, but even after updating to
> ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
> I'm experiencing the same artefacts as before.
> 
> Please, what means "different inclusion code"?
> 


Interesting news!
After having changed the png-Format of the external figure to ".tiff"-Format by
gimp2.10 the artefacts have gone!

Rudolf
___
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] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Hans Hagen

On 4/29/2019 10:52 AM, Rudolf Bahr wrote:


Sorry, but even after updating to
ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
I'm experiencing the same artefacts as before.

Please, what means "different inclusion code"?

all in lua

anyway, as the png test suite passes ok the question is what makes your 
image different ... here it looks ok when included on windows64 bit and 
linux 64 bit


>gm identify input.png
input.png PNG 334x168+0+0 DirectClass 8-bit 29.6Ki 0.000u 0m:0.00s
gm identify: iCCP: CRC error (input.png).

maybe a bad image?

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] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Rudolf Bahr
On Sun, Apr 28, 2019 at 11:12:43PM +0200, Hans Hagen wrote:
> On 4/28/2019 8:10 PM, Rudolf Bahr wrote:
> > 
> > Dear list,
> > 
> > I'm getting unexplainable artefacts in the pdf-output.
> > 
> > My MWE is:
> > 
> > --
> > \starttext
> > 
> > \externalfigure
> >  [input.png]
> >  [width=100mm]
> > 
> > \stoptext
> > --
> > 
> > I append the output "MWE.pdf" and the input-figure "input.png" for 
> > comparison.
> > 
> > I'm experiencing the artefacts with some figures which are all several 
> > years old.
> > Until now it never happened in conTeXt programs. Because I installed a new 
> > OS
> > (LinuxMint) on my workstation at the same time I tried 3 pdfviewers (okular,
> > evince, xpdf) all with the same result.
> 
> different inclusion code
> 
> > I'm using LuaMetaTeX, Version 2.00.0,
> > ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15
> > 
> > Please, do you have any idea what could be the reason?
> no problems here .. can you update?
> 
> Hans


Sorry, but even after updating to
ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
I'm experiencing the same artefacts as before.

Please, what means "different inclusion code"?

Rudolf
___
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] underscore hyphenation in LMTX

2019-04-29 Thread Hans Hagen

On 4/27/2019 1:51 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

 \startluacode
 function document.addfunnyhyphen(tfmdata)
 local underscore = utf.byte("_")
 local char   = tfmdata.characters[underscore]
 tfmdata.characters[0xFE000]   = {
 width= 0,
 height   = 0,
 depth= 0,
 commands = {
 { "right", -char.width },
 { "down", char.depth },
 { "slot", 1, underscore },
 }
 }
 end

 utilities.sequencers.appendaction("aftercopyingcharacters","after",
 "document.addfunnyhyphen")
 \stopluacode

 \definehyphenationfeatures
   [whatever]
   [righthyphenchar="FE000]

 \setuphyphenation[method=traditional]
 \sethyphenationfeatures[strict, whatever]

 \setuppapersize[A10, lanscape]

 \starttext
 \startmakeup[standard]
 \hsize\zeropoint
 \tt definebodyfont
 \stopmakeup
 \stoptext

I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
but not with latest LMTX (LuaTeX-2.0).

Am I missing something here?


use slot '0' instead of '1' (i'll catch it anyway)

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] PDF output routine in lmtx

2019-04-29 Thread Hans Hagen

On 4/29/2019 4:05 PM, Christian Prim wrote:
Thanks for your answer, Hans. I checked standard (modern) and 
gyre-palatino font. Both give no output. Did pdf-Version change between 
mkiv and lmtx? I will try to find the problem in the pdf-file, if I can.

you can run with

\nopdfcompression

i suspect that that printer is sensitive for some pdf font flag or so 
(not sure what rip is in it)


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] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 01:18:04PM +0200, Hans Hagen wrote:
> On 4/29/2019 10:52 AM, Rudolf Bahr wrote:
> 
> > Sorry, but even after updating to
> > ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
> > I'm experiencing the same artefacts as before.
> > 
> > Please, what means "different inclusion code"?
> all in lua
> 
> anyway, as the png test suite passes ok the question is what makes your
> image different ... here it looks ok when included on windows64 bit and
> linux 64 bit
> 
> >gm identify input.png
> input.png PNG 334x168+0+0 DirectClass 8-bit 29.6Ki 0.000u 0m:0.00s
> gm identify: iCCP: CRC error (input.png).
> 
> maybe a bad image?


Perhaps. Or generated by older software. Though my GraphicsMagick (1.3.28):
"gm identify input.png" doesn't tell me anything about a "CRC error":
input.png PNG 334x168+0+0 DirectClass 8-bit 29.6Ki 0.000u 0m:0.03s

Anyway, at the beginning of a new book there are 10 of such images with 
artefacts.
I can handle the problem by converting them to .tiff-pictures. As long as I 
shall
have enough storage in my host :-), for me all will be ok.

Thank you!

Rudolf
___
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] PDF output routine in lmtx

2019-04-29 Thread Christian Prim
Thanks for your answer, Hans. I checked standard (modern) and gyre-palatino
font. Both give no output. Did pdf-Version change between mkiv and lmtx? I
will try to find the problem in the pdf-file, if I can.

Thanks
Christian

Am Mo., 29. Apr. 2019 um 13:21 Uhr schrieb Hans Hagen :

> On 4/29/2019 11:46 AM, Christian Prim wrote:
> > Hi
> >
> > in lmtx the pdf output routine has changed afaik. I just wanted to
> > report, that in lmtx our printer/copier (Ricoh 8200S or Ricoh 8110S)
> > doesn't print any character. A standard document as the MWE prints well
> > under mkiv. Under lmtx, there is no output (blank sheet). In a document
> > with a tikz-figure, the tikz-figure (without labels, as they are text)
> > is printed. Something with text output must have changed, that makes it
> > incompatible with the copier at our school. I tried to print with
> > different drivers and also used the printers interface (direct print via
> > usb-stick). No success. Are they some flags I can play with (like other
> > pdf-version or so) to find a solution to this problem? This "bug"
> > prevents me to use lmtx at out school.
> >
> > MWE:
> >
> > \starttext
> > That is a test.
> > \stoptext
>
> Any font?
>
> > Of course there is no problem with the preview and the output works on a
> > HP-Printer.
> hard to say ... we output rather straightforward pdf 1.7
>
> 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
___


Re: [NTG-context] How to write a wiki page?

2019-04-29 Thread Henning Hraban Ramm
Hi Rudolf,

it’s a wiki, i.e. you write directly into the system.
You’re welcome to announce the new page here, then someone can look over it.

First you need to register an account:
https://wiki.contextgarden.net/index.php?title=Special:CreateAccount

Then you can create a new page, e.g. 
https://wiki.contextgarden.net/index.php?title=Fraktur_fonts=edit

Some hints about wiki syntax etc. you can find here:
https://wiki.contextgarden.net/ConTeXt_wiki:Editing

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

Am 2019-04-24 um 16:44 schrieb Rudolf Bahr :

> 
> Hello All!
> 
> I'd like to write a wiki page on special Fraktur fonts, but I don't know how 
> to begin
> technically. Are there rules? Certanly, but where? To whom would I send the 
> result to
> correct it with respect to format, ConTeXt commands, English language, 
> bringing it into
> the ConTeXt wiki and so on?
> 
> Greetings,
> 
> Rudolf
> ___
> 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] How to write a wiki page?

2019-04-29 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 05:55:14PM +0200, Henning Hraban Ramm wrote:
> Hi Rudolf,
> 
> it’s a wiki, i.e. you write directly into the system.
> You’re welcome to announce the new page here, then someone can look over it.
> 
> First you need to register an account:
> https://wiki.contextgarden.net/index.php?title=Special:CreateAccount
> 
> Then you can create a new page, e.g. 
> https://wiki.contextgarden.net/index.php?title=Fraktur_fonts=edit
> 
> Some hints about wiki syntax etc. you can find here:
> https://wiki.contextgarden.net/ConTeXt_wiki:Editing
> 
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
> 



Hello Hraban!

Not only a very good introduction, but you even began to install the first step 
to my
future wiki page. Thank you!

Rudolf
___
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] Lua error in latest beta?

2019-04-29 Thread Alan Bowen
When I process files using the latest standalone  ConTeXt  ver: 2019.04.29
08:52 MKIV beta  fmt:  LuaTeX, Version 1.10.0 (TeX Live 2019)), I now get
the following error message:

lua error   > lua error on line 8 in file env_Brill-01.tex:


...eXt/tex/texmf-context/tex/context/base/mkiv/font-oup.lua:1317: bad
argument #1 to 'concat' (table expected, got number)

The error log is as follows:

return {
 ["filename"]="env_Brill-01.tex",
 ["lastcontext"]="\
\\font_helpers_low_level_define ...nsize }{\\m_font_designsize
}\\scaledfontmode \
  \\relax \\ifcase
\\scaledfont...\
\\font_fallbacks_clone_unique ...w_level_define
{#1}\\v_font_identifier_basic \
  \\csname
\\v_font_identifier...\
l.8 }\
\
\\font_fallbacks_prepare #1->\\clf_fontcollectionprepare {#1}\
  \
\\font_fallbacks_prepare_indeed ... \\lastrawfontcall
\\font_fallbacks_prepare #1\
  \\endgroup \
 ...nt_fallbacks_prepare_indeed \\m_font_fallbacks \
  \\fi \\fi \
...\
l.215 \\setupbodyfont[mainface, 10pt]\
   ",
 
["lastluaerror"]="...eXt/tex/texmf-context/tex/context/base/mkiv/font-oup.lua:1317:
bad argument #1 to 'concat' (table expected, got number)",
 ["lasttexerror"]="?",
 ["linenumber"]=8,
 ["luaerrorline"]="1317",
 ["offset"]=10,
}

This files process as they should with earlier versions. I will try to
produce an mwe if needed but hope that it is not.

Alan
___
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] Lua os.date() localization in context

2019-04-29 Thread Romain Diss
Hi all,

I would like to print the day name of a date in french using my current
locale.

In lua I can do:
> os.setlocale('fr_FR.UTF-8',all)
> print(os.date("%A"))

But in a cld document it doesn't work. Context complains about using
"os.locale in a supposedly locale neutral enviroment" and it prints the
day name in english.

How can I translate the day names without hardcoding everything?

Thanks in advance.

Best.

-- 
Romain Diss
___
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] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Alan Braslau
On Mon, 29 Apr 2019 13:18:04 +0200
Hans Hagen  wrote:

> anyway, as the png test suite passes ok the question is what makes your 
> image different ... here it looks ok when included on windows64 bit and 
> linux 64 bit

Your very own .png image and MWE works fine here on OSX, freeBSD, and linux.

Alan
___
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] registers: setting pageleft parameter by index term

2019-04-29 Thread mf

Hello list, please consider this MWE:

\definenumber[p]
\setnumber[p][1]
\def\PageLeft{ p.~}
\def\TextCommand#1{\getnumber[p] 
#1\doif{\rawcountervalue[p]}{2}{\def\PageLeft{ P.~}}\incrementnumber[p]}

\setupindex[n=1,pageleft=\PageLeft,pageright=,textcommand=\TextCommand]
\starttext
Foo\index{foo}.
\page
Bar\index{bar}.
\page
Baz\index{baz}.
\page
\placeindex
\stoptext

The pageleft parameter of \setupindex (\setupregister) is normally set 
to " p.~", but it gets redefined to " P.~" for the second term in the 
index ("baz").


Here i'm using a counter and i check when it is 2, but i'd like to check 
if the term is "baz" (and i don't know how to do that test).


If you use deeptextcommand instead of textcommand, the pageleft 
parameter can't be redefined.


The following variation compiles, but it does not work, because pageleft 
is always " p.~":


\definenumber[p]
\setnumber[p][1]
\def\PageLeft{ p.~}
\def\TextCommand#1{\getnumber[p] 
#1\doif{\rawcountervalue[p]}{2}{\def\PageLeft{ P.~}}\incrementnumber[p]}

\setupindex[n=1,pageleft=\PageLeft,pageright=,deeptextcommand=\TextCommand]
\starttext
Foo\index{foo}.
\page
Bar\index{bar}.
\page
Baz\index{baz}.
\page
\placeindex
\stoptext

In my setup i must use deeptextcommand, and i want to set the pageleft 
and pageright parameters to a different value for some particular terms 
of the index.


Since the argument passed to deeptextcommand is not the text of the term 
(it's actually an id used to retrieve a much longer text), i can 
discriminate the terms by their id, but i can't setup pageleft and 
pageright accordingly from the command specified by deeptextcommand.


On the other hand, textcommand would let me set pageleft and pageright, 
but its argument is not pure text, and i don't know how to get the id 
from it.


How can i solve this problem?

Thanks,

Massimiliano

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