Hi Hans,
Am 21.11.2007 um 14:02 schrieb Hans Hagen:
Steffen Wolfrum wrote:
BTW: are the benefit's of David's work also available for ConTeXters?
i've never looked into it, but because latex and context are set up
completely different it probably would mean more refactoring than i'm
willing to do
concerning multiple footnotes, it's been there for a while
What Brian, starting that thread on XeTeX-list, ment was this:
Am 20.11.2007 um 15:32 schrieb Brian Anderson:
What I'm trying to do is change the footnotes at the bottom of the
page from this:
1) first note
2) second note
..
6) sixth note
to this:
1) first note 2) second note
3) this is a long footnote, so it is on its own line
4) short note 5) short note 6) short note
I fear this is not (yet) possible in ConTeXt, right?
Anyway, in the meanwhile there was a verbose answer to this:
Was [EMAIL PROTECTED]
Datum: 21. November 2007 14:27:11 MEZ
Betreff: [XeTeX] Redefining the footnotes in XeTeX
Hi
If you are using plain XeTeX rather than the LaTeX variety, you
might be
able to tweak the example on p. 398 of _The TeXbook_, perhaps by
measuring
each footnote at the start of your definition of \fn and then if it
is over
a certain percentage of \hsize putting it all in an \hbox of length
\hsize:
\hbox to \hsize{Text of longish note.\hfill}
That should, I think, force the relevant notes to occupy a line by
themselves. But it might cause formatting difficulties with a
preceding
line of short footnotes, unless you could add \hss at the end of each
footnote. Anyway, perhaps worth fiddling with. (If you have any
notes that
occupy more than one line, you would need to set the calculation
_not_ to do
the above trick since it would overfill the \hbox and in any case
you would
presumably want any following short note to appear in the breakline
of the
long note.)
My own ploy for doubling up footnotes (currently only allowing
automatic
setting of a short footnote full right in the breakline of a previous
footnote, though it could in principle be made into a more
sophisticated
routine, I think) is to do various measurements every time a
footnote is
encountered to see if there is enough room (the space available
gets put
into a dimen \availablespace). The whole of the \fn command is
given as an
\if \else \fi
sequence (since if the footnote is over a certain length it can't
be doubled
up with the previous note anyway), and I use a double set of braces
round
footnotes since I might want to tweak the footnote arrangement
manually
(either because it has messed up or because it happens to look
better on a
given page - e.g. to reduce white space between text and notes - if
a short
note does after all go into its own line). So:
{\fn{This is the footnote.}}
If I want to make sure that that footnote is _not_ doubled up (even
if there
is room to do so), I can give
{\availablespace 0pt \fn{This is the footnote.}}
And if I want to ensure that it _is_ doubled up even if (for some
reason) it
isn't doing it, I can give
{\availablespace \hsize \fn{This is the footnote.}}
Now, to calculate the \availablespace on completion of each note
(so that
the next note knows what it is), my version of \fn puts the note
into a
temporary \hbox and then sets up a \vbox which contains the
\unhboxed text
of the note surrounded by $$$$. That lets me get at
\predisplaysize and
I can use that to make the calculation, which it does by setting
\availablespace globally so that the measurement migrates out of
the group
in which all this is going on, and can be used by the next note.
I would post the entire macro but it's embarrassingly ropey,
written many
years ago when I first made acquaintance with TeX and was asked by the
publisher to double up the footnotes. It has unresolved glitches
(hence the
double braces {\fn{}} which allow local control immediately before the
\fn) - in particular, it doesn't interact well with the page-breaking
mechanism so that it will place a short footnote full right even on
a new
page (I override this by giving \availablespace 0pt). I've never
got round
to attempting an output routine that would ensure this doesn't happen,
though it should certainly be possible.
Anyway, perhaps a few ideas for you to ponder over your evening
cocoa...
Best
John
Hans, can you build a routine upon this for ConTeXt?
(Just in case it's not too weird!!!)
Steffen
___
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