Re: [NTG-context] Hide section content

2011-11-20 Thread Wolfgang Schuster

Am 20.11.2011 um 00:56 schrieb Aditya Mahajan:

 Hi,
 
 I have a tex file that looks like follows:
 
  \startsection[title=...][review=yes]
 ...
  \stopsection
 
  \startsection[title=...][review=no]
 ...
  \stopsection
 
 When I compile the document with --mode=review, I want that all sections that 
 have `review=no` should not be displayed. What is the best way of achieving 
 this? In particular, can we have an option that'll let us say:
 
 \setuphead[section][placebody=hidden] (analogous to placehead=hidden).


To hide the content of the section you can use this (maybe a buffer would be 
better) but to hide the title of the section together with the list entry Hans 
has to modify the heading macros.

\def\gobblesection
  {\doif{\structureuservariable{review}}{no}
 {\gobbleuntil\stopsection}}

\setuphead[section][insidesection=\gobblesection]

\starttext

\startsection[title=Knuth][review=yes]
\input knuth
\stopsection

\startsection[title=Zapf][review=no]
\input zapf
\stopsection

\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] equation refs broken?

2011-11-20 Thread Hans van der Meer
Can someone confirm this? It seems that the equation reference mechanism is 
broken some time in the recent past.
I have a small example done in
(1) ConTeXt  ver: 2011.07.13 20:14 MKIV
(2) ConTeXt  ver: 2011.11.17 23:31 MKIV
These are respectively the first and last pdf's below.


If true, it is very serious for me, because the I cannot prepare the upcoming 
texts for my students!

Furthermore: \pagereference now introduces spurious white.

For the bad vertical spacing on the left I have submitted a tentative bugfix to 
Hans Hagen.



Hans van der Meer

\setuppapersize[A6][A6]
\setupformulae[spacebefore=0pt,spaceafter=0pt]
\starttext
\placeformula[eq:one]\startformula a = 1 \stopformula
\placeformula[-]\startformula a = 2 \stopformula
\placeformula[eq:three]\startformula a = 3 \stopformula
\pagereference[ref:p]
Refer equation-1: \in{equ=}[eq:one] in page \at[ref:p].\par
Refer equation-3: \in{equ=}[eq:three] in page \at[ref:p].\par
\stoptext




formularef.pdf
Description: Adobe PDF document


formularef.pdf
Description: Adobe PDF 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] equation refs broken?

2011-11-20 Thread Paul Menzel
Dear Hans,


Am Sonntag, den 20.11.2011, 12:29 +0100 schrieb Hans van der Meer:
 Can someone confirm this? It seems that the equation reference mechanism is 
 broken some time in the recent past.
 I have a small example done in
 (1) ConTeXt  ver: 2011.07.13 20:14 MKIV
 (2) ConTeXt  ver: 2011.11.17 23:31 MKIV
 These are respectively the first and last pdf's below.
 
 
 If true, it is very serious for me, because the I cannot prepare the upcoming 
 texts for my students!

this is a known problem. Please take a look at [1]

Re: [NTG-context] No numbers with `\ref` and floats like `\placetable`

where Wolfgang proposed a quick fix if you are not using sub formulas
and

Re: [NTG-context] Edid of reference in Wiki

where Hans responded he wanted to take a look this weekend.

 Furthermore: \pagereference now introduces spurious white.

Please open a now thread for this.

 For the bad vertical spacing on the left I have submitted a tentative bugfix 
 to Hans Hagen.

Thank you for cooking up a patch!


Thanks,

Paul


[1] http://www.ntg.nl/pipermail/ntg-context/2011/062930.html


signature.asc
Description: This is a digitally signed message part
___
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] Placing a TOC at the end of a document

2011-11-20 Thread Willi Egger
Hi,

hm, I should place a table of contents at the end of my document.

When issuing:

\startsubject[title=Inhoud]
   \placelist[section]
\stopsubject

I get the section title but no TOC

When issuing only

\completelist[section]

I get the TOC but no section title.

