I am writing a document and make use of Styles and Formatting a lot. In one case, I need the text to be in two columns instead of the one column for the rest of the document. Is there a way to specify this attribute so that I do not have to go to the menu and change the columns format for this text every time?
It is not possible to include a section (e.g., a multi-column definition) within a paragraph style, as a section is an attribute of a page style. This fundamental limit comes from the ODF v1.2 specification, part 1, 5.4.1, p.114, where the <text:section>
element is restricted to being used only within these elements:
<draw:text-box>
10.4.3,<office:text>
3.4,<style:footer>
16.11,<style:footer-left>
16.13,
<style:header>
16.10,<style:header-left>
16.12,<table:covered-table-cell>
9.1.5,<table:table-cell>
9.1.4,<text:deletion>
5.5.4,<text:index-body>
8.2.2,
<text:index-title>
8.2.3,<text:note-body>
6.3.4 and<text:section>
5.4.
That list would need to additionally include the <text:p>
element (i.e., a paragraph) to allow columns to be specified in a paragraph style. Only an OASIS member / developer would know whether doing this would break other stuff, either in specification or implementation terms.
It is certainly possible to write a macro that mimics key presses (e.g., to apply a section with two-columns to the currently selected text) but the resultant definition (in the XML) will always use direct formatting rather than styles.
@oweng - I understood from your earlier answer that styles cannot be used due to ODF specs. This triggered the idea to use a macro for direct formating and a macro can be assigned to a key or button for frequent usage. With other words create a workaround for the needed format by utilizing a macro for direct formating.
@ROSt53, yes, your understanding matches mine. I do not know why your answer was marked down. Maybe someone thought it was not a substantial enough answer?