Menu

#118 Autogenerate HTML page numbers inside </ul>

v1.0.26
open
nobody
5
2016-07-16
2014-09-19
No

Autogenerate HTML inserts page numbering with paragraph elements within lists. Paragraph (<p></p>) elements are not allowed within unordered (or ordered) lists.

For example the following list coding:

/L
A list item
{page break}
Another item
{page break}
L/

results in the following coding:

<ul><li>A list item</li>
<p><span class="pagenum"><a name="Page_1" id="Page_1">[Pg 1]</a></span></p>
<li>Another item</li>
<p><span class="pagenum"><a name="Page_2" id="Page_2">[Pg 2]</a></span></p></ul>

The desired outcome would be:

<ul><li>A list item<span class="pagenum"><a name="Page_1" id="Page_1">[Pg 1]</a></span></li>
<li>Another item</li>
<span class="pagenum"><a name="Page_2" id="Page_2">[Pg 2]</a></span>
</ul>

Steps to duplicate are:

Menu>Fixup>HTML Generator & Checks...
Click on Autogenerate HTML

Thanks,

Rick

1 Attachments

Discussion

  • hannne

    hannne - 2016-07-16

    Paragraph elements are allowed inside list items, as are span elements.
    Neither paragraph elements nor span elements are allowed in lists outside of list elements.

    What you call desired outcome is invalid both in XHTML 1.0 Strict and in HTML 4.01 Transitional, so no, that's not quite what's desired.

    The attached file has e.g. pg_num.png, which produces:

    <ul><li><i>Rich. Burbadge</i>,</li>
    <li><i>Nathan Field</i>,</li>
    <li><i>John Underwood</i>,</li>
    <li><i>Rich. Sharpe</i>,</li>
    <li><i>Henry Condel</i>,</li>
    <li><i>Robert Benfield</i>,</li>
    <li><i>John Lowin</i>,</li>
    <li><i>Thomas Holcome</i>.</li>
    <p><span class="pagenum"><a name="Page_79" id="Page_79">[Pg 79]</a></span></p></ul>
    

    and chap.png, which produces:

    <ul><li><i>Joseph Tailor</i>,</li>
    <li><i>John Lowin</i>,</li>
    <li><i>John Underwood</i>,</li>
    <li><i>William Rowly</i>,</li>
    <li><i>John Thomson</i>,</li>
    <li><i>Robert Benfield</i>,</li>
    <li><i>Tho. Polard</i>.</li>
    <hr class="chap" />
    
    <p><span class="pagenum"><a name="Page_2" id="Page_2">[Pg 2]</a></span></p></ul>
    

    In both cases the page number (and whatever else) should come after the , e.g.

    </ul><p><span class="pagenum"><a name="Page_79" id="Page_79">[Pg 79]</a></span></p>
    

    I'm updating the title to better reflect the problem.

     

    Last edit: hannne 2016-07-16
  • hannne

    hannne - 2016-07-16
    • labels: --> html, page numbers, lists
    • summary: Autogenerate HTML inserts paragraph elements within lists. --> Autogenerate HTML page numbers inside
     
  • Richard Tonsing

    Richard Tonsing - 2016-07-16

    Your analysis is correct where page breaks occur at the end of lists.

    Please consider instances where page breaks occur within lists instead of just at the end of a list.

     

Anonymous
Anonymous

Add attachments
Cancel