Re: [NTG-context] pagenumbers in metafun

2010-09-28 Thread Thomas A. Schmitz

On Sep 20, 2010, at 10:31 AM, Thomas A. Schmitz wrote:
 
 Here's a question that has been on my mind for a while now and that I would 
 have loved to ask Taco and Hans at Brejlov: we now have shiny new 
 \userpagenumber and \realpagenumber etc. Is any of these available and 
 accessible from within Metafun? Right now, in a StartPage -- StopPage 
 environment, I use 
 NOfPages and PageNumber, but it would be convenient if we had access to 
 userpagenumber as well (so the number can be reset etc.)
 
Here's what you get when you ask a question without testing first! I'm very 
embarrassed to say that this question is bovine excrements. The metafun macro 
PageNumber does indeed refer to \userpagenumber, so this part is answered. 
However, there's still something I would like to know. Consider the following 
example: 

\startuseMPgraphic{back}
  StartPage ;
  z[1] = center Page ;
  label.bot(textext(\switchtobodyfont[30pt]\startcolor[orange] 
  decimal PageNumber  \stopcolor\ -- \startcolor[darkblue]  decimal
  NOfPages  \stopcolor), z[1]) ; 
StopPage ;
\stopuseMPgraphic

\defineoverlay
  [pageback]
  [\useMPgraphic{back}]

\setupbackgrounds[page][background=pageback]

\setupuserpagenumber[state=start] 

\starttext

\dorecurse{8}{\userpagenumber \input knuth\page}

\resetuserpagenumber

\dorecurse{8}{\userpagenumber \input knuth\page}

\stoptext

The PageNumber does the right thing: goes from 1 to 8, then is reset to 1 
again. But NOfPages results in 16, the total number. Is there any way I can 
have a metafun macro the highest page number before \userpagenumber was reset?

Thanks, and best

Thomas

___
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] insert pagebreak in toc (MkIV)

2010-09-28 Thread Steffen Wolfrum
Hi,

somewhere I saw the code how to insert a pagebreak in the table of content.
I remember it somehow was related to the new structure model (one could specify 
after which sections the table should break).

But I don't remember how it was done 

Could someone help, please?

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


Re: [NTG-context] insert pagebreak in toc (MkIV)

2010-09-28 Thread Elias Oltmanns
Steffen Wolfrum cont...@st.estfiles.de wrote:
 Hi,

 somewhere I saw the code how to insert a pagebreak in the table of content.
 I remember it somehow was related to the new structure model (one could 
 specify after which sections the table should break).

\completecontent[pageboundaries={20.3,30}]

Regards,

Elias
___
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] insert pagebreak in toc (MkIV)

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 10:37 schrieb Elias Oltmanns:

 Steffen Wolfrum cont...@st.estfiles.de wrote:
 Hi,
 
 somewhere I saw the code how to insert a pagebreak in the table of content.
 I remember it somehow was related to the new structure model (one could 
 specify after which sections the table should break).
 
 \completecontent[pageboundaries={20.3,30}]



Yes, that's what I meant ;o)


Thank you!

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
___


Re: [NTG-context] insert pagebreak in toc (MkIV)

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 10:49 schrieb Steffen Wolfrum:

 
 Am 28.09.2010 um 10:37 schrieb Elias Oltmanns:
 
 Steffen Wolfrum cont...@st.estfiles.de wrote:
 Hi,
 
 somewhere I saw the code how to insert a pagebreak in the table of content.
 I remember it somehow was related to the new structure model (one could 
 specify after which sections the table should break).
 
 \completecontent[pageboundaries={20.3,30}]


In current context it doesn't show any effect.
Is it obsolete in MkIV?

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
___


Re: [NTG-context] insert pagebreak in toc (MkIV)

2010-09-28 Thread Elias Oltmanns
Steffen Wolfrum cont...@st.estfiles.de wrote:
 Am 28.09.2010 um 10:49 schrieb Steffen Wolfrum:

 
 Am 28.09.2010 um 10:37 schrieb Elias Oltmanns:
 
 Steffen Wolfrum cont...@st.estfiles.de wrote:
 Hi,
 
 somewhere I saw the code how to insert a pagebreak in the table of content.
 I remember it somehow was related to the new structure model (one could 
 specify after which sections the table should break).
 
 \completecontent[pageboundaries={20.3,30}]


 In current context it doesn't show any effect.