Do I have to setup this differently or is this some bug?

Willi
___
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] Placing a TOC at the end of a document

2011-11-20 Thread Wolfgang Schuster
Hi,

hm, I should place a table of contents at the end of my document.

When issuing:

\startsubject[title=Inhoud]
  \placelist[section]
\stopsubject

I get the section title but no TOC

When issuing only

\completelist[section]

I get the TOC but no section title.

Do I have to setup this differently or is this some bug?


Try “criterium=all” or “criterium=previous”.

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] Placing a TOC at the end of a document

2011-11-20 Thread Willi Egger
Hallo Wolfgang,

thank syou so much for the immediate reply. - Both switches result in placing 
the content with \startsubject[] \placlist[section][criteium=all] \sotpsubject

Willi
On 20 Nov 2011, at 13:44, Wolfgang Schuster wrote:

 Hi,
 
 hm, I should place a table of contents at the end of my document.
 
 When issuing:
 
 \startsubject[title=Inhoud]
  \placelist[section]
 \stopsubject
 
 I get the section title but no TOC
 
 When issuing only
 
 \completelist[section]
 
 I get the TOC but no section title.
 
 Do I have to setup this differently or is this some bug?
 
 
 Try “criterium=all” or “criterium=previous”.
 
 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
___


[NTG-context] referencing

2011-11-20 Thread Hans van der Meer
I have the following question about references.

Using for example \at one can say somehting like see on \at{page}[ref] for the 
figure..
But when the figure is one the same page it seems a bit superfluous to 
reference to it. In the same manner it is a bit of an overkill to put a 
hyperlink to the page where this link resides itself.

It is clear that ConTeXt knows if it is on the same page as is referenced, 
because then a link is coloured with contrastcolor instead of color.

Now the question: how easy/difficult is it to either suppress such an 
\at-reference or switch between chosen alternate texts for links on or off the 
same page as the referenced item?

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


[NTG-context] another referencing question

2011-11-20 Thread Hans van der Meer
I see that a \pagereference[ref:a] gets a link to it with \at{see}[ref:a]. But 
when I click on it, the jump to that page is not made. Not in Adobe Reader, nor 
in Apple's Preview.
Is that the intended behaviour? Is it something I am doing wrong? Or what?

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


[NTG-context] Is it possible to have \showlayout also display dimensions in inches?

