tabular inside figure

96 views
Skip to first unread message

Rob Beezer

unread,
Dec 5, 2022, 1:50:56 PM12/5/22
to prete...@googlegroups.com
[From the like-named thread on pretext-support.]

David Farmer proposes a new element that could be placed into a "figure", for
the provoking use case of a table of function values. Meaning from \mathbb{R}
to \mathbb{R}. So two columns when paired with a plot, or maybe two rows when
trying to save trees.

But also a Cayley table. Which is a function from G x G to G (aka, a binary
operation).

David mentioned a "logic table" with "truth values". Two columns labeled A
and B with rows holding four combinations of T and F (or 0 and 1 for computer
logic). Then several columns with conjunctions and disjunctions. But each such
column is really a single function.

So, a trial balloon: "function-values". Child of "figure", same structure for
rows and columns as "tabular".

1. The validation-plus stylesheet would advise if a "function-values" got "too
big" and began to look like a CMoS table of values that was not a mathematical
function. Some planned features for table/tabular such as notes at the bottom
would not be available for the new element.

2. Everybody's favorite: besides commenting on the utility, how about an
element name? We like the "function" part. "function-data" sounds more like
what a "tabular" should be. "function-values" is trending to being verbose.
Lower-case, abbreviations only for really common elements, dashes discouraged.

3. Definitely math-centric. ;-)

Rob

Sean Fitzpatrick

unread,
May 17, 2023, 12:13:36 PM5/17/23
to PreTeXt development
This has just come up for discussion with APEX, so I will volunteer to test this.

To confirm I understand correctly:
- In the past we had lots of figure/caption/tabular
- Those were changed to table/title/tabular for schema compliance
- The new option is figure/caption/function-values

I'll implement this soon in APEX. I think it's a necessary condition to keep Greg Hartman on board.

Mitch Keller

unread,
May 17, 2023, 12:16:46 PM5/17/23
to prete...@googlegroups.com
I will look forward to an update on this, Sean, as the three Active texts all have a number of these that have been on the roller coaster as things have developed and I would like to be able to standardize things because a table and a figure in a side-by-side look really bad right now and it would be better to have the function table and the graph both as figures.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/b5b83f3e-065a-4f21-b219-61ba81fbb7fan%40googlegroups.com.


Rob Beezer

unread,
May 17, 2023, 1:02:47 PM5/17/23
to prete...@googlegroups.com
Thanks, Sean!

* I'd still like something better than "function-values", but nothing has come
to me yet. Proceed as-is and it is just a cosmetic change later.

* You might just go

figure/caption/tabular

right now and check behavior. Look and feel, across formats. Maybe you are
already doing this. ;-)

* Maybe as easy as *starting* with swapping

match="tabular"

into

match="tabular|function-values"

Along with companion @select.

* And then maybe could neuter some things, such as @colspan with tests using
self::function-values.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com
> <mailto:pretext-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/b5b83f3e-065a-4f21-b219-61ba81fbb7fan%40googlegroups.com <https://groups.google.com/d/msgid/pretext-dev/b5b83f3e-065a-4f21-b219-61ba81fbb7fan%40googlegroups.com?utm_medium=email&utm_source=footer>.

Sean Fitzpatrick

unread,
May 17, 2023, 1:08:20 PM5/17/23
to prete...@googlegroups.com
I think when I changed figure/caption/tabular to table/title/tabular,
building still succeeded, but I decided to change proactively since the
former was no longer schema compliant.

So you are perhaps suggesting to first just revert to how things were,
and if something doesn't work, replace tabular with function-values?

I also want to make sure that it should be initially sufficient to
modify my source, since it sounds like you are also suggesting some
tinkering with the XSL.

David W. Farmer

unread,
May 17, 2023, 1:15:54 PM5/17/23
to prete...@googlegroups.com

Is there a title vs caption issue?
> email to pretext-dev...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/9ee25adb-c67a-bffe-bf2a-47ac72237a46%40gmail.com.
>

Sean Fitzpatrick

unread,
May 17, 2023, 1:31:22 PM5/17/23
to prete...@googlegroups.com
I think one of the motivations here is that if you have a graph and a
table of values in a sidebyside, it does not look good to have a caption
below the graph, and a title above the table of values.

So the main requirement, whether we call it a table or a figure, (or a
tabular or a function-values) is to be able to have a caption below,
rather than a title above.
This was also Greg's objection to the current appearance of the PDF
obtained via PreTeXt.