It does here (updated minimals today) and in MkIV too. Do you have an
example that doesn't work?

Regards,

Elias
___
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] insert pagebreak in toc (MkIV)

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 11:35 schrieb Elias Oltmanns:

 Steffen Wolfrum cont...@st.estfiles.de wrote:
 Am 28.09.2010 um 10:49 schrieb Steffen Wolfrum:
 
 
 Am 28.09.2010 um 10:37 schrieb Elias Oltmanns:
 
 Steffen Wolfrum cont...@st.estfiles.de wrote:
 Hi,
 
 somewhere I saw the code how to insert a pagebreak in the table of 
 content.
 I remember it somehow was related to the new structure model (one could 
 specify after which sections the table should break).
 
 \completecontent[pageboundaries={20.3,30}]
 
 
 In current context it doesn't show any effect.
 
 It does here (updated minimals today) and in MkIV too. Do you have an
 example that doesn't work?


I'll send you some file privately.

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
___


Re: [NTG-context] insert pagebreak in toc (MkIV)

2010-09-28 Thread Mari Voipio
On Tue, Sep 28, 2010 at 12:19, Steffen Wolfrum cont...@st.estfiles.de wrote:
 \completecontent[pageboundaries={20.3,30}]


 In current context it doesn't show any effect.
 Is it obsolete in MkIV?

It works for me, even in the fairly complex files that I recently
upgraded from MKII to MKIV. I would've gone back to using MKII if it
didn't work...

BTW, my magic line is
\placecontent[pageboundaries={5.2}]

(I do the TOC heading separately.)

I just tested it works, my ConTeXt is ver 2010.09.22.


Regards,

Mari
___
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] realpage in register

2010-09-28 Thread Steffen Wolfrum
Hi,

I want to set up a register that shows the number of userpage and the number of 
realpage (used in pdf numbering).

I was thinking of something like ...

\def\BothPageNumbers#1 {#1 (\realpageno[#1])}

\setupregister[index][pagecommand=\BothPageNumbers]


... only, I don't know how to address the corresponding realpage number ;o(


Any idea?

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
___


Re: [NTG-context] placefigure ?

2010-09-28 Thread Mari Voipio
On Tue, Sep 28, 2010 at 13:22, R. Bastian rbast...@free.fr wrote:
 In Mk II, I need to place figures - with numbers and captions -
 but \placefigure is for floats and never places the figure [here].
 Is there another way?

I've found that mostly [here,force] will do the trick, but sometimes a
judiciously placed \page helps, too. That is a bit of cheap and sleazy
way of doing it and I only do that in the final round of layouting,
but works for me.

I think the 'real' way would be using layers, but haven't gotten as
far as to teaching myself *that*. See
http://wiki.contextgarden.net/Layers for more information.


Regards,

Mari
___
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] Custom lua script (updating and debugging)

2010-09-28 Thread Stefan Müller

Hi list,

I'm currently messing around with a custom lua script (a pretty printer) 
and I have some beginner trouble.


First: I put the file in MyContexDir\tex\texmf\tex\context\base\. What 
do I have to do to let ConTeXt work with the script and to let ConTeXt 
know that something has changed in the script? Is context --generate 
enough (after initializing with setuptex.bat)?


Second: How can I debug errors in my *.lua file? Just put
  print(debug message)
in the function that is (supposed to be) called?

Any help appreciated and thanks in advance!

Stefan
___
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] jump to PDF page

2010-09-28 Thread Steffen Wolfrum
Hi,

I there a command to jump to a specific pdf page?


Like \goto,\at, \in, \about ... only, in this case a page number should be 
given!


Any ideas?

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


Re: [NTG-context] realpage in register

2010-09-28 Thread luigi scarso
On Tue, Sep 28, 2010 at 12:37 PM, Steffen Wolfrum
cont...@st.estfiles.de wrote:
 Hi,

 I want to set up a register that shows the number of userpage and the number 
 of realpage (used in pdf numbering).

 I was thinking of something like ...

 \def\BothPageNumbers#1 {#1 (\realpageno[#1])}

 \setupregister[index][pagecommand=\BothPageNumbers]


 ... only, I don't know how to address the corresponding realpage number ;o(


 Any idea?

strc-pag.mkiv:\def\realfolio{\the\realpageno}
strc-pag.mkiv:\def\userfolio{\the\userpageno}
strc-pag.mkiv:\def\subfolio {\the\subpageno }

