Underlying Style Support for Custom Styles and Macros

July 11, 2020

Onetastic Custom Styles provides an easy way to quickly format your text with your choice of font, color, size and other formatting. However until now it didn't set the underlying style for the paragraph to one of the built-in styles supported by OneNote. For instance you can use Onetastic's custom Heading 1 style to format a paragraph but it would still use OneNote's built-in Normal style. With the latest update, Custom Styles can now also set the underlying style of the paragraph to one of the built-in styles. If you use Heading 1 custom style, it will use its unique formatting but will also mark the paragraph with the built-in Heading 1 style from OneNote.

This has the benefit of using macros like TOC in Current Page on pages where you used custom styles. Such macros check underlying style of paragraphs to find headings and wouldn't previously work with headings formatted using Custom Styles. You can see how this now works in the below video.

Video

Macros can now change paragraph style

Paragraph objects in macros had a read-only style property. With this update this property is now read/write so you can change the style of a paragraph to one of the built-in styles. Following is a list of accepted values: p, h1, h2, h3, h4, h5, h6, PageTitle, cite, blockquote, code. A sample macro demonstrating this is available here: Sample - Insert Styled Paragraph.

Comments

Name
Comment
haruhi - 2021-07-22
Is it possible in onecalendar to  display pages on every edit  days in my OneNote  Instead of on created date, last modified date or both . So I can clearly see what work has been done in the past week
DGDunning - 2021-05-04
Spot on! Thanks Omer.
Omer Atay - 2021-04-23
DGDunning: All parts of a style, including the underlying style is optional. You can uncheck the underlying style while creating a custom style.

Other Posts

Show all posts