In some books, poems are printed with reference line numbers alongside. Typically there is a number every 5 or every 10 lines, so the author can refer to line 193 and the reader can quickly locate it.

Proofers will space these line numbers away from the poetry by some distance, but will not be consistent. You can use Fixup> Reformat Poetry Line Numbers to right-align all poem line numbers to a consistent right margin.

When you select this menu item, Guiguts scans the entire document searching for all numbers that stand at the right end of their lines, and are separated by at least two spaces from the text to their left (the regex would be \s\s+(\d+)$). It adds or removes spaces before each such number so that the rightmost digit falls on the current rewrap right margin.

You can control the right margin for the numbers by using Prefs> Set Rewrap margins to set the Rewrap Right Margin. You can undo the changes by repeatedly applying Undo.

Guiguts does not recognize rewrap markers during this scan, and it does not confine its search to text enclosed in /P..P/ as you might suppose it would. As a result, (1) it does not align the numbers on the explicit right margin you may have specified for a particular poem (see this page); and (2) it might right-align numbers in a table, if they happen to stand two spaces to the right of their row.