Hi Francesco, At 2025-02-23T19:00:17+0100, Francesco Ariis wrote: > a question about table width and line width. > > Attached is an MRE which displays my problem, which you can > run with `groff -ms -t -Tpdf test.ms > out.pdf` > > In the document: > 1. line width is set to 17cms > 2. I insert a table and would like it to fill the whole 17cms > 3. this does not happen, on the contrary .ll seems to get > shrunk to 15cms. > > What to input to have the table fill the whole line length? > Thanks in advance and happy typesetting
You're doing some non-idiomatic things with the ms(7) package and the
tbl(1) preprocessor.
The ms package does not expect you to reconfigure the formatter's line
length ad hoc within the document. Instead, if you require a
non-default line length, you should set the `LL` register early in the
document, prior to an "initializing" macro call (which is most ms macros
apart from `RP`).
groff_ms(7):
Document structure
The ms macro package expects a certain amount of structure: a well‐
formed document contains at least one paragraphing or heading macro
call. To compose a simple document from scratch, begin it by
calling .LP or .PP. Organize longer documents as follows.
Document type
Calling the RP macro at the beginning of your document puts
the document description (see below) on a cover page.
Otherwise, ms places this information on the first page,
followed immediately by the body text. Some document types
found in other ms implementations are specific to AT&T or
Berkeley, and are not supported in groff ms.
Format and layout
By setting registers and strings, you can configure your
document’s typeface, margins, spacing, headers and footers,
and footnote arrangement. See subsection “Document control
settings” below.
Document description
A document description consists of any of: a title, one or
more authors’ names and affiliated institutions, an
abstract, and a date or other identifier. See subsection
“Document description macros” below.
Body text
The main matter of your document follows its description (if
any). ms supports highly structured text consisting of
paragraphs interspersed with multi‐level headings (chapters,
sections, subsections, and so forth) and augmented by lists,
footnotes, tables, diagrams, and similar material. The
preponderance of subsections below covers these matters.
Secondly, you're setting tbl(1)'s `TW` register, but this is not a
reliable technique. This register is for tbl(1) to communicate the
width of the table back to the macro package (or document).
tbl(1):
The register TW stores the width of the table region in basic
units; it can’t be used within the region itself, but is defined
before the .TE token is output so that a groff macro named TE can
make use of it. T. is a Boolean‐valued register indicating whether
the bottom of the table is being processed. A #T register is used
internally. Avoid using these names for any other purpose.
I'm attaching a revised version of your test that I hope is helpful.
Please let us know if it is, or isn't.
Regards,
Branden
ariis_test_gbr.ms
Description: Troff MS-macros document
ariis_test_gbr.pdf
Description: Adobe PDF document
signature.asc
Description: PGP signature