2011-11-20 Thread Pavneet Arora
Either in a separate column or in lieu of `cm'.  For us those of us on the left 
hand side of the Atlantic, and who struggle with decimal numbers ;)?


advTHANKSance.

--
-
- Pavneet Arora

___
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] Overview screen containing multiple pages

2011-11-20 Thread Aditya Mahajan
There is a python script called impressive 
(http://impressive.sourceforge.net/) that adds some eyecandy to 
presentations. One of the features that it has is an overview screen at 
the end, like this: http://impressive.sourceforge.net/oview.png
This is similar to the overview screen used in the ConTeXt showcase by 
Hans: http://pragma-ade.com/show-man.pdf


I want to include such an overview in my slides, but am not sure if it can 
be done without using a separate tex file. My slides look like this (sorry 
Thomas, I am not using simpleslides at the moment)


\starttext
\startsection[title={...}]
 
\stopsection

\startsection[...]
...
\stopsection
\stoptext

Each section spans over multiple pages. What I want is to have a last page 
which is equivalent to the following:


\startcombination[n*n]
  {\externalfigure[\jobname][page=page-number-of-first-section]}{}
  {\externalfigure[\jobname][page=page-number-of-second-section]}{}
  
\stopcombination

I tried a simple test case

\starttext
\input knuth
\page
\externalfigure[\jobname][page=1,width=0.3\textwidth]
\stoptext

but that does not include the first page. So, I think that what I want is 
not possible, but I wonder if others have different ideas on how this 
might be implemented (after all \setuparranging does manage to do 
something similar without the need for a separate tex file).


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] referencing

2011-11-20 Thread Wolfgang Schuster

Am 20.11.2011 um 18:46 schrieb Hans van der Meer:

 I have the following question about references.
 
 Using for example \at one can say somehting like see on \at{page}[ref] for 
 the figure..
 But when the figure is one the same page it seems a bit superfluous to 
 reference to it. In the same manner it is a bit of an overkill to put a 
 hyperlink to the page where this link resides itself.
 
 It is clear that ConTeXt knows if it is on the same page as is referenced, 
 because then a link is coloured with contrastcolor instead of color.
 
 Now the question: how easy/difficult is it to either suppress such an 
 \at-reference or switch between chosen alternate texts for links on or off 
 the same page as the referenced item?

\def\SamePage[#1]%
  {\doifreferencefoundelse{#1}
 {\ifnum\referencepagestate=1
\unknown % reference is on the same page
   \else
 \at[#1]%
  \fi}
 {\donothing}}

\starttext

\pagereference[one]
\pagereference[two]

One: \SamePage[one]

\page

Two: \SamePage[one]

\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] Hide section content

2011-11-20 Thread Aditya Mahajan

On Sun, 20 Nov 2011, Wolfgang Schuster wrote:


Am 20.11.2011 um 00:56 schrieb Aditya Mahajan:


Hi,

I have a tex file that looks like follows:

 \startsection[title=...][review=yes]
...
 \stopsection

 \startsection[title=...][review=no]
...
 \stopsection

When I compile the document with --mode=review, I want that all sections that 
have `review=no` should not be displayed. What is the best way of achieving 
this? In particular, can we have an option that'll let us say:

\setuphead[section][placebody=hidden] (analogous to placehead=hidden).



To hide the content of the section you can use this (maybe a buffer 
would be better)


\def\gobblesection
 {\doif{\structureuservariable{review}}{no}
{\gobbleuntil\stopsection}}

\setuphead[section][insidesection=\gobblesection]


Thanks.

but to hide the title of the section together with the 
list entry Hans has to modify the heading macros.


Yes. I noticed that beforesection is used before user variables are set, 
so the above approach does not work for section heads. For now, I have 
just defined a different head, 'noreviewsection`, and I set it to a buffer 
in the review mode.


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
___


[NTG-context] \right)² not recognized as \right)^2

2011-11-20 Thread Paul Menzel
Dear ConTeXt folks,


is it expected that \right)² is not recognized as \right)^2?

\starttext

Using ^2:

\placeformula
\startformula
\left( a + b \right)^2 = a² + 2ab + b²
\stopformula

\placeformula
\startformula
\left( a + \frac72 \right)^2
\stopformula

Using ². The first example does not display the problem that well 
because the parenthesis are too small:
\placeformula
\startformula
\left( a + b \right)² = a² + 2ab + b²
\stopformula

\placeformula
\startformula
\left( n + \frac72 \right)²
\stopformula
\stoptext

Please find the example also attached.


Thanks,

Paul


square.pdf
Description: Adobe PDF document
\starttext

Using ^2:

\placeformula
\startformula
\left( a + b \right)^2 = a² + 2ab + b²
\stopformula

\placeformula
\startformula
\left( a + \frac72 \right)^2
\stopformula

Using ². The first example does not display the problem that well because the parenthesis are too small:
\placeformula
\startformula
\left( a + b \right)² = a² + 2ab + b²
\stopformula

\placeformula
\startformula
\left( n + \frac72 \right)²
\stopformula
\stoptext


signature.asc
Description: This is a digitally signed message part
___
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] \right)² not recognized as \right)^2

2011-11-20 Thread Wolfgang Schuster

Am 20.11.2011 um 19:52 schrieb Paul Menzel:

 Dear ConTeXt folks,
 
 
 is it expected that \right)² is not recognized as \right)^2?

Yes it is, to enable this feature you need the “mathcrap” module.

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] [Regression] math: alignment parameters confused

2011-11-20 Thread Paul Menzel
Dear ConTeXt folks,


there must be a regression between

ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.7.24  int: english/english

and

