Definition Lists

You can add a definition list by using the format below, specifically text space dash space text.

Summary
Definition ListsYou can add a definition list by using the format below, specifically text space dash space text.
OverviewThe standard ND definition syntax is supported plus a number of extensions including Levelling, Continuation and Mixed usage.
LevellingDefinition lists can represent multiple levels of elements directed by the indentation of each line, for example;
ContinuationDefinition list content maybe stated over a number of lines.
MixedDefinition lists can be mixed within other ND list constructs.

Overview

The standard ND definition syntax is supported plus a number of extensions including Levelling, Continuation and Mixed usage.

Like bullet lists, you can have blank lines between them if you want, subsequent lines dont have to be indented, and you end the list by skipping a line and doing something else.

Source

First  - This is the first item.
Second - This is the second item.
         This is more of the second item.
Third  - This is the third item.
This is more of the third item.

Some text after the definition list.

Result

FirstThis is the first item.
SecondThis is the second item.  This is more of the second item.
ThirdThis is the third item.  This is more of the third item.

Some text after the definition list.

Notes

Remember that with definition lists, if you’re using the plural form of the keywords each entry is a symbol and can be linked to just as if it had its own topic.

Levelling

Definition lists can represent multiple levels of elements directed by the indentation of each line, for example;

desclist 1
desclist 2
desclist 2.1
desclist 2.1.1
desclist 2.1.2
desclist 2.2
desclist 2.2.1
desclist 2.2.2
desclist 3

Start of normal paragraph reset indentation.

Source:
        desc - list 1
        desc - list 2
                desc - list 2.1
                        desc - list 2.1.1
                        desc - list 2.1.2
                desc - list 2.2
                        desc - list 2.2.1
                        desc - list 2.2.2
        desc - list 3

Continuation

Definition list content maybe stated over a number of lines.  Text which is line seperated and indented by one shall be taken as a continuation of the bullet definition and added as a seperate paragraph, for example.

Source:
        item - description 1

                paragraph description 1

                paragraph description 1

        item - description 2

                paragraph description 2

                paragraph description 2

                item - description 2.1
                        item - description 2.1.1

                                paragraph description 2.1.1

                                paragraph description 2.1.1

                        item - description 2.1.2
                item - description 2.2
                        item - description 2.2.1
                        item - description 2.2.2
        item - description 3
                item - description 1
                item - description 2
        item - description 4
                item - description 4.1

                        paragraph description 4.1

    Notes:  Paragraphs must be line seperated and indented.
itemdescription 1
paragraph description 1
paragraph description 1
itemdescription 2
paragraph description 2
paragraph description 2
itemdescription 2.1
itemdescription 2.1.1
paragraph description 2.1.1
paragraph description 2.1.1
itemdescription 2.1.2
itemdescription 2.2
itemdescription 2.2.1
itemdescription 2.2.2
itemdescription 3
itemdescription 1
itemdescription 2
itemdescription 4
itemdescription 4.1
paragraph description 4.1

Notes

One should be aware that during list formatting an incorrect decrease in indentation restarts in the indentation logic closing the related list which may product unexpected results, for example;

Source

item - description 1

item - description 2

        item - description 2.1
                item - description 2.1.1

                        Second paragraph description 2.1.1

                        First paragraph description 2.1.1

                More text for description 2.1.1 <= wrong indentation resets the
                list depth to zero closing the current list definition and
                starting a new paragraph.

        item - description 2.2

item - description 3

        item - description 2

Result

itemdescription 1
itemdescription 2
itemdescription 2.1
itemdescription 2.1.1
Second paragraph description 2.1.1
First paragraph description 2.1.1

More text for description 2.1.1 <= wrong indentation resets the list depth to zero closing the current list definition and starting a new paragraph.

itemdescription 2.2
itemdescription 3
itemdescription 2

You may also note that is this reset affect disallows additional paragraphs to be appended once sub items have been encountered.

Both the reset logic and the inablity to append are currently by design.

Mixed

Definition lists can be mixed within other ND list constructs.  The definitions must be line seperated and indented by one to be associated.

Source

item - description 1

        paragraph description 1.1

        paragraph description 1.2

item - description 2

        paragraph description 2.1

        item - description 2.1
                item - description 2.1.1

                        paragraph description 2.1.1

                        o bullet 1
                        o bullet 2
                                o bullet 2.1

                item - description 2.1.2

        item - description 2.2
                item - description 2.2.1
                item - description 2.2.2

item - description 2

        o bullet 1
        o bullet 2

Result

itemdescription 1
paragraph description 1.1
paragraph description 1.2
itemdescription 2
paragraph description 2.1
itemdescription 2.1
  • bullet 1
  • bullet 2
    • bullet 2.1
itemdescription 2.1.1
paragraph description 2.1.1
itemdescription 2.1.2
itemdescription 2.2
itemdescription 2.2.1
itemdescription 2.2.2
itemdescription 2

To send feedback on this topic email: natural.nosp@m.docsplus@gmai.nosp@m.l.com

© Some Rights Reserved. see License

Definition lists can represent multiple levels of elements directed by the indentation of each line, for example;
Definition list content maybe stated over a number of lines.
Definition lists can be mixed within other ND list constructs.
ND+ is licensed under the GPL-2.0, the same terms and conditions as Natural Docs 1.4.