just an idea, btw
-- 
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
___


Re: [NTG-context] jump to PDF page

2010-09-28 Thread Hans Hagen

On 28-9-2010 12:49, Steffen Wolfrum wrote:

Hi,

I there a command to jump to a specific pdf page?


Like \goto,\at, \in, \about ... only, in this case a page number should be 
given!


Any ideas?


\goto{someplace}[page(10)]

-
  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] jump to PDF page

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 13:26 schrieb Hans Hagen:

 On 28-9-2010 12:49, Steffen Wolfrum wrote:
 Hi,
 
 I there a command to jump to a specific pdf page?
 
 
 Like \goto,\at, \in, \about ... only, in this case a page number should be 
 given!
 
 
 Any ideas?
 
 \goto{someplace}[page(10)]


This uses the number of real page.
But if I need to use the numbers of userpage?

For example:

\setuppagenumber[number=5]
\setupinteraction[state=start]
\starttext
\dorecurse{10}{\input tufte \page}

Go to page \goto{6}[page(6)]

\stoptext


This link goes to userpage 10 (= realpage 6 ).
How do I say go to realpage number 6?


This would be the last missing step to solve all my register problems!!!

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
___


Re: [NTG-context] \startcases...\stopcases alignment

2010-09-28 Thread Martin 'golodhrim' Scholz
On Mon, 27 Sep 2010 21:07:18 -0400, Aditya Mahajan wrote:

 On Tue, 28 Sep 2010, Martin 'golodhrim' Scholz wrote:
 
 Hi everyone,

 I've got one big question,

 if I type something like

 \startcases
 \NC A \NC B\NR
 \NC C \NC D
 \stopcases

 Both the A and B are left justified and I would like to have them
 horizontally centered above the C and D. Is there a way to do
 so without a matrix usage or is for that the matrix the only
 solution...
 
 Currently, mathcases do not accept an align key. So matrix is the only
 solution.
 
 \definemathmatrix
 [cases]
 [align=middle, left=\left\{\, right=\right.]
 
 should work.
 
 Aditya
 

Thanks for the fast help Aditya.

-- 
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
Germany
Phone: +49 6454 799623
mobile: +49 176 63301749
Fax: +49 6454 7990138
e-Mail: scholz@googlemail.com

What an artist dies with me!
-- Nero

___
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] jump to PDF page

2010-09-28 Thread Hans Hagen

On 28-9-2010 1:54, Steffen Wolfrum wrote:


Am 28.09.2010 um 13:26 schrieb Hans Hagen:


On 28-9-2010 12:49, Steffen Wolfrum wrote:

Hi,

I there a command to jump to a specific pdf page?


Like \goto,\at, \in, \about ... only, in this case a page number should be 
given!


Any ideas?


\goto{someplace}[page(10)]



This uses the number of real page.
But if I need to use the numbers of userpage?

For example:

\setuppagenumber[number=5]
\setupinteraction[state=start]
\starttext
\dorecurse{10}{\input tufte \page}

Go to page \goto{6}[page(6)]

\stoptext


This link goes to userpage 10 (= realpage 6 ).
How do I say go to realpage number 6?


what if we have several page 6's in one document (using hard coded page 
numbers is a bad idea anyway)


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] jump to PDF page

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 14:22 schrieb Hans Hagen:

 On 28-9-2010 1:54, Steffen Wolfrum wrote:
 
 Am 28.09.2010 um 13:26 schrieb Hans Hagen:
 
 On 28-9-2010 12:49, Steffen Wolfrum wrote:
 Hi,
 
 I there a command to jump to a specific pdf page?
 
 
 Like \goto,\at, \in, \about ... only, in this case a page number should be 
 given!
 
 
 Any ideas?
 
 \goto{someplace}[page(10)]
 
 
 This uses the number of real page.
 But if I need to use the numbers of userpage?
 
 For example:
 
 \setuppagenumber[number=5]
 \setupinteraction[state=start]
 \starttext
 \dorecurse{10}{\input tufte \page}
 
 Go to page \goto{6}[page(6)]
 
 \stoptext
 
 
 This link goes to userpage 10 (= realpage 6 ).
 How do I say go to realpage number 6?
 
 what if we have several page 6's in one document (using hard coded page 
 numbers is a bad idea anyway)



ok. but in my book there is only on realpage 6.

