Re: [NTG-context] last chapter number

2010-01-17 Thread Wolfgang Schuster

Am 16.01.2010 um 23:08 schrieb Andreas Harder:

 can you try \convertedstructurecounter[chapter][type=last]
 
 Hello Wolfgang,
 
 I tried, but it only outputs nothing visible.

Sorry, my fault. Section numbering use their own system to save and get the 
numbers.

What you can do is to save the number of the last chapter at the end of the 
document
with two pass data (\definetwopasslist) and use the result in the second run or 
you
what for a solution from Hans.

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] last chapter number

2010-01-17 Thread Andreas Harder

Am 17.01.2010 um 09:13 schrieb Wolfgang Schuster:

 
 Am 16.01.2010 um 23:08 schrieb Andreas Harder:
 
 can you try \convertedstructurecounter[chapter][type=last]
 
 Hello Wolfgang,
 
 I tried, but it only outputs nothing visible.
 
 Sorry, my fault. Section numbering use their own system to save and get the 
 numbers.
 
 What you can do is to save the number of the last chapter at the end of the 
 document
 with two pass data (\definetwopasslist) and use the result in the second run 
 or you
 what for a solution from Hans.

Thank you Wolfgang! You pointed me to \definetwopasslist and that brought me to 
the following solution (without \definetwopasslist):

\newcounter\ChapNum
\def\NofChaps{0}

\definehead
  [chapter]
  [before=\increment\ChapNum,
after=\savecurrentvalue\NofChaps{\countervalue{ChapNum}}]

\starttext
Dieses Dokument besteht aus \NofChaps\ Kapiteln.
\dorecurse{9}{\chapter{Kapitel #1}}
\stoptext

Nonetheless the needed information is already present even more if one uses a 
table of contents …


Andreas
___
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] last chapter number

2010-01-17 Thread Wolfgang Schuster

Am 17.01.2010 um 13:06 schrieb Andreas Harder:

 Nonetheless the needed information is already present even more if one uses a 
 table of contents …

The table of contents needs two passes too but only Hans can say (or provide
a command like \convertedstructurecounter for section numbers) how you can
access these information.

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] itemize-margin-break joinedup

2010-01-17 Thread Hans van der Meer
The joinedup parameter in \startitemize is meant to close the gap  
between the list and the preceding material. The margin parameter is  
for horizontal movement of the list, is I understand it. However,  
addition of a margin to the \startitemize disables the joinedup. Is  
this expected behaviour? Below is a minimal example showing the effect.


Hans van der Meer

\setupblank[small]
\setupitemize[n,packed]
\starttext

\contextversion\ After \type{\startitemize[joinedup]} joinedup ok:
\startitemize[joinedup]
\item sub a
\startitemize
\item sub a1
\item sub a2
\stopitemize
\item sub b
\stopitemize

\contextversion\ After type[joinedup,margin=2cm] joinedup ineffective:
\startitemize[joinedup,margin=2cm]
\item sub a
\startitemize
\item sub a1
\item sub a2
\stopitemize
\item sub b
\stopitemize

\stoptext



itemize.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] itemize-margin-break joinedup

2010-01-17 Thread Wolfgang Schuster

Am 17.01.2010 um 13:46 schrieb Hans van der Meer:

 The joinedup parameter in \startitemize is meant to close the gap between the 
 list and the preceding material. The margin parameter is for horizontal 
 movement of the list, is I understand it. However, addition of a margin to 
 the \startitemize disables the joinedup. Is this expected behaviour? Below is 
 a minimal example showing the effect.


I wonder how often I already wrote this sentence but the answer to your 
question is:

You can mix keywords and assignments in the same setup command.

It works when you write:

\startitemize[joinedup][margin=2cm]

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] numbered itemize

2010-01-17 Thread Hans van der Meer
Risking that, like my previous question, this one too will be posed  
the Nth time, I nevertheless ask.
Typesetting a numbered list I tried a lot of paramaters on the itemize  
macros, but always the code:


\startitemize[][start=8]
\item a
\item b
\item c
\item d
\stopitemize

results in:

8. a
9. b
10. c
11. d

