OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Re: [office] How to number a heading?


Here is an example file created with Calligra Words.

style.xml

   <office:styles>
     <style:style style:name="Head_201" style:default-outline-level="1" 
style:display-name="Head 1" style:family="paragraph" 
style:next-style-name="Standard">
       <style:text-properties fo:font-size="20pt" fo:font-weight="bold"/>
     </style:style>
   </office:styles>
   <text:outline-style style:name="O">
       <text:outline-level-style text:start-value="1" 
text:display-levels="1" style:num-format="1" text:level="1" 
style:num-prefix="" style:num-suffix=".">
         <style:list-level-properties 
text:list-level-position-and-space-mode="label-width-and-position" 
fo:text-align="start"/>
       </text:outline-level-style>
       <text:outline-level-style text:start-value="1" 
text:display-levels="2" style:num-format="1" text:level="2" 
style:num-prefix="" style:num-suffix=".">
         <style:list-level-properties 
text:list-level-position-and-space-mode="label-width-and-position" 
fo:text-align="start"/>
       </text:outline-level-style>
       <text:outline-level-style text:start-value="1" 
text:display-levels="3" style:num-format="1" text:level="3" 
style:num-prefix="" style:num-suffix=".">
         <style:list-level-properties 
text:list-level-position-and-space-mode="label-width-and-position" 
fo:text-align="start"/>
       </text:outline-level-style>
     </text:outline-style>

content.xml

     <office:text>
       <text:h text:outline-level="1" text:style-name="P1">Heading 
1</text:h>
     </office:text>


This examples uses outline-style to style the headings. LibreOffice 
displays this correctly.

Cheers,
Jos



On 22-05-17 15:31, Jos van den Oever wrote:
> Hello Regina,
>
> Can you add an example of what you want to achieve visually and reason
> back from that?
>
> When reading your description, it's not always clear to me when you talk
> about a number and when about a number *style*. No showing a number is
> also a style.
>
> text:outline-level gives the number. The way that that number is
> displayed is determined by the active style.
>
> style:default-outline-level="2" is only relevant when you do not want to
> set text:outline-level explicitly.
>
> I've attached a file that I experimented with. It does not show heading
> numbers in LibreOffice.
>
> Cheers,
> Jos
>
>
> On 09-05-17 17:02, Regina Henschel wrote:
>> Hi all,
>>
>> you can number a heading by setting text:ouline-level in the <text:h>
>> element and no list style in its paragraph style. Then the number is
>> taken from 16.34 <text:outline-style>. Its description is,
>> "An outline style is a list style that is applied to all headings within
>> a text document where the heading's paragraph style does not define a
>> list style to use itself."
>>
>> But if you need a different numbering parallel, e.g. for an appendix,
>> you can not use a second <text:outline-style> element, because more than
>> one is not allowed. So how to get a number in such case?
>>
>>
>> I define a numbering style
>>     <text:list-style style:name="MyChapter">
>> with its <text:list-level-style-number> childs for the different
>> text:level, e.g.
>>             <text:list-level-style-number text:level="2"
>> text:style-name="Numbering_20_Symbols" style:num-prefix="("
>> style:num-suffix=")" style:num-format="a">
>>                 <style:list-level-properties ...
>>             </text:list-level-style-number>
>>
>> Then I define a paragraph style, which uses this numbering style, e.g.
>> <style:style style:name="myH2" style:family="paragraph"
>> style:parent-style-name="Standard" style:default-outline-level="2"
>> style:list-style-name="MyChapter">
>>
>> And the heading itself is given by
>> <text:h text:style-name="myH2" text:outline-level="2">Heading on level
>> two</text:h>
>>
>> Should that generate a number for the heading? I would say yes, but
>> LibreOffice generates no number here. I try to examine, whether this is
>> a bug or not.
>>
>> Looking at the description of 19.496 style:list-style-name, I see,
>> "The list style specified by this attribute is applied to headings and
>> paragraphs that are contained in a list, where the list does not specify
>> a list style itself, and the list has no list style specification for
>> any of its parents."
>>
>> My heading is not contained in a list. Does it get a number
>> nevertheless? If yes, does the level of numbering corresponds to the
>> outline level?
>>
>>
>> LibreOffice puts the heading into a list automatically. But that
>> produces the questions:
>> Which level of numbering has to be used? The list level or the outline
>> level? Or must list level and outline level always be equal?
>> LibreOffice uses the list level here and does not keep outline level in
>> sync with list level, which produces a lot of problems for users.
>>
>>
>> Is there a different way I do not see, to get a chapter numbering to a
>> heading, which does not use the <text:outline-style> element?
>>
>> Kind regards
>> Regina
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this mail list, you must leave the OASIS TC that
>> generates this mail.  Follow this link to all your TCs in OASIS at:
>> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
>>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  Follow this link to all your TCs in OASIS at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
>


-- 
Senior Adviseur Linked Data
KOOP
........................................................................
Kennis- en Exploitatiecentrum Officiële Overheidspublicaties (KOOP)
Uitvoeringsorganisatie Bedrijfsvoering Rijk
Ministerie van Binnenlandse Zaken en Koninkrijksrelaties
Wilhelmina van Pruisenweg 52 | 2595 AN | Den Haag | Kamer Oranje, 1e 
etage 038
Postbus 20011 | 2500 EA | Den Haag
Secretariaat | secretariaat@koop.overheid.nl | 070 700 05 25
........................................................................
M 06 54 71 54 04
jos.oever@koop.overheid.nl
http://koop.overheid.nl

Attachment: calligra.odt
Description: calligra.odt



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]