I need it for building my own register by hand:
when I have Stichwort 6 and I want add the link it would be great to say:

Stichwort 6 (\goto{6}[page(6)]) ... with 6 being  #1 in a pagecommand, of 
course.

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
___


Re: [NTG-context] jump to PDF page

2010-09-28 Thread Hans Hagen

On 28-9-2010 2:28, Steffen Wolfrum wrote:


Am 28.09.2010 um 14:22 schrieb Hans Hagen:


On 28-9-2010 1:54, Steffen Wolfrum wrote:


Am 28.09.2010 um 13:26 schrieb Hans Hagen:


On 28-9-2010 12:49, Steffen Wolfrum wrote:

Hi,

I there a command to jump to a specific pdf page?


Like \goto,\at, \in, \about ... only, in this case a page number should be 
given!


Any ideas?


\goto{someplace}[page(10)]



This uses the number of real page.
But if I need to use the numbers of userpage?

For example:

\setuppagenumber[number=5]
\setupinteraction[state=start]
\starttext
\dorecurse{10}{\input tufte \page}

Go to page \goto{6}[page(6)]

\stoptext


This link goes to userpage 10 (= realpage 6 ).
How do I say go to realpage number 6?


what if we have several page 6's in one document (using hard coded page numbers 
is a bad idea anyway)




ok. but in my book there is only on realpage 6.

I need it for building my own register by hand:
when I have Stichwort 6 and I want add the link it would be great to say:

Stichwort 6 (\goto{6}[page(6)]) ... with 6 being  #1 in a pagecommand, of 
course.


you can add this to lpdf-ano.lua and then use realpage(123)

function specials.realpage(var,actions)
return link(nil,nil,nil,var.operation,actions)
end


-
  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] jump to PDF page

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 14:41 schrieb Hans Hagen:

 On 28-9-2010 2:28, Steffen Wolfrum wrote:
 
 I need it for building my own register by hand:
 when I have Stichwort 6 and I want add the link it would be great to say:
 
 Stichwort 6 (\goto{6}[page(6)]) ... with 6 being  #1 in a pagecommand, of 
 course.
 
 you can add this to lpdf-ano.lua and then use realpage(123)
 
 function specials.realpage(var,actions)
return link(nil,nil,nil,var.operation,actions)
 end


no, no, obviously the terms were mixed! sorry!!
this is what we already had (the link goes to userpage 10 = realpage 6).

I need a function specials.realpage, so the link goes to userpage 6 !


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
___


[NTG-context] metapost: unable to make mpx file error

2010-09-28 Thread Alan BRASLAU
\startOT
Wow! experimental metapost version two
(does this mean that we get to play with precision?)
\stopOT

\startQUESTION
The following minimal example yields an error:

\starttext
\startMPcode
input circle ;
\stopMPcode
\stoptext

where circle.mp contains a btex...etex sequence: 

draw fullcircle scaled 1cm ;
label (btex 1 cm etex , (0,0)) ;


The input circle ; will work if I comment-out or remove label ;
The minimal example will work, of course, if the mp code is
in my tex file.

The error message is:


mplib   : loading 'metafun.mp' (experimental metapost version two)
! mp terminal: (circle.mp
 circle.mp
 circle.mpx
! Unable to make mpx file.
l.2 label (btex
1 cm etex , (0,0));

.

system   error on line 4 in file mp.tex: mp terminal: (circle.mp
 circle.mp
 circle.mpx
! Unable to make mpx file.
l.2 label (btex
1 cm etex , (0,0));

 ...

1 \starttext
2 \startMPcode
3   input circle ;
4   \stopMPcode
5 \stoptext

inserted text ...re.mp ; fi ; ]===], false)}
  
\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic 
\d...
l.4 \stopMPcode
   

\stopQUESTION

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


Re: [NTG-context] jump to PDF page

2010-09-28 Thread Hans Hagen

On 28-9-2010 3:27, Steffen Wolfrum wrote:


Am 28.09.2010 um 14:41 schrieb Hans Hagen:


On 28-9-2010 2:28, Steffen Wolfrum wrote:


I need it for building my own register by hand:
when I have Stichwort 6 and I want add the link it would be great to say:

Stichwort 6 (\goto{6}[page(6)]) ... with 6 being  #1 in a pagecommand, of 
course.


you can add this to lpdf-ano.lua and then use realpage(123)

