Changelog

This post was merged with Customize List icons (List-level-characters / bullet-level-characters / enumeration-characters)

Go to parent post

Outline numbering and Lettering format

Allow users to set the auto numbering and lettering hierarchy in their settings so that when invoking the outline feature, the user can control the number and letter sequence that is displayed. For example:

I. Grand parent

A. Parent

1. Child

or

I. Grand parent

1.1 Parent

1.1.1. Child

or

(Whatever a user wants to establish)

The User input:

I., A., 1., a., 1) a)

This should be an easy feature to add because you already know the which nodes are parents, children, subchildren, etc. and where in the sequence the node sits to other siblings so you use its position to relate to a json or list to return the appropriate letter or number.

The current outline feature is too rigid and limited when you could easily expand the outlining. Using the tabs to visually represent parent and child relationships is hard to notice. Its easier to notice with an outline.

Microsoft Word has a nice outline feature that can be customized. You can refer to it to get an idea.

Its easier than it looks. I even did this in filemaker which is nowhere near as easy to do in javascript or python.

Maybe this code will give you ideas:

/* Case in filemaker is like a function for “if then statements” and “sort” is the position within the siblings. */

Case ( level=1; GetValue("1¶2¶3¶4¶5¶6¶7¶8¶9¶10¶11¶12¶13¶14¶15¶16¶17";sort)&":"; level=2; GetValue("I¶II¶III¶IV¶V¶VI¶VII¶VIII¶IX¶X¶XI¶XII¶XIII¶XIV¶XV¶XVI¶XVII¶XVIII¶XIX¶XX";sort)&"."; level=3; GetValue("A¶B¶C¶D¶E¶F¶G¶H¶I¶J¶K¶L¶M¶N¶O¶P¶Q¶R¶S¶T¶U¶V¶W¶X¶Y¶Z";sort)&"."; level=4; sort&"."; level=5; GetValue("a¶b¶c¶d¶e¶f¶g¶h¶i¶j¶k¶l¶m¶n¶o¶p¶q¶r¶s¶t¶u¶v¶w¶x¶y¶z";sort)&"."; level=6; sort&")"; level=7; GetValue("a¶b¶c¶d¶e¶f¶g¶h¶i¶j¶k¶l¶m¶n¶o¶p¶q¶r¶s¶t¶u¶v¶w¶x¶y¶z";sort)&")"; level=8; GetValue("i¶ii¶iii¶iv¶v¶vi¶vii¶viii¶ix¶x¶xi¶xii¶xiii¶xiv¶xv¶xvi¶xvii¶";sort)&")"; level=9; sort&"]"; level=10; GetValue("a¶b¶c¶d¶e¶f¶g¶h¶i¶j¶k¶l¶m¶n¶o¶p¶q¶r¶s¶t¶u¶v¶w¶x¶y¶z";sort)&"]"; sort&">" )

or python

def outline_number_letter (level): if level == 1: return GetValue("1¶2¶3¶4¶5¶6¶7¶8¶9¶10¶11¶12¶13¶14¶15¶16¶17";sort)&":" elif level == 2: return GetValue("I¶II¶III¶IV¶V¶VI¶VII¶VIII¶IX¶X¶XI¶XII¶XIII¶XIV¶XV¶XVI¶XVII¶XVIII¶XIX¶XX";sort)&"." elif level == 3: return GetValue("A¶B¶C¶D¶E¶F¶G¶H¶I¶J¶K¶L¶M¶N¶O¶P¶Q¶R¶S¶T¶U¶V¶W¶X¶Y¶Z";sort)&"." elif level == 4: return sort&"." elif level == 5: return GetValue("a¶b¶c¶d¶e¶f¶g¶h¶i¶j¶k¶l¶m¶n¶o¶p¶q¶r¶s¶t¶u¶v¶w¶x¶y¶z";sort)&"." elif level == 6: return sort&")" elif level == 7: return GetValue("a¶b¶c¶d¶e¶f¶g¶h¶i¶j¶k¶l¶m¶n¶o¶p¶q¶r¶s¶t¶u¶v¶w¶x¶y¶z";sort)&")" elif level == 8: return GetValue("i¶ii¶iii¶iv¶v¶vi¶vii¶viii¶ix¶x¶xi¶xii¶xiii¶xiv¶xv¶xvi¶xvii¶";sort)&")" elif level == 9: return sort&"]" elif level == 10: return GetValue("a¶b¶c¶d¶e¶f¶g¶h¶i¶j¶k¶l¶m¶n¶o¶p¶q¶r¶s¶t¶u¶v¶w¶x¶y¶z";sort)&"]" else: return sort&">"

I am sure there is a more elegant way, but I needed a quick outline for my nodes.