Re: [NTG-context] Controlling \at output

2016-03-01 Thread Aidan Nichol
SOLVED: I cut and pasted the code from the original response and failed to 
notice that the very first character i.e. the ‘\’ was missing in the message. 
It all executed with no error messages!! Works fine with the minor correction.

Thanks for your help.

Aidan
___
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] Controlling \at output

2016-03-01 Thread Wolfgang Schuster

Aidan Nichol 
1. März 2016 um 16:06
I must be doing something stupid. I’ve just installed the standalone 
version. Saved the code as test3.tex and invoked it with

  context test3.tex

It reports the version as

ConTeXt  ver: 2016.03.01 14:03 MKIV beta  fmt: 2016.3.1  int: 
english/english


And still no output from \thispage

I attached my test file and the output I get.

Wolfgang


thispage.pdf
Description: Adobe PDF document


thispage.tex
Description: TeX document
___
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] Controlling \at output

2016-03-01 Thread Aidan Nichol
I must be doing something stupid. I’ve just installed the standalone version. 
Saved the code as test3.tex and invoked it with
  context test3.tex

It reports the version as 

ConTeXt  ver: 2016.03.01 14:03 MKIV beta  fmt: 2016.3.1  int: english/english

And still no output from \thispage


Aidan___
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] Controlling \at output

2016-02-28 Thread Wolfgang Schuster

Aidan Nichol 
28. Februar 2016 um 16:08
Thanks for the reply. \thispage is producing no output in all the 
places it is being invoked

Which ConTeXt version do you use?

I tested the example with the newest beta and has no problems with it.

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] Controlling \at output

2016-02-28 Thread Aidan Nichol
Thanks for the reply. \thispage is producing no output in all the places it is 
being invoked

Aidan 

> On 24 Feb 2016, at 15:35, ntg-context-requ...@ntg.nl wrote:
> 
> startsetups[referenceformat:thispage]
>\doifelse{\filterreference{page}}{\rawcountervalue[userpage]}
>{{\tttf !?}}
>{\filterreference{page}}
> \stopsetups
> 
> \definereferenceformat[thispage][setups=referenceformat:thispage]
> 
> \starttext
> 
> \chapter[one]{First chapter}
> 
> First: \thispage[one]
> 
> Second: \thispage[two]
> 
> \chapter[two]{Second chapter}
> 
> First: \thispage[one]
> 
> Second: \thispage[two]

___
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] Controlling \at output

2016-02-24 Thread Wolfgang Schuster

Aidan Nichol 
24. Februar 2016 um 12:47
I’m trying to create something (like varioref in latex) that 
suppresses \at output if the referenced item is on the current page. 
The main decision point is with


\doifelse{\at[ref2]}{\rawcountervalue[page]}{ same page }{ different 
page }


no matter what I try (expdoifelse and other ways to get the current 
page) the values never match.


\doifelse{\at[ref2]}{\at[ref1]}….. (ref1 and ref2 are on the same page 
but don’t match


\doifelse{\rawcountervalue[page]}{1}… it is page 1 but always fails.

The only match I get is with

\doifelse{\at[ref2]}{\at[ref2]}…. which is pretty useless

Presumably I’m doing something stupid. Or do i have to go for a much 
lower level approach

\startsetups[referenceformat:thispage]
\doifelse{\filterreference{page}}{\rawcountervalue[userpage]}
{{\tttf !?}}
{\filterreference{page}}
\stopsetups

\definereferenceformat[thispage][setups=referenceformat:thispage]

\starttext

\chapter[one]{First chapter}

First: \thispage[one]

Second: \thispage[two]

\chapter[two]{Second chapter}

First: \thispage[one]

Second: \thispage[two]

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

[NTG-context] Controlling \at output

2016-02-24 Thread Aidan Nichol
I’m trying to create something (like varioref in latex) that suppresses \at 
output if the referenced item is on the current page. The main decision point 
is with

\doifelse{\at[ref2]}{\rawcountervalue[page]}{ same page }{ different page }

no matter what I try (expdoifelse and other ways to get the current page) the 
values never match.

\doifelse{\at[ref2]}{\at[ref1]}….. (ref1 and ref2 are on the same page but 
don’t match

\doifelse{\rawcountervalue[page]}{1}…  it is page 1 but always fails.

The only match I get is with

\doifelse{\at[ref2]}{\at[ref2]}….  which is pretty useless

Presumably I’m doing something stupid. Or do i have to go for a much lower 
level approach
___
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
___