Re: [NTG-context] referencing figures with \in

2007-06-26 Thread Hans van der Meer
Thanks, this completely satisfies my curiosity.


On Jun 26, 2007, at 7:39, Wolfgang Schuster wrote:

 2007/6/25, Hans van der Meer [EMAIL PROTECTED]:

 On Jun 25, 2007, at 9:24, Taco Hoekwater wrote:

 Hans van der Meer wrote:
 Taco and Wolfgang,

 Here is your counterexample:

 \setupcaptions[number=no] %  the culprit
 \starttext

 Since you are referencing a non-existing number, I cannot say I am
 very surprised get weird output.

 You are right and I should not expect something sensible from
 number=no, but for my curiosity one question remains: why does \at
 gives a number that should not exist?

 Anyway, it is not a problem anymore!

 \in [key] gives the running number of float, this means 1 for the
 first figure,
 2 for the second ... This did only work with numbered figures, you  
 disabled
 the number in your figure and got only the dummy sign (the bullet)  
 because
 there was no number to be shown.

 \at [key] give you the pagenumber, where your figure was placed  
 and this
 was in your example the first page.

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


Re: [NTG-context] referencing figures with \in

2007-06-25 Thread Taco Hoekwater
Hans van der Meer wrote:
 Taco and Wolfgang,
 
 Here is your counterexample:
 
 \setupcaptions[number=no] %  the culprit
 \starttext

Since you are referencing a non-existing number, I cannot say I am
very surprised get weird output.

The problem is that the reference is actually resolved, but it has
no content (thanks to number=no), and that triggers the special
handling for anonymous references. If the figure appears on a
different page, context will print a triangle pointing to the
left or right instead of the dot. In short: it is a feature.


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] referencing figures with \in

2007-06-25 Thread Hans van der Meer

On Jun 25, 2007, at 9:24, Taco Hoekwater wrote:

 Hans van der Meer wrote:
 Taco and Wolfgang,

 Here is your counterexample:

 \setupcaptions[number=no] %  the culprit
 \starttext

 Since you are referencing a non-existing number, I cannot say I am
 very surprised get weird output.

You are right and I should not expect something sensible from  
number=no, but for my curiosity one question remains: why does \at  
gives a number that should not exist?

Anyway, it is not a problem anymore!


 The problem is that the reference is actually resolved, but it has
 no content (thanks to number=no), and that triggers the special
 handling for anonymous references. If the figure appears on a
 different page, context will print a triangle pointing to the
 left or right instead of the dot. In short: it is a feature.


 Best wishes,
 Taco

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


Re: [NTG-context] referencing figures with \in

2007-06-25 Thread Wolfgang Schuster
2007/6/25, Hans van der Meer [EMAIL PROTECTED]:

 On Jun 25, 2007, at 9:24, Taco Hoekwater wrote:

  Hans van der Meer wrote:
  Taco and Wolfgang,
 
  Here is your counterexample:
 
  \setupcaptions[number=no] %  the culprit
  \starttext
 
  Since you are referencing a non-existing number, I cannot say I am
  very surprised get weird output.

 You are right and I should not expect something sensible from
 number=no, but for my curiosity one question remains: why does \at
 gives a number that should not exist?

 Anyway, it is not a problem anymore!

\in [key] gives the running number of float, this means 1 for the
first figure,
2 for the second ... This did only work with numbered figures, you disabled
the number in your figure and got only the dummy sign (the bullet) because
there was no number to be shown.

\at [key] give you the pagenumber, where your figure was placed and this
was in your example the first page.

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
___


[NTG-context] referencing figures with \in

2007-06-24 Thread Hans van der Meer

I used to place references to figures and tables in the following way:

\placefigure[][fig:myfig]{Title}{\useMPgraphic{myfig}{parameters}}
\in{figure}[fig:myfig]

This however printed a dot instead of the expected figure #.
Changing to
\at{figure}[fig:myfig]
again printed the correct reference.

