Jump to content

Hierarchy problems in User Tools


Simon Cozens

Recommended Posts

I've been preparing my own user tools from the CCEL (http://www.ccel.org/) ThML sources - which I've converted to Accordance-friendly HTML with a custom XSL stylesheet - but have run across some problems with how Accordance handles importing of HTML pages.

 

David's blog post says that:

 

Thus, any text tagged with <H1> is assigned to the Titles field and placed at the top level of the browser hierarchy, just as if you had placed the red T in the margin of the tool's Edit window. Accordingly, <H2> is placed at the second level of the browser hierarchy (as if you had placed a red "1" in the margin of the Edit window); <H2> is placed at the third level of the browser hierarchy (as if you had placed a red "2" in the margin); etc.

 

This hasn't been my experience. I have a dummy document has a five separate <H1> tags; only one heading appears in the browser at top level. Instead, everything is buried further and further down the hierarchy, to the point where a <h3> tag (say, around "Book Third") is buried seven levels down.

 

It seems like something isn't resetting a counter properly, as all new higher-level sections are being interpreted as subsections of previous ones.

 

(Since I can't upload a HTML file via the forums, if you want to try and replicate this, you can get the sample document here.)

Link to comment
Share on other sites

Simon,

This sounds like a bug/feature I pointed out in my HTML User Tool Import test years ago (it's somewhere on these forums).

Try backing out of the nested headers. In other words, something like.

<H1>Main heading</H1>
 <H2>Sub heading</H2>
<H3>Sub sub heading</H3>
 <H2></H2>
<H1>Another main heading</H1>
 <H2>Sub heading</H2>
...

You can leave the unneeded ones simply blank. Did that fix it?

Edited by Joe Weaks
Link to comment
Share on other sites

Your example file is a mess... the headers need to be an intentional hierarchy if a program is to be expected to put the header sections into nested hierarchical structure.

 

<h1 style="margin-bottom:48pt" id="ii-p0.1">The Pastor of Hermas</h1>
<h3 id="ii.i-p0.1">Introductory Note</h3>
<h5 id="ii.i-p0.2">to</h5>
<h2 id="ii.i-p0.3">The Pastor of Hermas</h2>

 

A H1 should be followed by an H2 as section headers. This document is using Headers for formatting, not organizational structure. The snippet I displayed shows how the markup is making the "to" a 5th level header to make it smaller than what's above and below it. This is not how to use HTML. Headers to import into Accordance must be used for structural organization.

Think of a Table of Contents... the occurrence of the headers must make sense as items in a Table of Contents.

Edited by Joe Weaks
Link to comment
Share on other sites

  • 4 years later...

Simon,

This sounds like a bug/feature I pointed out in my HTML User Tool Import test years ago (it's somewhere on these forums).

Try backing out of the nested headers. In other words, something like.

<H1>Main heading</H1>
 <H2>Sub heading</H2>
<H3>Sub sub heading</H3>
 <H2></H2>
<H1>Another main heading</H1>
 <H2>Sub heading</H2>
...

You can leave the unneeded ones simply blank. Did that fix it?

 

Hey, I'm using 9.5.3 and my hierarchy is not working out either like I want it to. I'm finding when I use blank headings like you describe, it doesn't work, but if I put a "." in between the header tags, i get the expected result, but it doesn't look pretty like I like it.

 

Is this still a bug?

Link to comment
Share on other sites

  • 3 years later...

This is still an issue in User Tools.

 

If you import a user tool from HTML which has headings going to consecutively to H4 for instance but after the H4 goes back up to H2 then the Table of Contents will not put that at the H2 level (it will be placed at the H3 level although it will be formatted in the user tool itself as H2). This does not happen if you go up to H1.

 

So the following:

 

<h1>Heading 1</h1>

<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h4>Heading 4</h4>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h1>Heading 1</h1>
 
Results in:
 
post-30494-0-35300800-1451991455_thumb.png
 
post-30494-0-91331700-1451991487_thumb.png

 

 

So the H2 appears at the wrong level. When you edit the user tool the H2 is actually marked as a level '2' heading. This can be amended to '1' which will then correct the table of contents so the user tool itself can cope with the correct structure. It would be preferable to have this load correctly in the first place. 

  • Like 1
Link to comment
Share on other sites

I don't recall ever seeing this bug mentioned (or acknowledged) in release notes. This is a really old bug, now.

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...