ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Fwd: Re: aligning a table alignment with local footnotes
Date: Tue, 30 May 2017 00:59:15 +0200	[thread overview]
Message-ID: <520ee356-f707-af04-b49c-e55c9136b27b@wxs.nl> (raw)
In-Reply-To: <352d56f3-a8d4-5e31-ba5b-14f77fa1acdc@wxs.nl>




-------- Forwarded Message --------
Subject: Re: [NTG-context] aligning a table alignment with local footnotes
Date: Tue, 30 May 2017 00:58:47 +0200
From: Hans Hagen <pragma@wxs.nl>
To: Alan Bowen <bowenalan03@gmail.com>

On 5/30/2017 12:33 AM, Alan Bowen wrote:
> What is the best way to center a table and control/fix the textwidth of 
> the local footnotes?
> 
> I currently have:
> 
> \starttext
> 
> \startbuffer[Tab01]
> \startlocalfootnotes
> \bTABLE
> \bTR\bTD So\eTD\bTD what%
> \footnote{\input knuth} % <=
> \eTD\eTR
> \eTABLE
> {\placelocalfootnotes}
> \stoplocalfootnotes
> \stopbuffer
> 
> \startplacetable[title=Test,
> align=middle]
>                    {\getbuffer[Tab01]}
> \stopplacetable
> 
> \stoptext
> 
> If the footnote is commented out, the table is centered (as I want it). 
> With the footnote, the table is flushleft. I have managed to get what I 
> need by defining the \hsize of the footnotes and tweaking the loffset of 
> the table. But a general, less “empirical” approach would be vastly better.
\starttext

\startbuffer[Tab01]
\startlocalfootnotes
     \setbox\scratchbox\vbox{\bTABLE
         \bTR\bTD So\eTD\bTD what\footnote{\input knuth}\eTD\eTR
     \eTABLE}%
     \hsize\wd\scratchbox
     \box\scratchbox
     \par
     \placelocalfootnotes
\stoplocalfootnotes
\stopbuffer

\startplacetable[title=Test,align=middle]{\getbuffer[Tab01]}
\stopplacetable

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2017-05-29 22:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 22:33 Alan Bowen
     [not found] ` <352d56f3-a8d4-5e31-ba5b-14f77fa1acdc@wxs.nl>
2017-05-29 22:59   ` Hans Hagen [this message]
2017-05-30 13:34   ` Alan Bowen
2017-05-30  1:05 ` Aditya Mahajan
2017-05-30 13:37   ` Alan Bowen

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=520ee356-f707-af04-b49c-e55c9136b27b@wxs.nl \
    --to=pragma@wxs.nl \
    --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).