whereas I would have had:

 8. a
 9. b
10. c
11. d

That is, the item labels aligned at the stoppers.

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
___


Re: [NTG-context] numbered itemize

2010-01-17 Thread Hans van der Meer
Tricked by the mail program editor! Of course I meant to accomplish  
(with | for the left edge):


| 8. a
| 9. b
|10. c
|11. d

Hans van der Meer


On 17 jan 2010, at 14:51, Hans van der Meer wrote:

Risking that, like my previous question, this one too will be posed  
the Nth time, I nevertheless ask.
Typesetting a numbered list I tried a lot of paramaters on the  
itemize macros, but always the code:


\startitemize[][start=8]
\item a
\item b
\item c
\item d
\stopitemize

results in:

8. a
9. b
10. c
11. d

whereas I would have had:

8. a
9. b
10. c
11. d

That is, the item labels aligned at the stoppers.

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
___


___
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] numbered itemize

2010-01-17 Thread Wolfgang Schuster

Am 17.01.2010 um 15:06 schrieb Hans van der Meer:

 Tricked by the mail program editor! Of course I meant to accomplish (with | 
 for the left edge):
 
 | 8. a
 | 9. b
 |10. c
 |11. d

\startitemize[fit][start=8,itemalign=flushright]

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] numbered itemize

2010-01-17 Thread Hans van der Meer

Thanks.
'itemalign' seems absent from the original ConTeXt-manual I have in  
use (but that is fairly old, of course).


Your code results in very tight item labels:
1.start-of-item-text

I managed to get
1. start-of-item-text

by using [stopper={.~}] But is there a more general way to enlarge the  
item's width? Using [width=dimension] seemed no help, neither did  
changing [fit] with [broad], [2*broad]. And using  
[itemwidth=dimension] as an analogy to itemalign neither.


Hans van der Meer




On 17 jan 2010, at 15:11, Wolfgang Schuster wrote:



Am 17.01.2010 um 15:06 schrieb Hans van der Meer:

Tricked by the mail program editor! Of course I meant to accomplish  
(with | for the left edge):


| 8. a
| 9. b
|10. c
|11. d


\startitemize[fit][start=8,itemalign=flushright]

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
___


Re: [NTG-context] numbered itemize

2010-01-17 Thread Wolfgang Schuster

Am 17.01.2010 um 15:28 schrieb Hans van der Meer:

 Thanks.
 'itemalign' seems absent from the original ConTeXt-manual I have in use (but 
 that is fairly old, of course).

itemalign is a newer option (was added about 2 years ago)

 Your code results in very tight item labels:
 1.start-of-item-text
 
 I managed to get
 1. start-of-item-text
 
 by using [stopper={.~}] But is there a more general way to enlarge the item's 
 width? Using [width=dimension] seemed no help, neither did changing [fit] 
 with [broad], [2*broad]. And using [itemwidth=dimension] as an analogy to 
 itemalign neither.

\startitemize[n,fit,broad][start=8,itemalign=flushright]
\dorecurse{10}{\item item \recurselevel}
\stopitemize

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] numbered itemize

2010-01-17 Thread Peter Münster
On Sun, Jan 17 2010, Hans van der Meer wrote:

 But is there a more general way to enlarge the 
 item's width? Using [width=dimension] seemed no help

Hello Hans,

It works here:

\starttext
\startitemize[width=5em]
\item bla
\stopitemize
\stoptext

My version: 2010.01.15 15:49

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] numbered itemize

2010-01-17 Thread Wolfgang Schuster

Am 17.01.2010 um 15:49 schrieb Peter Münster:

 On Sun, Jan 17 2010, Hans van der Meer wrote:
 
 But is there a more general way to enlarge the 
 item's width? Using [width=dimension] seemed no help
 
 Hello Hans,
 
 It works here:
 
 \starttext
 \startitemize[width=5em]
 \item bla
 \stopitemize
 \stoptext

That's not the problem, what did not work is

- 'itemalign=...' in combination with 'width=dimen' and
- 'fit' in combination with 'distance=dimen'

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] numbered itemize

