I have to create a table and I tried doing this using tbl
This is how the table should look:
But I can't find a way how to use the tbl command to create this table in a file called authors.
I have to create a table and I tried doing this using tbl
This is how the table should look:
But I can't find a way how to use the tbl command to create this table in a file called authors.
Using nroff:
nroff -t -Tascii
OR groff:
groff -t -Tascii
[ If you run into issues with utf8 characters, try (for example) groff -t -Tutf8 ].
Sample input from Delete columns that contains only numbers , changing third line to L L L L L L . to Left-align column headers are instead of having them center-aligned (as noted by @they in the comments):
.TS
tab(@);
L L L L L L .
Nr.@Autor@Titlu@Cod@Tiraj@Tara
1@Gauss Carl@Aritmetica 1@297485@11454@Germania
2@Gauss Carl@Aritmatica 2@297484@10254@Germania
3@Gauss Carl@Aritmetica 3@297455@45872@Germania
.TE
Note, it's common to have a two-line column formatting string, one for the column header alignment, the second for the data format/alignment. Below designating N numeric vs A alphabetic column-alignment:
.TS
tab(@);
L L L L L L
N A A N N A .
Nr.@Autor@Titlu@Cod@Tiraj@Tara
1@Gauss Carl@Aritmetica 1@297485@11454@Germania
2@Gauss Carl@Aritmatica 2@297484@10254@Germania
3@Gauss Carl@Aritmetica 3@297455@45872@Germania
.TE
See section 2.2. Format of "Tbl — A Program to Format Tables" by L. L. Cherry and M. E. Lesk for examples. Also, section 2.6 Invocation Examples of groff--The GNU implementation of troff by Trent A. Fisher and Werner Lemberg.