dotfiles/sbcl/.quicklisp/dists/quicklisp/software/slime-v2.24/doc/texinfo-tabulate.awk

22 lines
500 B
Awk
Raw Normal View History

2020-01-20 14:13:08 -05:00
#!/usr/bin/env awk -f
#
# Format input lines into a multi-column texinfo table.
# Note: does not do texinfo-escaping of the input.
# This code has been placed in the Public Domain. All warranties
# are disclaimed.
BEGIN {
columns = 3;
printf("@multitable @columnfractions");
for (i = 0; i < columns; i++)
printf(" %f", 1.0/columns);
print
}
{ if (NR % columns == 1) printf("\n@item %s", $0);
else printf(" @tab %s", $0); }
END { printf("\n@end multitable\n"); }