2010-01-17 Thread Peter Münster
On Sun, Jan 17 2010, Wolfgang Schuster wrote:
 
 That's not the problem, what did not work is
 
 - 'itemalign=...' in combination with 'width=dimen' and
 - 'fit' in combination with 'distance=dimen'

Bug or feature?  Should we add it to the tracker?

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] numbered itemize

2010-01-17 Thread Wolfgang Schuster

Am 17.01.2010 um 16:17 schrieb Peter Münster:

 On Sun, Jan 17 2010, Wolfgang Schuster wrote:
 
 That's not the problem, what did not work is
 
 - 'itemalign=...' in combination with 'width=dimen' and
 - 'fit' in combination with 'distance=dimen'
 
 Bug or feature?  Should we add it to the tracker?

Bug, I think. Can you add them?

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] lost in documentation

2010-01-17 Thread Wolfgang Werners-Lucchini
 Can you make a minimal example or should we waste our time to write
 one for you?
 
 Wolfgang

Sorry, here it is:

\starttext
From texshow-web
{
\setuphead[section-3][bodypartconversion=Characters]
\section{One}
}
but this does not work. I deleted the 's' from Characters
{
\setuphead[section-3][bodypartconversion=Character]
\section{Two}
}
but that is not working too.

At the garden page 'titles' I found
{
\setupsection[section-3][bodypartconversion=Character]
\section{Three}
}
that works, but it does not correspont to the syntaxdescription in
texshow-web, which is

\starttyping
\setupsection[...][...][...,...=...,...]
[...]   name
[...]   name
conversion  numbers characters Characters romannumerals Romannumerals
previousnumber  yes no
\stoptyping

The second parameter should be a 'name' and bodypartconversion is not
a parameter at all.

Looking at the description, my problem should be solved by
{
\setupsection[section-3][][conversion=Characters]
\section{four}
}
and this works. But the version
{
\setupsection[section-3][conversion=Characters]
\section{five}
}
works too. Why? And what is the difference to the first solution?
\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] footnotes and naturalTABLES - Bug?

2010-01-17 Thread Bernhard Rosensteiner
Hello all,

when i place a footnote in a naturalTABLE the output at the bottom is always 
multiplied by four per footnotemarker.
In normal tables it works normal (see minimal example in attachment). Is this a 
bug or make i something wrong?





footnotetest.tex
Description: Binary data


footnotetest.log
Description: Binary data



best regards
Bernhard



___
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] \everyaftershipout isn't called for every pagebreak

2010-01-17 Thread Hans Hagen

On 16-1-2010 22:58, Andreas Schneider wrote:

Wolfgang Schuster wrote:


This can't work because TeX collects mote material than it needs for the
current page and the same happens with the footnotes, the only thing you
can do is to use two pass data

Wolfgang


Is there not even some event in Lua that could be used to handle this case?
I think MkIV compatibility is all I need.
In case this is also not possible: can you give me a hint where to learn
more about twopass processing? Is there in MkIV still something that
requires two (or more) passes that I could take a look at to learn how to do
it? (I guess I can understand Lua easier than plain TeX, so I guess MkII is
out of the picture.)


It depends on your document. We have workflows where we can do with one 
pass in which case we run with --once (--runs=2 or so)


Future versions of context mkiv might need one run less (in some cases) 
or one perceived run (which saves startup cycles) but as Wolgangs 
explained already, in more complex cases we cannot do with less runs as 
any change haping now can influence something a few pages back which in 
turn might influence what follows.


Normally, when you correct only typos there will be no multiple runs.

MkIV already is more efficient as we now always assume an advanced pdf 
backend so that we don't need to use the MkII the object reference 
mechanism.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] \everyaftershipout isn't called for every pagebreak

2010-01-17 Thread Andreas Schneider
Hans Hagen wrote:
 It depends on your document. We have workflows where we can do with one
 pass in which case we run with --once (--runs=2 or so)
 
 Future versions of context mkiv might need one run less (in some cases)
 or one perceived run (which saves startup cycles) but as Wolgangs
 explained already, in more complex cases we cannot do with less runs as
 any change haping now can influence something a few pages back which in
 turn might influence what follows.
 
 Normally, when you correct only typos there will be no multiple runs.
 
 MkIV already is more efficient as we now always assume an advanced pdf
 backend so that we don't need to use the MkII the object reference
 mechanism.
 
 Hans