kcri...@gmail.com

unread,
May 17, 2023, 3:38:29 PM5/17/23
to PreTeXt development

I think one of the motivations here is that if you have a graph and a
table of values in a sidebyside, it does not look good to have a caption
below the graph, and a title above the table of values.

So the main requirement, whether we call it a table or a figure, (or a
tabular or a function-values) is to be able to have a caption below,
rather than a title above.

Correct, and for what it's worth, I wholeheartedly support this and would use it.  We definitely need something for this use case, and as long as it behaves as it "used to", that would be great.  Truth tables, Cayley tables, lots of things would use this, those are all great examples.

I suggest "function-table" or "values-table" to make it clear it still looks like a table from the name.  "function-values" to me suggests a list of values only.

Sean Fitzpatrick

unread,
May 17, 2023, 4:08:15 PM5/17/23
to PreTeXt development
I am tempted to suggest that instead of a "tabular", it's a "tabu-lite" :-)

Now I understand that this is not yet implemented.
I am still seeing tabular templates inside of figure/figure-like in the XSL, so I am going to see what happens if I revert back to tabulars in figures.

Alex Jordan

unread,
May 17, 2023, 4:20:05 PM5/17/23
to prete...@googlegroups.com
According to the opening thread, the new element "function-values" would be a child of "figure". So is it a peer of "tabular"? Would all/most of the "tabular" XSLT be duplicated into new templates for "function-values"? Or the templates for "tabular" extended to apply to "function-values"? If the latter, why do we not want to just allow it to be "figure/tabular"? There would still be "table/tabular" for authors who want a table.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.

Rob Beezer

unread,
May 18, 2023, 11:27:44 AM5/18/23
to prete...@googlegroups.com
Rethinking this from first principles.

"tabular": name comes from LaTeX, but this is what most people would call a
table. I think of it as an "atomic" object, it can't be split into smaller
parts. So -- you can have a naked tabular between two paragraphs. Or, you can
put a tabular into a container with a number and some textual description, which
can then be a target of a cross-reference, or an entry of a "list-of"
construction, etc.

"table": this is the afore-mentioned container. It holds a "tabular". And
*crucially*, the only container to hold a "tabular" is a "table".

Textual description: CMoS says a "table" has a "title", not a "caption", and it
renders above the tabular.

Objection: in a side-by-side, this can "look funny." A frequent example is a
table of function values next to a graph of the function. A "table" next to a
"figure". Title above and caption below. My faulty memory says this is the
whole driver of this discussion. Very nearly a presentational question. And I
agree that the mix in a side-by-side can look funny.

Solution: don't adjust the source, don't invent new elements, don't put a
"tabular" in a "figure". Adjust the presentation. In a side-by-side, and only
in a side-by-side, put the title of a table *below* the table, where it will be
semi-harmonious with a caption of a figure, if the panels are bottom-aligned.
On Mitch's rollercoaster, we had something much like this at one of the high
points. For different formats, we have varying success aligning on the first
line of the title/caption, but this is again presentation, which should/can
improve with time and effort.

David W. Farmer

unread,
May 18, 2023, 11:42:49 AM5/18/23
to prete...@googlegroups.com

I think the issue is that there are two fundamentally different types of
objects that consist of grids of information.

One is the CMoS "table" which is not really part of the narrative
and in not intended to be consulted in detail while reading. You look
at various parts of it at random times. An example is something with many
rows and columns: maybe each row is a state and each column is a year.

For such a "table", a title is appropriate.

The other is a vertically arranged list of x and f(x) values for some
function. That is intended to be looked at in detail as part of the
narrative. The reader is unlikely to return to it or to consult just
part of it. A caption is appropriate for such a table-like object.

Allowing the second type of table-like object in a figure, and having a
caption, is what I think people are asking for.

Regards,

David
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzMy5iZWV6ZXI.1684423661%40quikprotect.
>
>

Sean Fitzpatrick

unread,
May 18, 2023, 11:52:56 AM5/18/23
to PreTeXt development
I agree somewhat with Rob, that this is mostly a question of presentation.
For the case of APEX, Greg does not want to see titles above, even for a table on its own.
All of the 'tables' were indicated as figures in the original LaTeX, but I don't know if that's because Greg considered them tables, or because he didn't have separate markup for tables.

