Skip to content

Bilara segment number spec

sujato edited this page Dec 21, 2022 · 2 revisions

Bilara segment numbers use a threefold numbering system.

text-uid:major-segment-number.minor-segment-number

Eg. mn23:4.6.

text uid

This is always the canonical ID of the sutta. Usually it is the same as the file name, and is always the same as the id in the <article> tag.

The text-uid is only different from the file name if it is a "debaked range sutta". In this case each sutta has its unique number, while the file name expresses the range of numbers.

major-segment-number

This is incremented based on the structural elements of the text, primarily paragraphs. But it also includes lists, so the increment occurs on:

<p>
<ol>
<ul>
<dl>

minor-segment-number

This is a simple increment.

Exceptions

The increment follows the section numbers established by the Pali Text Society in the case of DN and Vinaya, and by Ñāṇamoḷi in the case of MN.

headings

Headings are a special case. Since they do not occur in root texts, and are usually omitted from paragraph number counts, we assign them a zeroth level number.

  1. The main title of the sutta is inside a <header> tag at the top of the page. Segments inside the <header> are assigned 0.1, 0.2, 0.3 etc.
  2. Subheadings may take <h2><h6>. They pertain to the following paragraph, so always take the zeroth level of the subsequent paragraph. An <h2> heading before mn23:3.1 would therefore be mn23:3.0.
    • If there are two subsequent headings, eg. <h2> followed by <h3>, increment the zeroth level: mn23:3.0.1, mn23:3.0.2.