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: [office] How to number a heading?

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.


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

Senior Adviseur Linked Data
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
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:rpt="http://openoffice.org/2005/report"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
  <style:style style:family="paragraph" style:display-name="List Style" style:name="liststyle" style:list-style-name="mylist">
   <style:text-properties fo:color="#ff0000"/>
  <style:style style:family="paragraph" style:display-name="List Style" style:name="outlinestyle" style:list-style-name="myoutline">
   <style:text-properties fo:color="#00f000"/>
  <text:list-style style:display-name="My List" style:name="mylist">
   <text:list-level-style-number text:level="1" style:num-format="1">
    <style:text-properties fo:font-size="12pt" fo:color="#ff00ff"/>
  <text:outline-style style:name="myoutline">
   <text:outline-level-style style:display-name="My Outline" style:num-prefix="(" style:num-suffix=")" text:display-levels="1">
    <text:list-level-style-number text:level="1" style:num-format="1">
     <style:text-properties fo:font-size="12pt" fo:color="#00ffff"/>
  <style:page-layout style:name="pm1">
   <style:page-layout-properties fo:page-width="10cm" fo:page-height="10in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="10mm" fo:margin-bottom="4.99mm" fo:margin-left="20mm" fo:margin-right="30mm" style:writing-mode="lr-tb" style:footnote-max-height="0mm">
  <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
    <text:h text:style-name="liststyle" text:outline-level="1">Heading 1 with list style</text:h>
    <text:h text:style-name="outlinestyle" text:outline-level="1">Heading 1 with outline style</text:h>

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