Suppose Rob sticks to the position that a tabular should only go in a table.
Could we resolve this by letting the author decide if the table should have a title (which goes above) or a caption (which goes below)?

This is a different question than whether a small table of values should really count as a table.

I can also partially report: I am able to build HTML with figure/caption/tabular, with no problems, and no errors or warnings.
I also built LaTeX with no errors or warnings. I haven't built the PDF yet, but not because of this: my custom XSL is broken because QR codes are now generated in advance and included as images, instead of being built as part of the tex file.

Rob Beezer

unread,
May 18, 2023, 12:03:23 PM5/18/23
to prete...@googlegroups.com
CMoS 15e 13.46 (in "Footnotes" in Chapter 13 "Tables")

General notes. A note applying to the table as a whole follows any source note,
is also unnumbered, and is introduced by "Note:"


Would that satisfy the need for something caption-like to describe the table?

Alex Jordan

unread,
May 18, 2023, 12:07:51 PM5/18/23
to prete...@googlegroups.com
Flipping through Stewart, I mostly see just "naked tabular"s.
* naked tabular in a margin near a relevant paragraph
* naked tabular between two paragraphs
* sidebyside with left panel a naked tabular, right panel a captioned figure

I didn't look everywhere but I did find one "table" in an appendix. It has a title (in the margin, top aligned with the tabular) and it also has (in the margin) what you might call a caption. Photo attached.

Photo on 5-18-23 at 9.06 AM.jpg

Rob Beezer

unread,
May 18, 2023, 12:11:36 PM5/18/23
to prete...@googlegroups.com
Thanks, Alex!

On 5/18/23 09:07, Alex Jordan wrote:
> I didn't look everywhere but I did find one "table" in an appendix. It has a
> title (in the margin, top aligned with the tabular) and it also has (in the
> margin) what you might call a caption. Photo attached.

With an implementation of a table "note", we (Sean!) could achieve that
presentation.

Sean Fitzpatrick

unread,
May 18, 2023, 12:17:56 PM5/18/23
to PreTeXt development
If CMOS says a table note can't have a number, it would take some work to make that happen in APEX, since many of these small tables are referenced. There's often text like "For <xref ref="example-foo"/> the graph is shown in <xref ref="figure-foo-A"/> and the corresponding values are given in <xref ref="figure-foo-B"/>."

Sean Fitzpatrick

unread,
May 18, 2023, 12:22:29 PM5/18/23
to PreTeXt development
Here is the practical problem I'm dealing with. You can view the last official LaTeX version of APEX Calculus here (in PDF):

Jump to the second page of the first section (this is numbered in the book as page 2).
Figure 1.1.3 is a table of values for sin(x)/x that is referred to in the discussion adjacent to it.
(This is APEX, so of course this figure is in the margin.)

If I show Greg Hartman a PreTeXt-generated PDF that has this table in the margin, but it's a PreTeXt 'table' with a title on top, Greg is going to either go back to his LaTeX version, or insist on hand-editing the .tex file to move the title below.
Having the title underneath appears to be non-negotiable.

David W. Farmer

unread,
May 18, 2023, 12:23:23 PM5/18/23
to prete...@googlegroups.com

Footnotes are never the solution :)

The issue is the definition of table. The opening sentence from
the 14th edition:

Tables offer a useful means of presenting large amounts of detailed
information in a small space.

Two columns, x and f(x) at several points, is not "large amounts of
information". I do not see why we are consulting the Chapter on Tables,
when the object in question does not fit their definition of a table.
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0OC5iZWV6ZXI.1684425801%40quikprotect.
>
>

Rob Beezer

unread,
May 18, 2023, 12:39:30 PM5/18/23
to prete...@googlegroups.com
> I do not see why we are consulting the Chapter on Tables,
> when the object in question does not fit their definition of a table.

Because "small" and "large" are open to interpretation.

How small is small? What is your epsilon? Your N?

;-)

Alex Jordan

unread,
May 18, 2023, 12:53:36 PM5/18/23
to prete...@googlegroups.com
Sullivan & Sullivan Precalculus book seems devoid of captions on figures, and prints the "Figure 1" above the figure. So it aligns with an adjacent "Table 1". I don't find any naked tabulars here except in exercises at the end of a section. Each tabular has a "Table N" above it.

kcri...@gmail.com

