From: Andreas Schneider <aksdb@gmx.de>
To: ntg-context@ntg.nl
Subject: Re: \everyaftershipout isn't "called" for every pagebreak
Date: Sun, 17 Jan 2010 23:13:16 +0100 [thread overview]
Message-ID: <hj021o$ceq$1@ger.gmane.org> (raw)
In-Reply-To: <4B5384E1.5010604@wxs.nl>
> 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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-01-17 22:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 16:53 Andreas Schneider
2010-01-16 20:00 ` Wolfgang Schuster
2010-01-16 21:58 ` Andreas Schneider
2010-01-17 20:42 ` Hans Hagen
2010-01-17 21:16 ` Andreas Schneider
2010-01-17 21:45 ` Hans Hagen
2010-01-17 22:13 ` Andreas Schneider [this message]
2010-01-17 22:25 ` Martin Schröder
2010-01-17 22:59 ` Hans Hagen
2010-01-18 12:12 ` Andreas Schneider
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hj021o$ceq$1@ger.gmane.org' \
--to=aksdb@gmx.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).