{
    "mode": "man",
    "parameter": "tbl",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/tbl/1/json",
    "generated": "2026-11-08T04:32:35Z",
    "sections": {
        "Name": {
            "content": "tbl - prepare tables for groff documents\n",
            "subsections": []
        },
        "Synopsis": {
            "content": "tbl [-C] [file ...]\n",
            "subsections": [
                {
                    "name": "tbl --help",
                    "content": ""
                },
                {
                    "name": "tbl -v",
                    "content": ""
                },
                {
                    "name": "tbl --version",
                    "content": ""
                }
            ]
        },
        "Description": {
            "content": "The  GNU  implementation of tbl is part of the groff(1) document formatting system.  tbl is a\ntroff(1) preprocessor that translates descriptions of tables embedded in roff(7) input  files\ninto  the  language understood by troff.  It copies the contents of each file to the standard\noutput stream, except that lines between .TS and .TE are interpreted as  table  descriptions.\nWhile  GNU tbl's input syntax is highly compatible with AT&T tbl, the output GNU tbl produces\ncannot be processed by AT&T troff; GNU troff (or a troff implementing any GNU extensions  em‐\nployed)  must  be  used.   Normally, tbl is not executed directly by the user, but invoked by\nspecifying the -t option to groff(1).  If no file operands are given on the command line,  or\nif file is “-”, tbl reads the standard input stream.\n",
            "subsections": [
                {
                    "name": "Overview",
                    "content": "tbl  expects to find table descriptions between input lines that begin with .TS (table start)\nand .TE (table end).  Each such table region encloses one or more table descriptions.  Within\na table region, table descriptions beyond the first must each be preceded by  an  input  line\nbeginning with .T&.  This mechanism does not start a new table region; all table descriptions\nare  treated  as part of their .TS/.TE enclosure, even if they are boxed or have column head‐\nings that repeat on subsequent pages (see below).\n\n(Experienced roff users should observe that tbl is not a roff language interpreter:  the  de‐\nfault control character must be used, and no spaces or tabs are permitted between the control\ncharacter  and the macro name.  These tbl input tokens remain as-is in the output, where they\nbecome ordinary macro calls.  Macro packages often define TS, T&, and TE macros to handle is‐\nsues of table placement on the page.  tbl produces groff code to define these macros as empty\nif their definitions do not exist when the formatter encounters a table region.)\n\nEach table region may begin with region options, and must contain one or more  table  defini‐\ntions;  each  table  definition contains a format specification followed by one or more input\nlines (rows) of entries.  These entries comprise the table data.\n"
                },
                {
                    "name": "Region options",
                    "content": "The line immediately following the .TS token may specify region options, keywords that influ‐\nence the interpretation or rendering of the region as a whole or all table entries within  it\nindiscriminately.   They  must be separated by commas, spaces, or tabs.  Those that require a\nparenthesized argument permit spaces and tabs between  the  option's  name  and  the  opening\nparenthesis.  Options accumulate and cannot be unset within a region once declared; if an op‐\ntion  that  takes a parameter is repeated, the last occurrence controls.  If present, the set\nof region options must be terminated with a semicolon (;).\n\nAny of the allbox, box, doublebox, frame,  and  doubleframe  region  options  makes  a  table\n“boxed” for the purpose of later discussion.\n\nallbox Enclose each table entry in a box; implies box.\n\nbox    Enclose  the entire table region in a box.  As a GNU extension, the alternative option\nname frame is also recognized.\n\ncenter Center the table region with respect to the current indentation and line  length;  the\ndefault  is  to left-align it.  As a GNU extension, the alternative option name centre\nis also recognized.\n\ndecimalpoint(c)\nRecognize character c as the decimal separator in columns using the N (numeric)  clas‐\nsifier (see subsection “Column classifiers” below).  This is a GNU extension.\n\ndelim(xy)\nRecognize characters x and y as start and end delimiters, respectively, for eqn(1) in‐\nput, and ignore input between them.  x and y need not be distinct.\n"
                },
                {
                    "name": "doublebox",
                    "content": "Enclose the entire table region in a double box; implies box.  As a GNU extension, the\nalternative option name doubleframe is also recognized.\n\nexpand Spread  the table horizontally to fill the available space (line length minus indenta‐\ntion) by increasing column separation.  Ordinarily, a table is made only  as  wide  as\nnecessary to accommodate the widths of its entries and its column separations (whether\nspecified or default).  When expand applies to a table that exceeds the available hor‐\nizontal  space,  column separation is reduced as far as necessary (even to zero).  tbl\nproduces groff input that issues a diagnostic if such compression occurs.  The  column\nmodifier x (see below) overrides this option.\n\nlinesize(n)\nDraw lines or rules (e.g., from box) with a thickness of n points.  The default is the\ncurrent type size when the region begins.  This option is ignored on terminal devices.\n\nnokeep Don't  use roff diversions to manage page breaks.  Normally, tbl employs them to avoid\nbreaking a page within a table row.  This usage  can  sometimes  interact  badly  with\nmacro packages' own use of diversions—when footnotes, for example, are employed.  This\nis a GNU extension.\n"
                },
                {
                    "name": "nospaces",
                    "content": "Ignore leading and trailing spaces in table entries.  This is a GNU extension.\n\nnowarn Suppress  diagnostic  messages  produced  at document formatting time when the line or\npage lengths are inadequate to contain a table row.  This is a GNU extension.\n\ntab(c) Use the character c instead of a tab to separate entries in a row of table data.\n"
                },
                {
                    "name": "Table format specification",
                    "content": "The table format specification is mandatory: it determines the number of columns in the table\nand directs how the entries within it are to be typeset.  The format specification is  a  se‐\nries  of  column  descriptors.  Each descriptor encodes a classifier followed by zero or more\nmodifiers.  Classifiers are letters (recognized case-insensitively) or  punctuation  symbols;\nmodifiers  consist  of or begin with letters or numerals.  Spaces, tabs, newlines, and commas\nseparate descriptors.  Newlines and commas are special; they apply the descriptors  following\nthem  to  a subsequent row of the table.  (This enables column headings to be centered or em‐\nboldened while the table entries for the data are not, for instance.)  We term the  resulting\ngroup  of  column  descriptors a row definition.  Within a row definition, separation between\ncolumn descriptors (by spaces or tabs) is often optional; only some modifiers, described  be‐\nlow, make separation necessary.\n\nEach  column descriptor begins with a mandatory classifier, a character that selects from one\nof several arrangements.  Some determine the positioning of table entries within a  rectangu‐\nlar  cell: centered, left-aligned, numeric (aligned to a configurable decimal separator), and\nso on.  Others perform special operations like drawing lines or spanning entries  from  adja‐\ncent cells in the table.  Except for “|”, any classifier can be followed by one or more modi‐\nfiers;  some  of  these accept an argument, which in GNU tbl can be parenthesized.  Modifiers\nselect fonts, set the type size, and perform other tasks described below.\n\nThe format specification can occupy multiple input lines, but must conclude with  a  dot  “.”\nfollowed  by a newline.  Each row definition is applied in turn to one row of the table.  The\nlast row definition is applied to rows of table data in excess of the row definitions.\n\nFor clarity in this document's examples, we shall write classifiers in  uppercase  and  modi‐\nfiers  in  lowercase.  Thus, “CbCb,LR.” defines two rows of two columns.  The first row's en‐\ntries are centered and boldfaced; the second and any further rows' first and  second  columns\nare left- and right-aligned, respectively.\n\nThe  row  definition with the most column descriptors determines the number of columns in the\ntable; any row definition with fewer is implicitly extended on the  right-hand  side  with  L\nclassifiers as many times as necessary to make the table rectangular.\n"
                },
                {
                    "name": "Column classifiers",
                    "content": "The L, R, and C classifiers are the easiest to understand and use.\n\nA, a   Center  longest  entry in this column, left-align remaining entries in the column with\nrespect to the centered entry, then indent all entries by one en.   Such  “alphabetic”\nentries (hence the name of the classifier) can be used in the same column as L-classi‐\nfied  entries,  as  in  “LL,AR.”.  The A entries are often termed “sub-columns” due to\ntheir indentation.\n\nC, c   Center entry within the column.\n\nL, l   Left-align entry within the column.\n\nN, n   Numerically align entry in the column.  tbl aligns columns of  numbers  vertically  at\nthe  units place.  If multiple decimal separators are adjacent to a digit, it uses the\nrightmost one for vertical alignment.  If there is no decimal separator, the rightmost\ndigit is used for vertical alignment; otherwise, tbl centers the entry within the col‐\numn.  The roff dummy character \\& in an entry marks the glyph preceding it (if any) as\nthe units place; if multiple instances occur in the data, the  leftmost  is  used  for\nalignment.\n\nIf  N-classified  entries  share  a column with L or R entries, tbl centers the widest\nN entry with respect to the widest L or R entry, preserving the alignment of N entries\nwith respect to each other.\n\nThe appearance of eqn equations within N-classified columns can be troublesome due  to\nthe  foregoing  textual  scan for a decimal separator.  Use the delim region option to\nmake tbl ignore the data within eqn delimiters for that purpose.\n\nR, r   Right-align entry within the column.\n\nS, s   Span previous entry on the left into this column.\n\n^      Span entry in the same column from the previous row into this row.\n\n, -   Replace table entry with a horizontal rule.  An empty table entry is expected to  cor‐\nrespond to this classifier; if data are found there, tbl issues a diagnostic message.\n\n=      Replace  table  entry with a double horizontal rule.  An empty table entry is expected\nto correspond to this classifier; if data are found there,  tbl  issues  a  diagnostic\nmessage.\n\n|      Place  a  vertical  rule (line) on the corresponding row of the table (if two of these\nare adjacent, a double vertical rule).  This classifier does  not  contribute  to  the\ncolumn count and no table entries correspond to it.  A | to the left of the first col‐\numn descriptor or to the right of the last one produces a vertical rule at the edge of\nthe table; these are redundant (and ignored) in boxed tables.\n\nTo change the table format within a tbl region, use the .T& token at the start of a line.  It\nis  followed  by a format specification and table data, but not region options.  The quantity\nof columns in a new table format thus introduced cannot increase relative to the previous ta‐\nble format; in that case, you must end the table region and start another.  If that will  not\nserve  because the region uses box options or the columns align in an undesirable manner, you\nmust design the initial table format specification to include the maximum quantity of columns\nrequired, and use the S horizontal spanning classifier where necessary to achieve the desired\ncolumnar alignment.\n\nAttempting to horizontally span in the first column or vertically span on the first row is an\nerror.  Non-rectangular span areas are also not supported.\n"
                },
                {
                    "name": "Column modifiers",
                    "content": "Any number of modifiers can follow a column classifier.  Arguments to  modifiers,  where  ac‐\ncepted,  are case-sensitive.  If the same modifier is applied to a column specifier more than\nonce, or if conflicting modifiers are applied, only the last occurrence has effect.  The mod‐\nifier x is mutually exclusive with e and w, but e is not mutually exclusive with w; if  these\nare used in combination, x unsets both e and w, while either e or w overrides x.\n\nb, B   Typeset entry in boldface, abbreviating f(B).\n\nd, D   Align  a vertically spanned table entry to the bottom (“down”), instead of the center,\nof its range.  This is a GNU extension.\n\ne, E   Equalize the widths of columns with this modifier.  The column with the largest  width\ncontrols.  This modifier sets the default line length used in a text block.\n\nf, F   Select  the typeface for the table entry.  This modifier must be followed by a font or\nstyle name (one or two characters not starting with a digit), font  mounting  position\n(a  single  digit),  or a name or mounting position of any length in parentheses.  The\nlast form is a GNU extension.  (The parameter corresponds  to  that  accepted  by  the\ntroff  ft  request.)  A one-character argument not in parentheses must be separated by\none or more spaces or tabs from what follows.\n\ni, I   Typeset entry in an oblique or italic face, abbreviating f(I).\n\nm, M   Call a groff macro before typesetting a text block (see subsection “Text  blocks”  be‐\nlow).  This is a GNU extension.  This modifier must be followed by a macro name of one\nor  two characters or a name of any length in parentheses.  A one-character macro name\nnot in parentheses must be separated by one or more spaces or tabs from what  follows.\nThe  named  macro must be defined before the table region containing this column modi‐\nfier is encountered.  The macro should contain only simple groff  requests  to  change\ntext formatting, like adjustment or hyphenation.  The macro is called after the column\nmodifiers b, f, i, p, and v take effect; it can thus override other column modifiers.\n\np, P   Set the type size for the table entry.  This modifier must be followed by an integer n\nwith  an optional leading sign.  If unsigned, the type size is set to n scaled points.\nOtherwise, the type size is incremented or  decremented  per  the  sign  by  n  scaled\npoints.   The  use  of a signed multi-digit number is a GNU extension.  (The parameter\ncorresponds to that accepted by the troff ps request.)  If a  type  size  modifier  is\nfollowed  by  a  column  separation modifier (see below), they must be separated by at\nleast one space or tab.\n\nt, T   Align a vertically spanned table entry to the top,  instead  of  the  center,  of  its\nrange.\n\nu, U   Move the column up one half-line, “staggering” the rows.  This is a GNU extension.\n\nv, V   Set  the  vertical spacing to be used in a text block.  This modifier must be followed\nby an integer n with an optional leading sign.  If unsigned, the vertical  spacing  is\nset  to  n  points.  Otherwise, the vertical spacing is incremented or decremented per\nthe sign by n points.  The use of a signed multi-digit  number  is  a  GNU  extension.\n(This  parameter corresponds to that accepted by the troff vs request.)  If a vertical\nspacing modifier is followed by a column separation modifier (see below), they must be\nseparated by at least one space or tab.\n\nw, W   Set the column's minimum width.  This modifier must be followed by a number, which  is\neither a unitless integer, or a roff horizontal measurement in parentheses.  Parenthe‐\nses are required if the width is to be followed immediately by an explicit column sep‐\naration (alternatively, follow the width with one or more spaces or tabs).  If no unit\nis  specified,  ens are assumed.  This modifier sets the default line length used in a\ntext block.\n\nx, X   Expand the column.  After computing the column widths, distribute any  remaining  line\nlength evenly over all columns bearing this modifier.  Applying the x modifier to more\nthan  one  column is a GNU extension.  This modifier sets the default line length used\nin a text block.\n\nz, Z   Ignore the table entries corresponding to this column for width calculation  purposes;\nthat is, compute the column's width using only the information in its descriptor.\n\nn      A numeric suffix on a column descriptor sets the separation distance (in ens) from the\nsucceeding  column;  the  default separation is 3n.  This separation is proportionally\nmultiplied if the expand region option is in effect; in the case of tables wider  than\nthe  output  line length, this separation might be zero.  A negative separation cannot\nbe specified.  A separation amount after the last column in a row is  nonsensical  and\nprovokes a diagnostic from tbl.\n"
                },
                {
                    "name": "Table data",
                    "content": "The  table  data come after the format specification.  Each input line corresponds to a table\nrow, except that a backslash at the end of a line of table data continues  an  entry  on  the\nnext  input  line.   (Text blocks, discussed below, also spread table entries across multiple\ninput lines.)  Table entries within a row are separated in the input by a  tab  character  by\ndefault;  see the tab region option above.  Excess entries in a row of table data (those that\nhave no corresponding column descriptor, not even an implicit one arising  from  rectangular‐\nization  of  the  table) are discarded with a diagnostic message.  roff control lines are ac‐\ncepted between rows of table data and within text blocks.  If you wish  to  visibly  mark  an\nempty  table entry in the document source, populate it with the \\& roff dummy character.  The\ntable data are interrupted by a line consisting of the .T& input token, and conclude with the\nline .TE.\n\nOrdinarily, a table entry is typeset rigidly.  It is  not  filled,  broken,  hyphenated,  ad‐\njusted,  or  populated  with additional inter-sentence space.  tbl instructs the formatter to\nmeasure each table entry as it occurs in the input, updating the width required by its corre‐\nsponding column.  If the z modifier applies to the column, this measurement is ignored; if  w\napplies  and  its argument is larger than this width, that argument is used instead.  In con‐\ntrast to conventional roff input (within a paragraph, say), changes to text formatting,  such\nas font selection or vertical spacing, do not persist between entries.\n\nSeveral forms of table entry are interpreted specially.\n\n• If a table row contains only an underscore or equals sign ( or =), a single or double hor‐\nizontal rule (line), respectively, is drawn across the table at that point.\n\n• A  table entry containing only  or = on an otherwise populated row is replaced by a single\nor double horizontal rule, respectively, joining its neighbors.\n\n• Prefixing a lone underscore or equals sign with a backslash also has meaning.  If  a  table\nentry  consists  only of \\ or \\= on an otherwise populated row, it is replaced by a single\nor double horizontal rule, respectively, that does not (quite) join its neighbors.\n\n• A table entry consisting of \\Rx, where x is any roff ordinary or special character, is  re‐\nplaced  by  enough  repetitions  of the glyph corresponding to x to fill the column, albeit\nwithout joining its neighbors.\n\n• On any row but the first, a table entry of \\^ causes the entry above it to span  down  into\nthe current one.\n\nOn  occasion, these special tokens may be required as literal table data.  To use either  or\n= literally and alone in an entry, prefix or suffix it with the roff dummy character \\&.   To\nexpress \\, \\=, or \\R, use a roff escape sequence to interpolate the backslash (\\e or \\[rs]).\nA  reliable  way  to  emplace  the \\^ glyph sequence within a table entry is to use a pair of\ngroff special character escape sequences (\\[rs]\\[ha]).\n\nRows of table entries can be interleaved with groff control lines; these do not count as  ta‐\nble  data.   On  such lines the default control character (.) must be used (and not changed);\nthe no-break control character is not recognized.  To start the first table entry  in  a  row\nwith a dot, precede it with the roff dummy character \\&.\n"
                },
                {
                    "name": "Text blocks",
                    "content": "An  ordinary  table  entry's contents can make a column, and therefore the table, excessively\nwide; the table then exceeds the line length of the page, and becomes ugly or is  exposed  to\ntruncation  by the output device.  When a table entry requires more conventional typesetting,\nbreaking across more than one output line (and thereby increasing the height of its row),  it\ncan be placed within a text block.\n\ntbl  interprets  a  table  entry beginning with “T{” at the end of an input line not as table\ndata, but as a token starting a text block.  Similarly, “T}” at the start of  an  input  line\nends  a  text  block; it must also end the table entry.  Text block tokens can share an input\nline with other table data (preceding T{ and following T}).  Input lines between these tokens\nare formatted in a diversion by troff.  Text blocks cannot be nested.  Multiple  text  blocks\ncan occur in a table row.\n\nText  blocks  are formatted as was the text prior to the table, modified by applicable column\ndescriptors.  Specifically, the classifiers A, C, L, N, R, and S  determine  a  text  block's\nalignment within its cell, but not its adjustment.  Add na or ad requests to the beginning of\na  text  block  to  alter its adjustment distinctly from other text in the document.  As with\nother table entries, when a text block ends, any alterations  to  formatting  parameters  are\ndiscarded.  They do not affect subsequent table entries, not even other text blocks.\n\nIf  w  or  x  modifiers are not specified for all columns of a text block's span, the default\nlength of the text block (more precisely, the line length used to process the text block  di‐\nversion)  is  computed  as  L×C/(N+1),  where  L  is the current line length, C the number of\ncolumns spanned by the text block, and N the number of columns in the table.   If  necessary,\nyou  can  also  control  a  text block's width by including an ll (line length) request in it\nprior to any text to be formatted.  Because a diversion is used to format the text block, its\nheight and width are subsequently available in the registers dn and dl, respectively.\n\nroff interface\nThe register TW stores the width of the table region in basic units; it can't be used  within\nthe  region itself, but is defined before the .TE token is output so that a groff macro named\nTE can make use of it.  T. is a Boolean-valued register indicating whether the bottom of  the\ntable  is  being  processed.   The #T register marks the top of the table.  Avoid using these\nnames for any other purpose.\n\ntbl also defines a macro T# to produce the bottom and side lines of a boxed table.  While tbl\nitself arranges for the output to include a call of this macro at the end of such a table, it\ncan also be used by macro packages to create boxes for multi-page tables by calling it from a\npage footer macro that is itself called by a trap planted near the bottom of the  page.   See\nsection “Limitations” below for more on multi-page tables.\n\nGNU  tbl  internally  employs register, string, macro, and diversion names beginning with the\nnumeral 3.  A document to be preprocessed with GNU tbl should not use any such identifiers.\n"
                },
                {
                    "name": "Interaction with eqn",
                    "content": "tbl should always be called before eqn(1).  (groff(1) automatically arranges preprocessors in\nthe correct order.)  Don't call the EQ and EN macros within tables; instead,  set  up  delim‐\niters in your eqn input and use the delim region option so that tbl will recognize them.\n"
                },
                {
                    "name": "GNU _tbl_ enhancements",
                    "content": "In  addition  to extensions noted above, GNU tbl removes constraints endured by users of AT&T\ntbl.\n\n• Region options can be specified in any lettercase.\n\n• There is no limit on the number of columns in a table, regardless of their  classification,\nnor any limit on the number of text blocks.\n\n• All  table rows are considered when deciding column widths, not just those occurring in the\nfirst 200 input lines of a region.  Similarly, table continuation (.T&) tokens  are  recog‐\nnized outside a region's first 200 input lines.\n\n• Numeric and alphabetic entries may appear in the same column.\n\n• Numeric and alphabetic entries may span horizontally.\n"
                },
                {
                    "name": "Using GNU _tbl_ within macros",
                    "content": "You  can  embed  a table region inside a macro definition.  However, since tbl writes its own\nmacro definitions at the beginning of each table region, it is necessary to call  end  macros\ninstead  of  ending  macro definitions with “..”.  Additionally, the escape character must be\ndisabled.\n\nNot all tbl features can be exercised from such macros because tbl is a roff preprocessor: it\nsees the input earlier than troff does.  For example, vertically aligning decimal  separators\nfails  if  the  numbers containing them occur as macro or string parameters; the alignment is\nperformed by tbl itself, which sees only \\$1, \\$2, and so on, and therefore can't recognize a\ndecimal separator that only appears later when troff interpolates a macro or  string  defini‐\ntion.\n\nUsing  tbl  macros within conditional input (that is, contingent upon an if, ie, el, or while\nrequest) can result in misleading line numbers in subsequent diagnostics.   tbl  uncondition‐\nally  injects  its  output into the source document, but the conditional branch containing it\nmay not be taken, and if it is not, the lf requests that tbl injects to  restore  the  source\nline  number  cannot  take  effect.   Consider copying the input line counter register c. and\nrestoring its value at a convenient location after applicable arithmetic.\n"
                }
            ]
        },
        "Options": {
            "content": "--help displays a usage message, while -v and --version show version  information;  all  exit\nafterward.\n",
            "subsections": [
                {
                    "name": "-C",
                    "content": "ter other than space or newline.  Furthermore, interpret the uninterpreted leader  es‐\ncape sequence \\a.\n",
                    "flag": "-C"
                }
            ]
        },
        "Limitations": {
            "content": "Multi-page  tables,  if  boxed  and/or  if you want their column headings repeated after page\nbreaks, require support at the time the document is formatted.  A convention for such support\nhas arisen in macro packages such as ms, mm, and me.  To use it, follow the .TS token with  a\nspace  and  then  “H”; this will be interpreted by the formatter as a TS macro call with an H\nargument.  Then, within the table data, call the TH macro; this  informs  the  macro  package\nwhere  the  headings end.  If your table has no such heading rows, or you do not desire their\nrepetition, call TH immediately after the table format specification.  If a multi-page  table\nis boxed or has repeating column headings, do not enclose it with keep/release macros, or di‐\nvert  it  in  any other way.  Further, the bp request will not cause a page break in a “TS H”\ntable.  Define a macro to wrap bp: invoke it normally if there is no current diversion.  Oth‐\nerwise, pass the macro call to the enclosing diversion using the transparent line escape  se‐\nquence \\!; this will “bubble up” the page break to the output device.  See section “Examples”\nbelow for a demonstration.\n\nDouble  horizontal  rules  are  not  supported  by  grotty(1); single rules are used instead.\ngrotty also ignores half-line motions, so the u column modifier has no effect.   On  terminal\ndevices  (“nroff  mode”),  horizontal  rules and box borders occupy a full vee of space; this\namount is doubled for doublebox tables.  Tables using these features thus require more verti‐\ncal space in nroff mode than in troff mode: write ne requests  accordingly.   Vertical  rules\nbetween  columns  are drawn in the space between columns in nroff mode; using double vertical\nrules and/or reducing the column separation below the default can make  them  ugly  or  over‐\nstrike them with table data.\n\nA text block within a table must be able to fit on one page.\n\nUsing  \\a  to  put leaders in table entries does not work in GNU tbl, except in compatibility\nmode.  This is correct behavior: \\a is an uninterpreted leader.  You can still use  the  roff\nleader  character  (Control+A)  or define a string to use \\a as it was designed: to be inter‐\npreted only in copy mode.\n\n.ds a \\a\n.TS\nbox center tab(;);\nLw(2i)0 L.\nPopulation\\*a;6,327,119\n.TE\n\n┌───────────────────────────────┐\n│ Population..........6,327,119 │\n└───────────────────────────────┘\n\nA leading and/or trailing | in a format specification, such as “|LCR|.”, produces an en space\nbetween the vertical rules and the content of the adjacent columns.  If no such space is  de‐\nsired (so that the rule abuts the content), you can introduce “dummy” columns with zero sepa‐\nration and empty corresponding table entries before and/or after.\n\n.TS\ncenter tab(#);\nR0|L C R0|L.\n\n#levulose#glucose#dextrose#\n\n.TE\n\nThese  dummy  columns have zero width and are therefore invisible; unfortunately they usually\ndon't work as intended on terminal devices.\n",
            "subsections": []
        },
        "Examples": {
            "content": "It can be easier to acquire the language of tbl through examples than formal description, es‐\npecially at first.\n\n.TS\nbox center tab(#);\nCb Cb\nL L.\nAbility#Application\nStrength#crushes a tomato\nDexterity#dodges a thrown tomato\nConstitution#eats a month-old tomato without becoming ill\nIntelligence#knows that a tomato is a fruit\nWisdom#chooses \\f[I]not\\f[] to put tomato in a fruit salad\nCharisma#sells obligate carnivores tomato-based fruit salads\n.TE\n\n┌────────────────────────────────────────────────────────────────────┐\n│   Ability                          Application                     │\n│ Strength       crushes a tomato                                    │\n│ Dexterity      dodges a thrown tomato                              │\n│ Constitution   eats a month-old tomato without becoming ill        │\n│ Intelligence   knows that a tomato is a fruit                      │\n│ Wisdom         chooses not to put tomato in a fruit salad          │\n│ Charisma       sells obligate carnivores tomato-based fruit salads │\n└────────────────────────────────────────────────────────────────────┘\n\nThe A and N column classifiers can be easier to grasp in visual rendering  than  in  descrip‐\ntion.\n\n.TS\ncenter tab(;);\nCbS,LN,AN.\nDaily energy intake (in MJ)\nMacronutrients\n.\\\" assume 3 significant figures of precision\nCarbohydrates;4.5\nFats;2.25\nProtein;3\n.T&\nLN,AN.\nMineral\nPu-239;14.6\n\n.T&\nLN.\nTotal;\\[ti]24.4\n.TE\n\nDaily energy intake (in MJ)\nMacronutrients\nCarbohydrates       4.5\nFats                2.25\nProtein             3\nMineral\nPu-239             14.6\n────────────────────────────\nTotal               ~24.4\n\nNext,  we'll  lightly adapt a compact presentation of spanning, vertical alignment, and zero-\nwidth column modifiers from the mandoc reference for its tbl interpreter.  It  rewards  close\nstudy.\n\n.TS\nbox center tab(:);\nLz  S | Rt\nLd| Cb| ^\n^ | Rz  S.\nleft:r\nl:center:\n:right\n.TE\n\n┌────────────┬───┐\n│ le│ft       │ r │\n│   │ center │   │\n│ l │      right │\n└───┴────────────┘\n\nRow  staggering  is not visually achievable on terminal devices, but a table using it can re‐\nmain comprehensible nonetheless.\n\n.TS\ncenter tab(|);\nCf(BI) Cf(BI) Cf(B), C C Cu.\nn|n\\f[B]\\[tmu]\\f[]n|difference\n1|1\n2|4|3\n3|9|5\n4|16|7\n5|25|9\n6|36|11\n.TE\n\nn   n×n   difference\n1    1\n2    4        3\n3    9        5\n4   16        7\n5   25        9\n6   36        11\n\nSome tbl features cannot be illustrated in the limited environment of a portable man page.\n\nWe can define a macro outside of a tbl region that we can call from within it to cause a page\nbreak inside a multi-page boxed table.  You can choose a different name; be  sure  to  change\nboth occurrences of “BP”.\n\n.de BP\n.  ie '\\\\n(.z'' .bp \\\\$1\n.  el \\!.BP \\\\$1\n..\n\nSee also\n“Tbl—A  Program  to  Format Tables”, by M. E. Lesk, 1976 (revised 16 January 1979), AT&T Bell\nLaboratories Computing Science Technical Report No. 49.\n\nThe spanning example above was taken from mandoc's man page for its tbl implementation.\n\ngroff(1), troff(1)\n\ngroff 1.23.0                                31 March 2024                                     tbl(1)",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Table preprocessor for the groff (GNU Troff) document formatting system.",
        "examples": [
            {
                "description": "Process input with tables, saving the output for future typesetting with groff to PostScript",
                "command": "tbl {{path/to/input_file}} > {{path/to/output.roff}}"
            },
            {
                "description": "Typeset input with tables to PDF using the [me] macro package",
                "command": "tbl -T {{pdf}} {{path/to/input.tbl}} | groff -{{me}} -T {{pdf}} > {{path/to/output.pdf}}"
            }
        ]
    }
}