unread,
May 18, 2023, 2:42:13 PM5/18/23
to PreTeXt development

Two columns, x and f(x) at several points, is not "large amounts of
information". I do not see why we are consulting the Chapter on Tables,
when the object in question does not fit their definition of a table.

This is an example of one of those times when having a rigid style manual can be self-defeating.  There will always be exceptions for some "real-life" situation.  Naturally, they can't all be implemented.  Since this one was essentially supported for a long time, since there are authors who would use it (wisely, I'm sure!), and since David has a good in-principle argument for its adoption, it seems pretty reasonable.

Random examples from "big" presses: In a Pearson proof-transition book (Chartrand et al.) there are captioned (below) Figures for truth tables, as well as many Cayley tables.  And actually even a tabular-like object in a Figure to show the bijection between QQ and NN ... but Hughes-Hallett uses Tables (sometimes even titled above, sometimes blank) for short amounts of function values in a "tabular".  Some other calculus textbooks actually oriented all their "tabulars" of function values vertically, just two columns, no captions/titles or even numbering (uniformly).  

Finally, although the abstract algebra books I consulted had a lot of options, more had Tables than other things, but there was some variation.  One Pearson text even had (are you ready for this?) Tables, Figures, and Charts (!?!) for their Cayley tables.  The only consistency I saw in that one was that if there were two Cayley tables in one item, it was a Figure.

At any rate, Cayley and truth tables really are not tables in the usual sense, even granted Rob's objection to David's remark about n, and if I had a vote (which I assume I do not), I would strongly support this proposal, if only because it's an easy win for the community as a whole, as evidenced by this thread's length.

Rob Beezer

unread,
May 31, 2023, 3:29:03 PM5/31/23
to prete...@googlegroups.com
I should have remembered, and mentioned in this discussion, that we already put
all titles and captions below a FIGURE-LIKE when it is a sub-numbered panel of a
side-by-side (triggered by the "sidebyside" living inside a "figure").

[Read announcement just now on -announce.]

So we can say titles and captions go below a FIGURE-LIKE when it is a panel of a
side-by-side. This should help with vertical alignment, though we need some
technical work (which might not even be possible) to get the aignment of titles
and captions to be perfect.

Rob

kcri...@gmail.com

unread,
Jun 1, 2023, 5:12:20 PM6/1/23
to PreTeXt development
Pursuant to the discussion, for clarification, is the only decision on this the recent announcement about side-by-side?  Cayley tables really don't seem like "Tables" to me, and thankfully for now a tabular in a figure still works even in LaTeX:

Screen Shot 2023-06-01 at 5.09.05 PM.png
Maybe if there were a change to completely disallow that in the actual xsl (as opposed to schema), there could be a warning beyond the schema validation, given that most people on this thread seemed to lean toward allowing this.

kcri...@gmail.com

unread,
Jun 21, 2024, 9:25:20 PM6/21/24
to PreTeXt development
Same question.  Was there any further discussion on this in a more recent thread?

kcri...@gmail.com

unread,
Aug 25, 2026, 11:21:02 AMAug 25
to PreTeXt development
For completeness in this thread, Rob and Claude have officially implemented the "no tabular in figure" view in the schema at https://github.com/PreTeXtBook/pretext/pull/3124  

Brief commentary for the cognoscenti, since the PR, by the nature of a coding assistant, did not have this discussion:
* In the discussion there, there is no reference to this thread (https://groups.google.com/g/pretext-dev/c/B2IwQKkEr-I/), only to one from 2019 (https://groups.google.com/g/pretext-support/c/xqmQLgxpUwk) about sidebysides which has one post (by Alex) that tangentially mentions table->tabular and figure->image.  That specific post also strongly suggests that "naked" tabulars and images were not allowed at the time of that post, but such behavior is allowed now.  
* The statement in the PR that "the development schema's allowance for the construct was the lone artifact suggesting we like it" may mislead people coming to the PR, since in this thread we have several long-time users requesting this construct be allowed (and a number of projects actively using it), though of course that was the only codebase artifact in the PreTeXt repo itself.
* Users may wish to check their projects to see if they conform.  I'll point out a very successful project which is actively using tabular inside figure (see Figure 1.1.4 https://opentext.uleth.ca/apex-calculus/sec_limit_intro.html#table_sinx_1), including an active xref.
Reply all
Reply to author
Forward
0 new messages