corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan i <j...@apache.org>
Subject Re: Header level > 6
Date Mon, 22 Jun 2015 17:09:41 GMT
On 22 June 2015 at 18:53, Peter Kelly <pmkelly@apache.org> wrote:

> My first instinct on hearing “heading level 7” is that perhaps the author
> of such a document should reconsider their structure ;) I never go more
> than three for normal documents. The designers HTML assumed 6 would be
> enough, but Word allows up to 9 levels.
>
> Having >6 levels can be handy for outlining (in particular Word’s “outline
> view” mode), and in that instance I can see it would be useful.
>
> Regardless of it’s merits or otherwise, I think we should support this,
> but it will complicate things somewhat given that the existing logic
> generally assumes only six levels. Any levels above that, in the Word
> filter at least, are simply given their style name but otherwise considered
> normal paragraphs.
>
> Having a <div style=“corinthia-level-X”> is a good first approach (and I
> suggest using the corinthia- prefix in places where we have our own special
> behaviour; currently the prefix is uxwrite- in many places but that should
> be changed). However, it’s possible in Word to have multiple heading styles
> at the same outline level - for 1-6 this is fine, because we just give the
> style name and can express the outline level in HTML based on the tag
> number (h1 through h6). When we go to having <div> or <p> elements with a
> style name, there is no way to express the outline level as part of that,
> at least none that is immediately obvious to me. I’m not sure what the best
> solution here is for handling arbitrary depths.
>
> In theory we may also have file formats which support more than 9 outline
> levels (not sure what ODF’s limit is, but it may be possible with other
> formats). In that case we need to figure out how that would be expressed in
> terms of a Word document.
>
> Another possible solution is to just use h6 for every header of level
> greater than 6. While this “loses” information in the resulting HTML, I
> view it as a reasonable compromise in the sense that it fits within the
> semantics of HTML, and due to the use of bidirectional transformations, the
> heading level could remain the same (that is, 7 or greater) during update
> if the level has not been changed to < 6 during editing.
>

but if we convert from OOXML to ODF this way we loose information. It is no
fun when the intermediary (in this case HTML) imposes the restrictions.

I do not recommend to flatten the level at the height of H6.

rgds
jan i.


>
> —
> Dr Peter M. Kelly
> pmkelly@apache.org
>
> PGP key: http://www.kellypmk.net/pgp-key <http://www.kellypmk.net/pgp-key>
> (fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)
>
> > On 22 Jun 2015, at 8:22 pm, jan i <jani@apache.org> wrote:
> >
> > I want us to be consistent, not have one standard for header 1-6 and a
> > different for the rest.
> >
> > we can also use <p style=headerX> that is more or less the same as <div
> > style=headerX>. Only real difference
> > is that <div> do not have a default style.
> >
> > rgds
> > jan i.
> >
> > On 22 June 2015 at 15:18, Gabriela Gibson <gabriela.gibson@gmail.com>
> wrote:
> >
> >> IIRC, Peter said to just make a <p> here.
> >>
> >> But I think I like Jan's idea because we can then later change things
> >> easily without losing the original marker of H7+.
> >>
> >> G
> >>
> >> On Mon, Jun 22, 2015 at 2:15 PM, jan i <jani@apache.org> wrote:
> >>
> >>> On 22 June 2015 at 14:59, Ian C <ian@amham.net> wrote:
> >>>
> >>>> Hi
> >>>>
> >>>> I have just been debugging what appeared as a strange error.
> >>>>
> >>>> Turns out due to a document header of level 7. HTML only has 1 -6.
> >>>>
> >>>> So when I increment passed 6 I ended up in HTML_HEAD... which explains
> >>>> what I was seeing.
> >>>>
> >>>> But how should  we manage header levels greater than 6? With our own
> >>>> class and a div or something else?
> >>>>
> >>> my preference would be a div statement, linked to our own style (which
> of
> >>> course might be modified by the document).
> >>>
> >>> rgds
> >>> jan i.
> >>>
> >>>
> >>>>
> >>>> I see in the Word code there are some limit checks when receiving
> code.
> >>>> I looked at the Word the generation code but couldn't quite follow it,
> >>>> getting tired.
> >>>>
> >>>> Looks like it is limited too.
> >>>>
> >>>> --
> >>>> Cheers,
> >>>>
> >>>> Ian C
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> Visit my Coding Diary: http://gabriela-gibson.blogspot.com/
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message