ConTeXt  ver: 2011.10.14 22:47 MKIV  fmt: 2011.10.15  int: english/english.

Using the minimal example

\starttext
\placeformula
\startformula
\startmathalignment[n=4, align={left, right, middle, left}]
\NC A \NC B \NC C \NC D \NR
\NC AA \NC BB \NC CC \NC DD \NR
\stopmathalignment
\stopformula
\stoptext

the last row is aligned like middle instead of left.


Thanks,

Paul


2011.05.18--align.pdf
Description: Adobe PDF document


2011.10.14--align.pdf
Description: Adobe PDF document
\starttext
\placeformula
\startformula
\startmathalignment[n=4, align={left, right, middle, left}]
\NC A \NC B \NC C \NC D \NR
\NC AA \NC BB \NC CC \NC DD \NR
\stopmathalignment
\stopformula
\stoptext


signature.asc
Description: This is a digitally signed message part
___
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] \right)² not recognized as \right)^2

2011-11-20 Thread Paul Menzel
Am Sonntag, den 20.11.2011, 19:58 +0100 schrieb Wolfgang Schuster:
 Am 20.11.2011 um 19:52 schrieb Paul Menzel:

  is it expected that \right)² is not recognized as \right)^2?
 
 Yes it is, to enable this feature you need the “mathcrap” module.

Thank you for the quick answer, but ² is still not put at the correct
height when used like `\right)²`.


Thanks,

Paul


square.pdf
Description: Adobe PDF document
\usemodule[mathcrap]
\starttext

Using ^2:

\placeformula
\startformula
\left( a + b \right)^2 = a² + 2ab + b²
\stopformula

\placeformula
\startformula
\left( a + \frac72 \right)^2
\stopformula

Using ². The first example does not display the problem that well because the parenthesis are too small:
\placeformula
\startformula
\left( a + b \right)² = a² + 2ab + b²
\stopformula

\placeformula
\startformula
\left( n + \frac72 \right)²
\stopformula
\stoptext


signature.asc
Description: This is a digitally signed message part
___
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] \right)² not recognized as \right)^2

2011-11-20 Thread Khaled Hosny
On Sun, Nov 20, 2011 at 08:18:33PM +0100, Paul Menzel wrote:
 Am Sonntag, den 20.11.2011, 19:58 +0100 schrieb Wolfgang Schuster:
  Am 20.11.2011 um 19:52 schrieb Paul Menzel:
 
   is it expected that \right)² is not recognized as \right)^2?
  
  Yes it is, to enable this feature you need the “mathcrap” module.
 
 Thank you for the quick answer, but ² is still not put at the correct
 height when used like `\right)²`.

Looking at the mathcrap module (nice name :p), it seems the ² (and other
superscript characters) is defined as {\normalsuperscript{2}} and the
extra grouping makes the superscript to be applied to an empty base not
the brace. Not sure if removing that extra group is safe or not
(\normalsuperscript{2} on its own seems to be safe).

Regards,
 Khaled


signature.asc
Description: Digital 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] Is it possible to have \showlayout also display dimensions in inches?

2011-11-20 Thread Hans Hagen

On 20-11-2011 19:04, Pavneet Arora wrote:

