From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/37454 Path: news.gmane.org!not-for-mail From: Steffen Wolfrum Newsgroups: gmane.comp.tex.context Subject: Re: Fwd: [XeTeX] Redefining the footnotes in XeTeX Date: Wed, 21 Nov 2007 16:23:10 +0100 Message-ID: <9EF237C6-3E7D-491B-8B2A-31814F94C7F6@st.estfiles.de> References: <019A3865-E9CA-4E2F-99E0-E7864A2280ED@gmail.com> <649AA66C-EF9E-4E37-A6A5-4F6617BCA92E@st.estfiles.de> <47442C6E.40804@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195658705 3177 80.91.229.12 (21 Nov 2007 15:25:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2007 15:25:05 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 21 16:25:11 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IurRN-0003Rp-FC for gctc-ntg-context-518@m.gmane.org; Wed, 21 Nov 2007 16:24:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 540D51FBC6; Wed, 21 Nov 2007 16:24:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02851-01; Wed, 21 Nov 2007 16:23:37 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7EF021FB8E; Wed, 21 Nov 2007 16:23:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AC7DE1FB8E for ; Wed, 21 Nov 2007 16:23:27 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20728-04-11 for ; Wed, 21 Nov 2007 16:23:17 +0100 (CET) Original-Received: from smtprelay07.ispgateway.de (smtprelay07.ispgateway.de [80.67.29.7]) by ronja.ntg.nl (Postfix) with ESMTP id D8AEA1FB71 for ; Wed, 21 Nov 2007 16:23:14 +0100 (CET) Original-Received: (qmail 8681 invoked from network); 21 Nov 2007 15:23:14 -0000 Original-Received: from unknown (HELO [192.168.1.2]) (698580@[89.247.60.193]) (envelope-sender ) by smtprelay07.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 21 Nov 2007 15:23:14 -0000 In-Reply-To: <47442C6E.40804@wxs.nl> X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:37454 Archived-At: 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" > 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 ___________________________________________________________________________________