Werner LEMBERG wrote:
In other words, we can't get the real width of the PDFs easily
within the texinfo framework. A variant of `@columnfractions` that
accepts both fractions and sample strings would be thus ideal.
What prevents `lilypond-book` from determining the widths and
inserting them? Perhaps with a @lilypond-width placeholder in the
initial source?
Assuming a LilyPond snippet
@lilypond
c4
@end lilypond
you mean something like
@multitable {@lilypond-width
c4
@end lilypond-width} {foo} ...
...
?
No, I mean something like:
@multitable {@lilypond-width} {foo} ...
@item
@lilypond
c4
@endlilypond
@tab
foo
@end multitable
The lilypond-book tool would replace {@lilypond-width} with something
that has the correct width, sensitive to context. That is, if prototype
entries are used, generate a string that has the required width, if
@columnfractions is used, calculate the proper fraction, etc.
This does require the lilypond-book tool to buffer the table contents
until the width of the "stretchable Lilypond column" is known, then
output the corrected @multitable line and the table contents. Since
@lilypond-width is a marker for a preprocessor substitution instead of
an actual Texinfo command, a variant with an argument could be used to
explicitly select which row should determine the column width, or to
reference a previous table, or a previous definition, as in:
@lilypond-width as reference
c4
@end lilypond-width
...
@multitable {@lilypond-width{use reference}} {foo} ...
...
@end multitable
...
@multitable {@lilypond-width{use reference}} {bar} ...
...
@end multitable
where "reference" is an arbitrary name, which lilypond-book would
translate to:
...
@multitable {XXX} {foo} ...
...
@end multitable
...
@multitable {XXX} {bar} ...
...
@end multitable
where XXX is some string that produces the appropriate column width.
-- Jacob