Either in a separate column or in lieu of `cm'. For us those of us on
the left hand side of the Atlantic, and who struggle with decimal
numbers ;)?


Weren't you supposed to drop inches already for some decades? Anyhow, 
the next beta will provide:


\showlayout[cm,pt,in,cc]

or whatever one likes that tex knows about.

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] \right)² not recognized as \right)^2

2011-11-20 Thread Hans Hagen

On 20-11-2011 20:31, Khaled Hosny wrote:

On Sun, Nov 20, 2011 at 08:18:33PM +0100, Paul Menzel wrote:

Am Sonntag, den 20.11.2011, 19:58 +0100 schrieb Wolfgang Schuster:

Am 20.11.2011 um 19:52 schrieb Paul Menzel:



is it expected that \right)² is not recognized as \right)^2?


Yes it is, to enable this feature you need the “mathcrap” module.


Thank you for the quick answer, but ² is still not put at the correct
height when used like `\right)²`.


Looking at the mathcrap module (nice name :p), it seems the ² (and other
superscript characters) is defined as {\normalsuperscript{2}} and the
extra grouping makes the superscript to be applied to an empty base not
the brace. Not sure if removing that extra group is safe or not
(\normalsuperscript{2} on its own seems to be safe).


not grouping gives an error on $a₀₁₂₃₄₅₆₇₈₉₋₌₊$ (maybe we could have 
{}\normal... but on the other hand, this module is not really needed as 
mkiv already recognizes these funny chars 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] Overview screen containing multiple pages

2011-11-20 Thread Wolfgang Schuster

Am 20.11.2011 um 19:37 schrieb Aditya Mahajan:

 There is a python script called impressive 
 (http://impressive.sourceforge.net/) that adds some eyecandy to 
 presentations. One of the features that it has is an overview screen at the 
 end, like this: http://impressive.sourceforge.net/oview.png
 This is similar to the overview screen used in the ConTeXt showcase by Hans: 
 http://pragma-ade.com/show-man.pdf
 
 I want to include such an overview in my slides, but am not sure if it can be 
 done without using a separate tex file. My slides look like this (sorry 
 Thomas, I am not using simpleslides at the moment)
 
 \starttext
 \startsection[title={...}]
 
 \stopsection
 
 \startsection[...]
 ...
 \stopsection
 \stoptext
 
 Each section spans over multiple pages. What I want is to have a last page 
 which is equivalent to the following:
 
 \startcombination[n*n]
  {\externalfigure[\jobname][page=page-number-of-first-section]}{}
  {\externalfigure[\jobname][page=page-number-of-second-section]}{}
  
 \stopcombination
 
 I tried a simple test case
 
 \starttext
 \input knuth
 \page
 \externalfigure[\jobname][page=1,width=0.3\textwidth]
 \stoptext
 
 but that does not include the first page. So, I think that what I want is not 
 possible, but I wonder if others have different ideas on how this might be 
 implemented (after all \setuparranging does manage to do something similar 
 without the need for a separate tex file).


You can save a copy of the page in a box and print the collection of all boxes 
at the end of the document.

\newcount\sectionpage

\installpagehandler{sectionpage}%
  {\global\advance\sectionpage\plusone
   \global\expandafter\newbox\csname sectionpage:\number\sectionpage\endcsname
   \dowithnextbox
 {\global\expandafter\setbox\csname 
sectionpage:\number\sectionpage\endcsname\copy\nextbox
  \actualshipout{\flushnextbox}}
 \normalhbox}

\starttext

\setuppaper[method=sectionpage]

\input knuth

\page

\input tufte

\page

\scale[factor=300]{\box\csname sectionpage:1\endcsname}

\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] referencing

2011-11-20 Thread Meer, H. van der
Thanks Wolfgang for the code. 

Just in case it is of use I concocted my variation on this theme. Now this 
simply replaces the \in, \at and \about macro's with one that does not show on 
the page where the link originates, but behaves as of old everywhere else. I 
introduced the unskip in order to remove the space that ruins the end of a line 
when there is nothing to display. For example from \in{see there}[ref]. --this 
period would otherwise acquire a space before it.

\def\SamePageDo#1[#2]%
 {\doifreferencefoundelse{#2}
{\ifnum\referencepagestate=1
   \unskip%\unknown % reference is on the same page
  \else
#1[#2]%
 \fi}
{\unskip}} % reference not found
\let\oldin=\in
\let\oldat=\at
\let\oldabout=\about
\def\in{\SamePageDo\oldin}
\def\at{\SamePageDo\oldat}
\def\about{\SamePageDo\oldabout}

Hans van der Meer

On 20 nov. 2011, at 19:42, Wolfgang Schuster wrote:

 
 Am 20.11.2011 um 18:46 schrieb Hans van der Meer:
 
 I have the following question about references.
 
 Using for example \at one can say somehting like see on \at{page}[ref] for 
 the figure..
 But when the figure is one the same page it seems a bit superfluous to 
 reference to it. In the same manner it is a bit of an overkill to put a 
 hyperlink to the page where this link resides itself.
 
 It is clear that ConTeXt knows if it is on the same page as is referenced, 
 because then a link is coloured with contrastcolor instead of color.
 
 Now the question: how easy/difficult is it to either suppress such an 
 \at-reference or switch between chosen alternate texts for links on or off 
 the same page as the referenced item?
 
 \def\SamePage[#1]%
  {\doifreferencefoundelse{#1}
 {\ifnum\referencepagestate=1
\unknown % reference is on the same page
   \else
 \at[#1]%
  \fi}
 {\donothing}}
 
 \starttext
 
 \pagereference[one]
 \pagereference[two]
 
 One: \SamePage[one]
 
 \page
 
 Two: \SamePage[one]
 
 \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] referencing

2011-11-20 Thread Wolfgang Schuster

Am 20.11.2011 um 21:26 schrieb Meer, H. van der:

 Thanks Wolfgang for the code. 
 
 Just in case it is of use I concocted my variation on this theme. Now this 
 simply replaces the \in, \at and \about macro's with one that does not show 
 on the page where the link originates, but behaves as of old everywhere else. 
 I introduced the unskip in order to remove the space that ruins the end of a 
 line when there is nothing to display. For example from \in{see there}[ref]. 
 --this period would otherwise acquire a space before it.

Instead of \unskip you should use \removeunwantedspaces which does a check 
before it calls \unskip.

 \def\SamePageDo#1[#2]%
 {\doifreferencefoundelse{#2}
{\ifnum\referencepagestate=1
   \unskip%\unknown % reference is on the same page
  \else
#1[#2]%
 \fi}
{\unskip}} % reference not found
 \let\oldin=\in
 \let\oldat=\at
 \let\oldabout=\about
 \def\in{\SamePageDo\oldin}
 \def\at{\SamePageDo\oldat}
 \def\about{\SamePageDo\oldabout}

Don’t redefine \in, at and \about because all three commands can also be used 
in math mode where they have a different meaning but with your redefinition 
they can’t be used anymore for math.

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] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-20 Thread Robin Kirkham
On 18/11/2011, at 10:00 PM, Pontus Lurcock p...@talvi.net wrote:

 On Fri 18 Nov 2011, Hans Hagen wrote:
 so, best is that those asking for it come up with a list of issues:
 which symbols need this option, is it language related or whatever,
 so that i can do them all at once. We can already have different
 mapping sets so spacing could be part of that.
 
 I don't personally have a need for units in the foreseeable future (I
 was just nitpicking with Robin about spacing) so feel free to ignore
 any of my suggestions, but I think the summary so far would be:
 
 1. Spacing for almost all SI units should be the same and doesn't
   need special cases.
 
 2. Geographical degrees/minutes/seconds should have no spaces.
 
 3. Spacing for degrees temperature varies according to different style 
   guides -- both before and after the ° -- so ideally it would be
   possible to set these independently of the rest of the units.
 
 For my own part I would add:
 
 4. SI unit abbreviations are mostly capital letters, and look (to me)
   strange with old-style figures. I have seen books which used 
   old-style figures for page numbers, years, etc. but switched to
   lining figures when a unit was involved; this is also what I did
   in my thesis. So I think it would be useful to allow an automatic
   switch to lining figures to be configured when typesetting a unit.
 
 Pont

I agree on points 1 and 2 (although it seems arcminute and arcsecond are
not implemented anyway). Point 3, yes, but I'm dubious about space after °
for the temperature units °C or °F as it breaks the rule about unit
ambiguity (° C is a degree-Coulomb -- although I can't image a physical
situation that would need such a unit). Point 4 is a bit beyond the scope
of the SI units scheme but sounds like a potential need.

Over the weekend I've discovered a couple more problems with \unit so I'll
make up some test cases and desired output and post it in a few days.

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