13.14.9 Plain lists in Texinfo export

The Texinfo export backend converts unordered and ordered lists in the Org file using the default command ‘@itemize’.

Ordered lists are numbered when exported to Texinfo format. Such numbering obeys any counter (see Plain Lists) in the first item of the list. The ‘:enum’ attribute also let you start the list at a specific number, or switch to a lettered list, as illustrated here:

#+ATTR_TEXINFO: :enum A
1. Alpha
2. Bravo
3. Charlie

The Texinfo export backend by default converts description lists in the Org file using the default command ‘@table’, which results in a table with two columns. To change this behavior, set ‘:table-type’ attribute to either ‘ftable’ or ‘vtable’ value. For more information, see (texinfo)Two-column Tables.

The Texinfo export backend by default also applies a text highlight based on the defaults stored in org-texinfo-table-default-markup. To override the default highlight command, specify another one with the ‘:indic’ attribute.

Org syntax is limited to one entry per list item. Nevertheless, the Texinfo export backend can split that entry according to any text provided through the ‘:sep’ attribute. Each part then becomes a new entry in the first column of the table.

The following example illustrates all the attributes above:

#+ATTR_TEXINFO: :table-type vtable :sep , :indic asis
- foo, bar :: This is the common text for variables foo and bar.

becomes

@vtable @asis
@item foo
@itemx bar
This is the common text for variables foo and bar.
@end table

The ‘:compact’ attribute is an alternative to the ‘:sep’ attribute, which allows writing each entry on its own line. If this attribute is non-nil and an item in a description list has no body but is followed by another item, then the second item is transcoded to ‘@itemx’. This example is transcoded to the same output as above.

#+ATTR_TEXINFO: :table-type vtable :indic asis :compact t
- foo ::
- bar ::
  This is the common text for variables foo and bar.

Support for this compact syntax can also be enabled for all lists in a file using the ‘compact-itemx’ export option, or globally using the variable org-texinfo-compact-itemx.

The Texinfo export backend also supports two approaches to writing Texinfo definition commands (see (texinfo)Definition Commands). One of them uses description lists and is described below, the other relies on special blocks (see Special blocks in Texinfo export).

Items in a description list in an Org file that begin with ‘Function:’ or certain other prefixes are converted using Texinfo definition commands. This works even if other items in the same list do not have such a prefix; if necessary a single description list is converted using multiple tables (such as ‘@vtable’) and definition commands (such as ‘@defun’).

- Function: org-texinfo-drawer drawer contents info ::
  Transcode a DRAWER element from Org to Texinfo.

becomes

@defun org-texinfo-drawer drawer contents info ::
  Transcode a DRAWER element from Org to Texinfo.
@end defun

The recognized prefixes are ‘Command:’, ‘Function:’, ‘Macro:’, ‘Special Form:’, ‘Variable:’ and ‘User Option:’. These are the same prefixes that appear in the Info file for the respective definition commands. For example a ‘Function:’ item in the Org file is converted to a ‘@defun’ command in the Texinfo file, which in turn is converted to a definition prefixed with ‘-- Function:’ in the Info file.

As a special case the prefix ‘Key:’ is also recognized. No Texinfo definition command exists for key bindings and the output in Info files also lacks the ‘Key:’ prefix. Even so this special case is supported because it provides a convenient shorthand, as illustrated here:

- Key: C-c C-c (do-something) ::
  This command does something.

- User Option: do-something-somehow ::
  This option controls how exactly ~do-something~ does its thing.

becomes

@table @asis
@item @kbd{C-c C-c} (@code{do-something})
@kindex C-c C-c
@findex do-something
This command does something.
@end table

@defopt do-something-somehow
This option controls how exactly @code{do-something} does its thing.
@end defopt

Command in parenthesis, as done above, is optional.