op.level

Syntax op.level ()

Params None required

Action Determines the level of the current heading.

Returns A number indicating the level of the current heading, where 1 is a summit heading and higher numbers indicate deeper levels of outline.

Examples In examples.Sample Outline 2, position the cursor on the summit heading and execute:
op.level ()


   » 1

The example returns 1, indicating that this is a summit-level head.
Now move the cursor to the heading "Subhead 1.1.1" and execute the same line as above. Note that the value returned now is 4, indicating that this is a third-level heading.

Discuss