# [XeTeX] tabular in footnote

Thu Dec 8 16:39:44 CET 2011


On 08.12.2011 12:16, Zdenek Wagner wrote:
> 2011/12/8 Tobias Schoel<liesdiedatei at googlemail.com>:
[snip]

> There is no TeX level and LaTeX level. You have always the same set of
> primitives (with extensions) but no one codes using the primitives
> only.
Yes, there is a difference: TeX typesets what LaTeX tells it to. LaTeX
transforms the structures and information _I give to LaTeX_, into
typesetting commands for TeX.

Even plain (Xe)TeX defines macros and most of them are shared in
> LaTeX. The difference is that LaTeX offers additional macros and
> changes some plain TeX macros (e.g. \line in plain TeX means \hbox to
> \hsize but in LaTeX it draws a line in the picture environment).
>
>> Yes. It's not (Xe)LaTeX's purpose. It's (Xe)TeX's purpose.
>>
>> But when using (Xe)LaTeX, I don't want to care about different modes.
>> (Xe)LaTeX should "understand" the structure, I give to text, the different
>> formatting options, I give to the structures, and should tell TeX, how to
>>
> The meaning of all these structures depends on the mode.
No, the meaning is does not depend on the mode. The tabular environment
means, that the stuff inside is set as a table (with some options, bla
blubb). At this point in workflow, as an author I don't care, how this
table will be placed on the page. LaTeX has to do it. And it guesses
based on the mode.

You cannot
> break a line into a few pages because a line is a line. It would be
> nonsense to have the upper part of characters on one line and the
> lower part on another page.
Why would I do this, and what does this have to do with LaTeX giving me
tools to structure and format my text.

This is the same with a table. The tabular
> environment must be handled in a different way if it appears in the
> middle of a paragraph.
Then LaTeX should treat tabulars differently, depending on the mode.

The problem is, that the LaTeX manual does not
> say what happens if such object are inserted within a paragraph.
It should, because of what you will say next.
[snip]
> No, tabular is just a box as anything else, footnote is an insert.
From the technical side, I don't care. As far as I'm concerned, tabular
can be 1000 times \relax or whatever, as long as it does, what it says
it does (and nothing more): give me a table. From the structure side, I
agree: a tabular is a box with specially laid out content; a footnote is
a small mark and the task to do something at the foot of the page.
> There is nothing specila with these structures. The problem is that a
> footnote is a paragraph and tables usually do not appear in the middle
> of a paragraph.
OK, so what I do care about, is how the tabular I want interacts with
the surrounding material. LaTeX has a default for this because it needs
a default for such things and Lamport has supposedly thought well about
it. So when I'm don't agree with that interaction, I need to tell LaTeX
tabular should have the same basline as the surrounding line, and the
next line should start below the tabular. How, how nice, that Lamport
has thought of this idea (although not the default) and gave me the
possibility to express this wish via the optional argument [t].

The tabular environment was not designed to work well
> in the middle of a paragraph.
It does a fair job. The only thing I'd critisize concerning the issue
is, that a \toprule or top \hline with [t] yields a tabular set below
the baseline, because the \hline or \toprule are interpreted as the top
line [at least I think so}]. This I would regard as a bug.

If a user wants to do it, he or she is
> supposed to cope with it.
Yes, but only because LaTeX's behaviour isn't defined well in beforehand.
LaTeX has a strong macro language and
> anything can be defined. Macros for proper alignment of tables in the
> middle of a paragraph can be designed but I am afraid there will not
> be a general solution. If I were supposed to write such a
> general-purpose macro, I would not know how to do it because I do not
> know any general rule how a table should be aligned in the middle of a
> paragraph.
Assuming, the content of the table is textual, it should be aligned
along baselines or bounding boxes. One could also think of options to
align it in a way nodes in TikZ/pgf are aligned.
[snip]
> There are nice plain TeX tricks that cannot be achieved with
> \newcommand.
As a LaTeX-_User_ I'm not interested in tricks of macro programming.
That's the field of package programmers. For me, a usual programming
interface like \newcommand, \newenvironment with optional and obligatory
arguments or a keyval-control is sufficient.

On the other hand, \DeclareRobustCommand is a useful
> macro for defining robust macros in LaTeX. If you take some features
> from the plain TeX and some features from LaTeX, your life will be
> easier.
I'd prefer keeping to one of them. As you said, some plain-TeX
primitives / macros (I still don't get the difference) are reprogrammed
by LaTeX, so I could get confused.