In my example I can't even get \pagenumber to work correctly. If I replace 
my \test macro with \pagenumber, the first 4 pages all print page 1 (since 
it's still the same paragraph). Is there anything I can do about that? (Of 
course my main concern is the original problem of not catching page breaks 
to reset a variable).

I also can't quite work out a multi-pass solution ... the only way I could 
imagine how it could work is by storing the content I would like to print 
together with the coordinates it was printed to in the first run, and in the 
second run evaluate from these information when a page break occured and 
modify the data accordingly. But I'm a bit lost here where to start ... my 
TeX knowledge is rather basic and I don't know anything about the luatex 
internals so I don't know if there are any events I could hook (and when and 
where to hook them :-/).

I would be very grateful if you could point me in a direction I can work 
forward from - I can only guess that there are similar mechanisms in the 
already existing MkIV code ... although the \pagenumber problem seems to 
indicate that it might be near to impossible :-/

Best Regards,
Andreas.

___
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] footnotes and naturalTABLES - Bug?

2010-01-17 Thread Hans Hagen

On 17-1-2010 19:21, Bernhard Rosensteiner wrote:

Hello all,

when i place a footnote in a naturalTABLE the output at the bottom is always 
multiplied by four per footnotemarker.
In normal tables it works normal (see minimal example in attachment). Is this a 
bug or make i something wrong?


sort of a bug ... has to do with trialtypesetting runs (a mechanism that 
i need to overhaul for mkiv)


fixed in beta

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] \everyaftershipout isn't called for every pagebreak

2010-01-17 Thread Andreas Schneider
 dealing with multipass data in mkiv is completely different from mkii
 and at some point there will be a proper api for users (makes no sense
 now as i might as well change internals along with luatex developments)
 
 in mkiv we store info in tables and much is available during a document
 run anyway (in mkii we filter data from the tuo file) so the question
 is, what info do you need? it's probably easier to provide it as core
 functionality
 
 so i need speccs and a small test file
 
 Hans

Thanks for that info!
I think for specs my plan is too vague. I will explain what my goal is 
then you either see a good solution and/or tell me that this is out of scope 
for now :-)

The test file to demonstrate the problem is in my initial newsgroup post for 
this thread. I will re-attach it here.

What I need would be a precise page break handling. Currently ConTeXt seems 
to process a whole paragraph as one object, and then breaks it down to 
individual pages. That leads to a problem however:
I want to refine my citation style. All bibliography is inserted into 
footnotes. If two (or more) consecutive citations _on the same page_ refer 
to the same bib entry, the footnote for that citation should read Ibidem. 
Therefore I have to remember the last cited entry. Currently I use 
\appendtoks...\to\everyaftershipout to reset/clear the variable I use for 
storing that last entry. That works fine as long as the paragraphs are 
small. If however several citations within one (possibly large) paragraph 
are separated by a page break, the output will be wrong, since the event to 
reset the variable occurs too late (see above).

The problem can be demonstrated with this example - the first footnote on 
each page should be New.

\define\test{\doifelse{\getvalue{testvar}}{page}{%
  \footnote{Repeat}%
}{%
  \footnote{New}%
  \setvalue{testvar}{page}%
}}

\appendtoks
  \global\setvalue{testvar}{}
\to\everyaftershipout

\starttext
  \dorecurse{10}{\dorecurse{250}{text }\test}

  \dorecurse{10}{\dorecurse{250}{text }\test}
\stoptext


Best Regards,
Andreas.

___
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] \everyaftershipout isn't called for every pagebreak

2010-01-17 Thread Martin Schröder
2010/1/17 Andreas Schneider ak...@gmx.de:
 What I need would be a precise page break handling. Currently ConTeXt seems
 to process a whole paragraph as one object, and then breaks it down to
 individual pages. That leads to a problem however:

This is how TeX works. :-)

Best
Martin
___
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] last chapter number

2010-01-17 Thread Hans Hagen

