~~~~~~~~~~~~~~~~~
Attributes Tables
~~~~~~~~~~~~~~~~~

.. include:: prologue.rst

Description
===========

Files with names of the form ``*.atb`` are attributes tables, and with names of
the form ``*.ati`` are attributes subtables. They are used when BRLTTY is
displaying screen attributes rather than screen content. Each of the eight
braille dots represents one of the eight VGA attribute bits.

Attributes tables can usually be found in the ``/etc/brltty/Attributes/``
directory (see |README.Customize| for more details). See
`Attributes Table List`_ for a list of BRLTTY's attributes tables.

An attributes table consists of a sequence of directives, one per line, which 
define how combinations of VGA attributes are to be represented in braille. 
UTF-8 character encoding must be used. Whitespace (blanks, tabs) at the 
beginning of a line, as well as before and/or after any operand of any 
directive, is ignored. Lines containing only whitespace are ignored. If the 
first non-whitespace character of a line is ``#`` then that line is a comment 
and is ignored.

Directives
==========

The Dot Directive
-----------------

.. parsed-literal:: dot *dot* *state* # *comment*

Use this directive to specify what a specific dot represents. The default is
that all dots are down and not used to represent anything.

*dot*
   The dot being defined. It is a single digit within the range ``1``-``8`` as
   defined by the standard braille dot numbering convention (see 
   |README.BrailleDots| for details).

*state*
   What the dot being defined represents. It may be:

   =attribute
      The dot is raised if the named attribute is on.

   ~attribute
      The dot is raised if the named attribute is off.

The attributes are:

=========  ===  ========
Name       Hex  binary
---------  ---  --------
fg-blue    01   00000001
fg-green   02   00000010
fg-red     04   00000100
fg-bright  08   00001000
bg-blue    10   00010000
bg-green   20   00100000
bg-red     40   01000000
blink      80   10000000
=========  ===  ========

Examples::

   dot 1 =fg-red
   dot 2 ~bg-blue

.. include:: nesting-directives.rst

Attributes Table List
=====================

.. csv-table::
   :header-rows: 1
   :file: attributes-table.csv

