OneMore
OneMore copied to clipboard
Make custom styles set the corresponding style property
Is your feature request related to a problem? Please describe.
This is based on the note in the wiki on page https://github.com/stevencohn/OneMore/wiki/Custom-Styles-and-Favorites
NOTE - The built-in OneNote styles are unique entities explicitly managed by OneNote. In contrast, the custom OneMore styles are merely style attributes applied to content. So when a custom style is created that's stylistically equivalent to another style (built-in or custom) this makes it impossible for OneMore to differentiate between the two. This can adversely affect the Apply Styles command, the Table of Contents command, or any commands that look for custom styles.
Describe the solution you'd like
Because many functions of OneNote, tools and macros work based on paragraph styles, such as generating a table of contents, I would like custom styles to apply the proper style tag, such as "h2". This would allow any tools/commands to find paragraphs based on the style tag regardless of whether the style is a built in or custom style.
This may already be working correctly. I just looked at the XML for a page and it looks like it uses "quick style index". (My knowledge is mostly based on Onetastic, in which developers don't work with the xml.)
There is no "h2" type of tag in the OneNote XML schema. As you note, styles are applied (and implied) via QuickStyle associations. And quick styles have names like "h1", "h2", etc. OneMore piggybacks on this concept by fabricating its own quick styles to apply to elements on the page and will reuse similar names like "h2". OneNote allows multiple quick styles with the same name as long the style attributes are different (otherwise it automatically normalizes them into a single quick style which you can't prevent!)
OneNote and OneMore use similar logic to match which quickstyles are the built-in styles and which are the OneMore custom styles. Any OneMore command that works on built-in styles will not be aware of the OneMore styles. But OneMore can tell the dfiference and treat them independently or, in the case of Apply Styles, will convert elements stylized with built-in styles to custom styles.
So there's not much I can do here. Everything is working exactly as designed.
Working as designed.
Thanks.