Looking further into this I found:
\meaning\in -- \protected macro:-\dohandlemathtoken {in}
\meaning\at  -- macro:-\dohandlecommand {at}

Still, the ConText manual tells me that
\in{.1}{.2.}[ref] (with {.2.} optional)
should work.

In file core-ref.tex at line 2118 (2007-04-17 version) I find:
%\def\in%
%  {\ifmmode
% \expandafter\donormalin
%   \else
% \expandafter\doinatreference\expandafter\currenttextreference
%   \fi}
But I am definitely not in math mode when calling \in.
I did some further experimentation but nothing helped.

Has something changed here or is there something I do obviously wrong?

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


Re: [NTG-context] referencing figures with \in

2007-06-24 Thread Taco Hoekwater
Hoi Hans,

Hans van der Meer wrote:
 I used to place references to figures and tables in the following way:
 
 \placefigure[][fig:myfig]{Title}{\useMPgraphic{myfig}{parameters}}
 \in{figure}[fig:myfig]
 
 This however printed a dot instead of the expected figure #.

This needs an example file from you. I just ran:

% hans-prob.tex
\starttext

I used to place references to figures and tables in the following way:

\placefigure[][fig:myfig]{Title}{Content}

\in{figure}[fig:myfig]

This however printed a dot instead of the expected figure .
Changing to \at{figure}[fig:myfig] again printed the correct reference.

\stoptext


And it worked fine.

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] referencing figures with \in

2007-06-24 Thread Wolfgang Schuster
On Sun, 24 Jun 2007 14:38:34 +0200
Hans van der Meer [EMAIL PROTECTED] wrote:

 I used to place references to figures and tables in the following way:
 
 \placefigure[][fig:myfig]{Title}{\useMPgraphic{myfig}{parameters}}
  \in{figure}[fig:myfig]
 
 This however printed a dot instead of the expected figure #.
 Changing to
  \at{figure}[fig:myfig]
 again printed the correct reference.
 
 Looking further into this I found:
  \meaning\in -- \protected macro:-\dohandlemathtoken {in}
  \meaning\at  -- macro:-\dohandlecommand {at}
 
 Still, the ConText manual tells me that
  \in{.1}{.2.}[ref] (with {.2.} optional)
 should work.
 
 In file core-ref.tex at line 2118 (2007-04-17 version) I find:
 %\def\in%
 %  {\ifmmode
 % \expandafter\donormalin
 %   \else
 % \expandafter\doinatreference\expandafter\currenttextreference
 %   \fi}
 But I am definitely not in math mode when calling \in.
 I did some further experimentation but nothing helped.
 
 Has something changed here or is there something I do obviously wrong?
 
 Hans van der Meer

Hi Hans,

please post a example, the following works for me:

\starttext

\startuseMPgraphic{circle}
draw fullcircle scaled 1cm;
\stopuseMPgraphic

\placefigure
  []
  [fig:ref]
  {Text}
  {\useMPgraphic{circle}}

\in{figure}[fig:ref]

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


Re: [NTG-context] referencing figures with \in

2007-06-24 Thread Hans van der Meer
Taco and Wolfgang,

Here is your counterexample:

\setupcaptions[number=no] %  the culprit
\starttext

I used to place references to figures and tables in the following way:

\placefigure[][fig:myfig]{Title}{Content}

mind the {\bf setupcations}, now \type{\in{figure}[fig:myfig]}--\in 
{figure}[fig:myfig] and does not result in the reference.

This however printed a dot instead of the expected figure .
Changing to \type{\at}\at{figure}[fig:myfig] again printed the  
correct reference.

\stoptext

On Jun 24, 2007, at 16:02, Taco Hoekwater wrote:

 \starttext

 I used to place references to figures and tables in the following way:

 \placefigure[][fig:myfig]{Title}{Content}

 \in{figure}[fig:myfig]

 This however printed a dot instead of the expected figure .
 Changing to \at{figure}[fig:myfig] again printed the correct  
 reference.

 \stoptext

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