function specials.realpage(var,actions)
return link(nil,nil,nil,var.operation,actions)
end



no, no, obviously the terms were mixed! sorry!!
this is what we already had (the link goes to userpage 10 = realpage 6).

I need a function specials.realpage, so the link goes to userpage 6 !


that's more work as we can have dup userpage entries

-
  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] jump to PDF page

2010-09-28 Thread Hans Hagen

On 28-9-2010 4:13, Hans Hagen wrote:

On 28-9-2010 3:27, Steffen Wolfrum wrote:


Am 28.09.2010 um 14:41 schrieb Hans Hagen:


On 28-9-2010 2:28, Steffen Wolfrum wrote:


I need it for building my own register by hand:
when I have Stichwort 6 and I want add the link it would be great
to say:

Stichwort 6 (\goto{6}[page(6)]) ... with 6 being #1 in a
pagecommand, of course.


you can add this to lpdf-ano.lua and then use realpage(123)

function specials.realpage(var,actions)
return link(nil,nil,nil,var.operation,actions)
end



no, no, obviously the terms were mixed! sorry!!
this is what we already had (the link goes to userpage 10 = realpage 6).

I need a function specials.realpage, so the link goes to userpage 6 !


that's more work as we can have dup userpage entries


I'll upload a beta that supports

\setupinteraction[state=start]

\starttext
\startstandardmakeup
no page
\stopstandardmakeup
one \goto{page 2}[page(2)]
one \goto{realpage 2}[realpage(2)]
one \goto{userpage 2}[userpage(2)]
\page
two \goto{page 1}[page(1)]
two \goto{realpage 1}[realpage(1)]
two \goto{userpage 1}[userpage(1)]
\stoptext

no more patched/extensions today



-
  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] jump to PDF page

2010-09-28 Thread Steffen Wolfrum

Am 28.09.2010 um 16:38 schrieb Hans Hagen:

 On 28-9-2010 4:13, Hans Hagen wrote:
 On 28-9-2010 3:27, Steffen Wolfrum wrote:
 
 Am 28.09.2010 um 14:41 schrieb Hans Hagen:
 
 On 28-9-2010 2:28, Steffen Wolfrum wrote:
 
 I need it for building my own register by hand:
 when I have Stichwort 6 and I want add the link it would be great
 to say:
 
 Stichwort 6 (\goto{6}[page(6)]) ... with 6 being #1 in a
 pagecommand, of course.
 
 you can add this to lpdf-ano.lua and then use realpage(123)
 
 function specials.realpage(var,actions)
 return link(nil,nil,nil,var.operation,actions)
 end
 
 
 no, no, obviously the terms were mixed! sorry!!
 this is what we already had (the link goes to userpage 10 = realpage 6).
 
 I need a function specials.realpage, so the link goes to userpage 6 !
 
 that's more work as we can have dup userpage entries
 
 I'll upload a beta that supports
 
 \setupinteraction[state=start]
 
 \starttext
\startstandardmakeup
no page
\stopstandardmakeup
one \goto{page 2}[page(2)]
one \goto{realpage 2}[realpage(2)]
one \goto{userpage 2}[userpage(2)]
\page
two \goto{page 1}[page(1)]
two \goto{realpage 1}[realpage(1)]
two \goto{userpage 1}[userpage(1)]
 \stoptext


great!

st.
___
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] MikTeX 2.9

2010-09-28 Thread Mojca Miklavec
Dear list,

Just to let you know - ConTeXt in MikTeX is back. There are some minor
issues, but MKIV works almost out of the box. For the time being the
version of ConTeXt in MikTeX is the same as in TeX Live.

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] MikTeX 2.9

2010-09-28 Thread Vedran Miletić
2010/9/28 Mojca Miklavec mojca.miklavec.li...@gmail.com:
 Dear list,

 Just to let you know - ConTeXt in MikTeX is back. There are some minor
 issues, but MKIV works almost out of the box. For the time being the
 version of ConTeXt in MikTeX is the same as in TeX Live.


Does that mean that there are plans to eventually put newer ConTeXt
versions in MikTeX?

-- 
Vedran Miletić
___
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] MikTeX 2.9

2010-09-28 Thread Mojca Miklavec
2010/9/28 Vedran Miletić wrote:
 2010/9/28 Mojca Miklavec wrote:
 Dear list,

 Just to let you know - ConTeXt in MikTeX is back. There are some minor
 issues, but MKIV works almost out of the box. For the time being the
 version of ConTeXt in MikTeX is the same as in TeX Live.

 Does that mean that there are plans to eventually put newer ConTeXt
 versions in MikTeX?

