This topic explains how to use the [linenum] command in poetry to provide line numbering.

The reader should be reasonably familiar with both DBT Codes and braille poetry layout according to BANA rules. For more help, refer to Working with Word: The BANA Braille Template and review the Poetry section.

[linenum] or [linenumC:A] - This command treats the next word as a line number, for line-numbered poetry or prose. [linenum] may cause a line break in the text. If the line number comprises more than one word, then the words should be grouped using [:] and [;], for example:

[linenum][:]48 B[;]

Ordinarily, [linenum] takes the word that is to be treated as a line number and places it on the right margin, adjusting the text right margin automatically, without otherwise interfering with text flow.

If, since the last forced line break, there has been text in the document (i.e. if the line number comes in the middle or at the end of a "paragraph") then [linenum] implies [pm3:3], which can result in a line break, so that the line number itself and the text following it will be placed on the next line. This is intended to avoid having two line numbers occupy the same physical space in the braille layout, without requiring the transcriber to plan ahead. A right margin set implicitly by [linenum] overrides any later attempt on the page to reduce the right margin using [rm], unless two parameters are given to the [rm] code.

[linenum] ordinarily adjusts the right margin to leave room for the widest line number on the page (counting only line numbers set with [linenum] itself), plus two spaces. This means [linenum] "looks ahead" to determine how to set the right margin. The right margin set by [linenum] is ordinarily reset at the end of each page. However, it can be reset earlier, to separate a page into different sections for line-numbering margin computations, or carried across a page boundary, by using the "override margin" feature of [rm].

[linenum] is unique among DBT codes in that it does not interfere with the pending effects of other codes. So, if [linenum] and a line number appear after a [tab] code, but before the word to be placed at a tabstop, the tabstop placement will be correct even so.

[linenum] can take two optional parameters. The first specifies a column for alignment purposes. Here, -1 can be used to specify the rightmost cell on the page. The second parameter, if specified, should be l, r, or c, to specify left, right, or center alignment on this cell. Note that the parameters control where the line number will be placed. They do not affect other text on the line. Without parameters, [linenum] is equivalent to [linenum-1:r]. [linenum] will not have any effect on any margins unless the parameters are, in fact, [linenum-1:r] or, equivalently, [linenum] or [linenum-1].