On 17-1-2010 13:36, Wolfgang Schuster wrote:


Am 17.01.2010 um 13:06 schrieb Andreas Harder:


Nonetheless the needed information is already present even more if one uses a 
table of contents …


The table of contents needs two passes too but only Hans can say (or provide
a command like \convertedstructurecounter for section numbers) how you can
access these information.


i'm sure that you can figure it out if needed but i can certainly add 
something


 \convertedstructurecounter[chapter][type=last]

but as

 \convertedstructurecounter[section][type=last]

is ambiguous it needs a bit of thinking, as it more relates to lists 
like criteria then


of course one can use a reference for the last chapter instead

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] \everyaftershipout isn't called for every pagebreak

2010-01-17 Thread Hans Hagen

On 17-1-2010 23:13, Andreas Schneider wrote:

dealing with multipass data in mkiv is completely different from mkii
and at some point there will be a proper api for users (makes no sense
now as i might as well change internals along with luatex developments)

in mkiv we store info in tables and much is available during a document
run anyway (in mkii we filter data from the tuo file) so the question
is, what info do you need? it's probably easier to provide it as core
functionality

so i need speccs and a small test file

Hans


Thanks for that info!
I think for specs my plan is too vague. I will explain what my goal is
then you either see a good solution and/or tell me that this is out of scope
for now :-)

The test file to demonstrate the problem is in my initial newsgroup post for
this thread. I will re-attach it here.

What I need would be a precise page break handling. Currently ConTeXt seems
to process a whole paragraph as one object, and then breaks it down to
individual pages. That leads to a problem however:
I want to refine my citation style. All bibliography is inserted into
footnotes. If two (or more) consecutive citations _on the same page_ refer
to the same bib entry, the footnote for that citation should read Ibidem.
Therefore I have to remember the last cited entry. Currently I use
\appendtoks...\to\everyaftershipout to reset/clear the variable I use for
storing that last entry. That works fine as long as the paragraphs are
small. If however several citations within one (possibly large) paragraph
are separated by a page break, the output will be wrong, since the event to
reset the variable occurs too late (see above).

The problem can be demonstrated with this example - the first footnote on
each page should be New.

\define\test{\doifelse{\getvalue{testvar}}{page}{%
   \footnote{Repeat}%
}{%
   \footnote{New}%
   \setvalue{testvar}{page}%
}}

\appendtoks
   \global\setvalue{testvar}{}
\to\everyaftershipout

\starttext
   \dorecurse{10}{\dorecurse{250}{text }\test}

   \dorecurse{10}{\dorecurse{250}{text }\test}
\stoptext


as it takes less time wrting a helper than explaining how to do it i 
just added it as feature (a few years from probably only wolfgang 
remembers that it's there)


i'll upload a beta to the website that provides ...

\starttext

\dorecurse {100} {
test \footnote{\doifnoteonsamepageelse[footnote]{ibidem}{aaa}}
}

\stoptext

keep in mind that such features, depending on multiple passes, might 
result in a few more as it will never get things right the first time


actually, in some cases it might make sense to delete the tuc file 
before a run


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] location of /user/files?

2010-01-17 Thread paul morgan
On Sat, Jan 16, 2010 at 10:41 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Sat, 16 Jan 2010, paul morgan wrote:

  Thank you again Aditya and Khaled for getting ConTeXt working here. One
 more
 question for the list:

 Under MacTex or TexLive, not sure which one, on my 10.4.11 system, my
 setup
 and env* files were located in ~/Library/texmf/tex/context/user/ I rsynced
 that dir to  ~/context/tex/texmf-context/tex/context/user and ConTeXt is
 not
 finding them. Could someone please where I should put these files so
 context
 will find them? Thanks again,


 Did you run mktexlsr (for MkII) or luatools --generate (for MkIV)?


Thank you, after running luatools --generate, the files are found. The
command context (i.e. MkIV) is now finding errors with my setup files
which were created, and have always been used, under MkII - I get !
Undefined control sequence at \definelogo plus other errors.

After mktexlsr, MkII works as expected.

Is there a reference for commands/definitions which work in MkII but not in
MkIV?

Thanks again for your help,

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