Eventually ... yes, but it depends a bit on what timeframe you have in
mind when you say eventually. First of all, no newer current
version of ConTeXt has been released since this one. But most
important: ConTeXt highly depends on the version of LuaTeX being used
and that is out of our control. When the author of MikTeX will decide
to upgrade LuaTeX version, ConTeXt will probably (have to) be updated
at the same time.

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] Custom lua script (updating and debugging)

2010-09-28 Thread Mojca Miklavec
On Tue, Sep 28, 2010 at 12:41, Stefan Müller wrote:
 Hi list,

 I'm currently messing around with a custom lua script (a pretty printer) and
 I have some beginner trouble.

 First: I put the file in MyContexDir\tex\texmf\tex\context\base\.

Put them into
MyContexDir\tex\texmf-local\tex\context\user\
because:
- You need to use texmf-local instead of texmf, else your file might
be deleted when you update the distribution.
- It doesn't really matter where the file is as long as it is under
[TEXMF]\tex\context, but using user is somehow more sensible than
base.

 What do
 I have to do to let ConTeXt work with the script and to let ConTeXt know
 that something has changed in the script? Is context --generate enough
 (after initializing with setuptex.bat)?

You need to use context --generate only when you add the script for
the first time. After you modify it, you don't need to do anything
unless you are changing ConTeXt source. If you change ConTeXt source,
you need to also run context --make (but that would be dangerous
anyway).

 Second: How can I debug errors in my *.lua file? Just put
  print(debug message)
 in the function that is (supposed to be) called?

Yes, or tex.print (depending on how you want to debug).

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] change affecting MPgraphic?

2010-09-28 Thread Marko Schütz Schmuck
At Mon, 27 Sep 2010 14:27:36 -0400 (EDT),
Aditya Mahajan wrote:
 
 On Mon, 27 Sep 2010, Marko Schütz Schmuck wrote:
 
  Dear Aditya,
 
  At Fri, 24 Sep 2010 11:21:01 -0400 (EDT),
  Aditya Mahajan wrote:
 
  On Fri, 24 Sep 2010, Marko Schütz Schmuck wrote:
 
  Dear All,
 
  I only very recently updated from
 
  ConTeXt  ver: 2005.01.31
 
  to
 
  ConTeXt  ver: 2009.08.19 17:10 MKII
 
  Previously, using env-assign.tex as described in a 2006 PracTeX
  article worked fine. With the new version the drop shadow box is not
  rendered.
 
  Do you have write18 enabled (It is disabled by default on most
  distributions). See http://wiki.contextgarden.net/write18
 
  the setting was
 
  shell_escape = p
 
  and mpost was listed in the permissible commands. I changed it to
 
  shell_escape = 1
 
 That should be t (tee) rather than 1 (one)
 
shell_escape = t

I tried both (btw. the comment just before the option calls for 1),
but without the desired result.

  and rebuilt formats. This did not fix my issue.
 
 There is no need to rebuild the formats.

OK, thanks.

Would you have any other idea, what the issue might be?

Best regards,

Marko

pgp9sAkIKKaEZ.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] change affecting MPgraphic?

2010-09-28 Thread Aditya Mahajan

On Tue, 28 Sep 2010, Marko Schütz Schmuck wrote:


At Mon, 27 Sep 2010 14:27:36 -0400 (EDT),
Aditya Mahajan wrote:



Do you have write18 enabled (It is disabled by default on most
distributions). See http://wiki.contextgarden.net/write18


the setting was

shell_escape = p

and mpost was listed in the permissible commands. I changed it to

shell_escape = 1


That should be t (tee) rather than 1 (one)

   shell_escape = t


I tried both (btw. the comment just before the option calls for 1),
but without the desired result.


and rebuilt formats. This did not fix my issue.


There is no need to rebuild the formats.


OK, thanks.

Would you have any other idea, what the issue might be?


No. What distribution are you using? Are you editing the correct texmf.cnf 
file, the one that is returned by kpsewhich texmf.cnf?


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] metapost: unable to make mpx file error

2010-09-28 Thread Hans Hagen

On 28-9-2010 4:08, Alan BRASLAU wrote:

