bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texinfo.tex, problem with too-long table inside @float


From: Gavin Smith
Subject: Re: Texinfo.tex, problem with too-long table inside @float
Date: Sun, 3 Dec 2023 13:57:08 +0000

On Sat, Dec 02, 2023 at 01:28:49PM -0700, arnold@skeeve.com wrote:
> Hi.
> 
> Thanks for the response. I do have a number of floats (it's a good-
> sized book) but this may be the only table that is so large.
> It is important that I refer to the floats from the text with an xref.
> 
> Since the \vbox is never actually moved around, maybe just don't
> put the enclosed stuff inside one?  That would suit me fine for both
> texinfo.tex and makeinfo --latex (which I will use to submit the
> book for production).

The \vbox is not moved around for texinfo.tex but it is possible that
the @float may be moved around in other output formats: LaTeX or DocBook,
for example.

(For LaTeX, there is the 'longtable' package
(https://ctan.org/pkg/longtable?lang=en) which appears to allow splitting
tables across pages, although using this would require you to edit
the LaTeX output manually.)

The solution that occurs to me is to recognise a third argument for
@float.  @float was introduced in Texinfo 4.7, in 2004.  From NEWS:

  . new commands @float, @caption, @shortcaption, @listoffloats for
    initial implementation of floating material (figures, tables, etc).
    Ironically, they do not yet actually float anywhere.

The comments in texinfo.tex state:

% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
% etc.  We don't actually implement floating yet, we always include the
% float "here".  But it seemed the best name for the future.

[...]

% #1 is the optional FLOATTYPE, the text label for this float, typically
% "Figure", "Table", "Example", etc.  Can't contain commas.  If omitted,
% this float will not be numbered and cannot be referred to.
%
% #2 is the optional xref label.  Also must be present for the float to
% be referable.
%
% #3 is the optional positioning argument; for now, it is ignored.  It
% will somehow specify the positions allowed to float to (here, top, bottom).
%

(I can't find any discussions from the time about the new feature
in the mailing list archives.) 

If the position is given as "here" (or whatever we decide), we could
then omit the \vtop wrapping.  So in your example, the @float line
would become

@float Table,table-errno-values,here

This would also need modifications to texi2any to recognise the additional
argument.

As I said before, with the label at the bottom of the table, if the
table is split across pages, then it does not function properly as
a label.  So simply removing the \vtop wrapping may not produce
satisfactory output.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]