ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henry House <hajhouse@hajhouse.org>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: footnotes in floating tables
Date: Sun, 19 Jul 2015 05:59:43 -0700	[thread overview]
Message-ID: <20150719125943.GB21879@houseag.com> (raw)
In-Reply-To: <55AA264E.5010009@wxs.nl>

I am using the following to style floating tables and am having some
difficulties with footnotes in the tables.

    \enableregime[utf]
    \setupbodyfont[modern]
    \setupbodyfont[11pt]

    \setupfloats[location=middle,spacebefore=0ex,spaceafter=8ex]
    \setupcaptions[location=top,inbetween={\blank[0cm]},spaceafter=2ex,spacebefore=1ex,headstyle=\sc]
    \setupTABLE[frame=off,offset=0ex]
    \setupTABLE[c][distance=0.6em]
    \def\tableheadrulethickness{1.0pt}
    \defineframed[footnoteframed]\setupframed[footnoteframed][width=\hsize,frame=off,align=right,top=\hbox\bgroup,bottom=\egroup]
    % Use the set of symbols that has become customary in many publications for footnote marks, whose
    % origin seems to be lost in the misty dawn of history:
    \defineconversion[tablefootnoteconversion][*,†,‡,§,\textbar\textbar,¶]

    \starttext
    %%% Begin title page.
    \startalignment[center]
            {\ssb Title}
    \stopalignment
    %%% End title page.

    Hello.

    {
        \placetable[top,page][table]{
            Caption 1.
        }{
                \bTABLE%
                \bTR{}\bTD{}X \eTD\bTD{}Y\eTD\eTR%
                \bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR%
                \eTABLE%
        }
    }

    {
            \setupfootnotes[conversion=tablefootnoteconversion] % MkII
            % \setupnotation[footnote][numberconversion=tablefootnoteconversion] % MkIV
            \startlocalfootnotes
        \setupTABLE[r][1][bottomframe=on,align=low,rulethickness=\tableheadrulethickness]
        \setupTABLE[r][each][align={flushleft,verytolerant,hyphenated}] % Hyphenate words in table body
        \setupTABLE[r][1][align={flushleft,low,verytolerant,nothyphenated}] % but not in header row.
        \placetable[top,page][table]{
            Table 2 caption.\footnote{Footnote in caption. Footnote in caption.
            Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption.
            }\footnote{Second footnote in caption.}
            \placelocalfootnotes
        }{
            \placelegend{
                \bTABLE%
                \bTR{}\bTD{}A\note[Footnote_mark_1] \eTD\bTD{}B\note[Footnote_mark_2]\eTD\eTR%
                \bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR%
                \eTABLE%
                \footnotetext[Footnote_mark_1]{Footnote to column A. Footnote to column A. Footnote to column A. Footnote to column A.}\footnotetext[Footnote_mark_2]{Footnote to column B.}
            }{
                \footnoteframed{\placelocalfootnotes}
                \stoplocalfootnotes
            }
        }
    }

    \stoptext

MkII --- this comes close to what I want.

- Captions are centered above the TABLE, more or less, and long captions
  are constrained to a width having reasonable relationship to the width
  of the TABLE.
- Footnotes in the caption appear in a block of reasonable width at the
  bottom of the caption above the TABLE.
- Footnotes in the TABLE appear in a block below the TABLE whose left
  margin matches the TABLE's left margin.
- Symbols are being used for footnote marks.

Problems:

- I'd like the very short caption of the first table to be centered above
  the TABLE, but what I actually get seems to be paragraph with an
  invisible right margin that is centered over the TABLE, but at the text
  does not reach the paragraph's right margin, it looks misaligned. The
  same misaligment occurs in the second table's caption, though it is
  not so objectionable there as the footnotes' texts fill the width.
- The block of footnote texts of the TABLE is not wrapped at a reasonable
  width --- they seem to be left-aligned, but their right margin runs off
  the page.
- I'd like one numbering scheme for the for the whole table (caption and
  TABLE), such that the caption's notes are numbered *, † and the TABLE's
  notes are ‡, §. What I actually get is *, † for both, i.e., the
  numbering resets between caption and TABLE.
- I'd like commas separating multiple footnote marks next to each other,
  as in the caption in the example.
- Minor: I'd like to suppress the table from being placed on the the first
  page of the document as it floats above the title block, confusingly. A
  minor problem as realstically a table is unlikely to be placed this early
  in a real document.

MkIV (with change from \setupfootnotes to \setupnotation[footnote] as
noted) --- there are several new problems.

- The caption's footnotes are not printed, though their marks are.
- The TABLE's footnote marks are not printed (unknown references), but the
  notes themselves are (though wrongly).
- The texts of all the footnotes in the TABLE are run together into a
  single line that doesn't break at all.
___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2015-07-19 12:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18  7:45 Temporary spacing between letters Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-18 10:11 ` Hans Hagen
2015-07-18 10:22   ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-19 12:59   ` Henry House [this message]
2015-07-20 14:01     ` footnotes in floating tables Alan BRASLAU

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=20150719125943.GB21879@houseag.com \
    --to=hajhouse@hajhouse.org \
    --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).