\startOT
Wow! experimental metapost version two
(does this mean that we get to play with precision?)
\stopOT

\startQUESTION
The following minimal example yields an error:

\starttext
\startMPcode
input circle ;
\stopMPcode
\stoptext

where circle.mp contains a btex...etex sequence:

draw fullcircle scaled 1cm ;
label (btex 1 cm etex , (0,0)) ;


The input circle ; will work if I comment-out or remove label ;
The minimal example will work, of course, if the mp code is
in my tex file.

The error message is:


mplib   : loading 'metafun.mp' (experimental metapost version two)
! mp terminal: (circle.mp

circle.mp
circle.mpx

! Unable to make mpx file.
l.2 label (btex
 1 cm etex , (0,0));

..

system  error on line 4 in file mp.tex: mp terminal: (circle.mp

circle.mp
circle.mpx

! Unable to make mpx file.


hm, looks like I have to intercept the inputs in order to turn the btex 
... into textexts (which happens with the main file)


what I actually need for this is a reader hook (just like we have a 
finder hook); I could use the finder hook to make a temporary file, but 
I wonder if that makes sense so let's first check if we can get a reader 
hook


(remind me in a few weeks anyway and use textext instead of btex/etex 
for the moment)


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] Custom lua script (updating and debugging)

2010-09-28 Thread Stefan Müller
Hi,

thanks for the fast reply Mojca! Unfortunately it is still not working. Here 
is what I did. I'm afraid it has possibly more to do with pretty printers in 
particular (than lua scripts in general), but actually I have no idea.

I took the file
  MyConTeXtDir/tex/texmf-context/tex/context/base/pret-lua.lua
and copied it to
  MyConTeXtDir/tex/texmf-local/tex/context/user/pret-pas.lua
Next I replaced every occurance of lua in this new file by pas (so this 
changed the name of one function and renamed the visualizer itself). Then I 
ran context --generate.

My testfile is added below. The end is typeset as if pret-pas.lua wouldn't 
exist. If I change option=PAS to option=LUA it works as intended (end is 
green). What is going on here? Any help is appreciated.

\installprettytype[PAS][PAS]
\setupcolors[state=start]
\setuptyping[option=color]
\definetyping[PAS][option=PAS, escape=yes, tab=4, numbering=line]

\starttext \startPAS
end
\stopPAS \stoptext

Thanks in advance,
Stefan.

PS: Additional question: Is it possible to integrate option=color into the 
\definetyping[PAS]? option={PAS,color}?
___
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] Feature request: \completeReverseListOfAbbreviations

2010-09-28 Thread Otared Kavian

Hi Hans,

My computer tells that I have to remind you about the following feature 
request… :-)
About a month ago I asked the following question and you said:
 
 remind me to make it configureable (not that hard)
 
 Hans
 

Here is the test file and the qusetion:
If one considers the minimal example:

% - begin abbrev-test.tex

\definesynonyms[abbreviation][abbreviations][\infull][\inshort]

\starttext
\abbreviation{LCTVS}{Locally Convex Topological Vector Space}
\abbreviation{EEG} {Electroencephalogram}
\abbreviation{ERP} {Event-Related Potentials}
\abbreviation{TVS}{Topological Vector Space}

Test inshort: \inshort{EEG}, \inshort{ERP}, \inshort{TVS},

Test infull: \infull{EEG}, \infull{ERP}, \infull{TVS}, \infull{LCTVS}

\completelistofabbreviations

\stoptext
% - end abbrev-test.tex

 Is it possible to obtain, beside the list of abbreviations, another ordered 
list in which the full variant is in the first column while the short variant 
is in the second column? That is something like:
   \completeReverseListOfAbbreviations
resulting in

   ElectroencephalogramEEG
   Event-Related PotentialsERP

   Locally Convex Topological Vector Space LCTVS

   Topological Vector SpaceTVS

Thanks in advance for any help or insight.

Best regards: OK
___
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] focus is gone in \setupinteraction?

2010-09-28 Thread Zhichu Chen
Well, focus=width doesn't work in my test file:

\setupinteraction
 [state=start,
  focus=fit,
  openaction=FitWidth]

\starttext
\goto{link}[page(5)]
\dorecurse{10}{\input knuth \page}
\stoptext



I also checked
http://wiki.contextgarden.net/Reference/en/setupinteraction
and no focus option

-- 
Best Regards
Chen
___
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
___