From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jere McDevitt Subject: List number resetting when using anchor tag in exported HTML Date: Tue, 26 Jan 2010 08:59:37 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2122083014==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZlxK-0008GB-Bu for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 08:59:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZlxF-0008Ai-RB for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 08:59:45 -0500 Received: from [199.232.76.173] (port=54652 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZlxF-0008AS-AM for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 08:59:41 -0500 Received: from mail-ew0-f216.google.com ([209.85.219.216]:33557) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZlxE-0005JR-AO for emacs-orgmode@gnu.org; Tue, 26 Jan 2010 08:59:41 -0500 Received: by ewy8 with SMTP id 8so5321068ewy.9 for ; Tue, 26 Jan 2010 05:59:38 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============2122083014== Content-Type: multipart/alternative; boundary=0016e6d7e3255505e9047e11b22f --0016e6d7e3255505e9047e11b22f Content-Type: text/plain; charset=ISO-8859-1 I came across an odd behavior while using org-mode to create some web pages where list numbers get reset if you insert anchor tags. Consider the following example document: * This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 #<> 1. This should be line number 4, but is reset by the anchor tag 2. This should be line number 5. * This is the second header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 #+BEGIN_HTML #+END_HTML 1. This stays line number 4 2. This stays line number 5 The numbers associated with the list items are the numbers created as new items are added automatically with ALT-ENTER. After the #<> entry and the #+END_HTML, doing the Alt-Enter starts the list number back at 1. However, when this is exported to HTML, something else occurs. In the case of the #<> entry, the HTML also restarts the list number, whereas with the #+BEGIN_HTML it does not. The generated HTML looks like the below. Notice in the first section the
    tag is closed and the anchor is wrapped with paragraph tags, then
      reopens, so there is a space as well as re-starting number, but in the second case the anchor tag is inline. Further down is the actual generated HTML text. Shouldn't #<> tags be treated in the same way as BEGIN_HTML/END_HTML? Table of Contents - 1 This is the first header line - 2 This is the second header line 1 This is the first header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 1. This should be line number 4, but is reset by the anchor tag 2. This should be line number 5. 2 This is the second header line 1. This is line number 1 2. This is line number 2 3. This is line number 3 4. This stays line number 4 5. This stays line number 5

      1 This is the first header line

      1. This is line number 1
      2. This is line number 2
      3. This is line number 3

      1. This should be line number 4, but is reset by the anchor tag
      2. This should be line number 5.

      2 This is the second header line

      1. This is line number 1
      2. This is line number 2
      3. This is line number 3
      4. This stays line number 4
      5. This stays line number 5
      --0016e6d7e3255505e9047e11b22f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I came across an odd behavior while using org-mode to create some web pages= where list numbers get reset if you insert anchor tags.=A0 Consider the fo= llowing example document:

      * This is the first header line
      =A0 =A0 1. This is line number 1
      =A0 2. This is line number 2
      =A0 3. This= is line number 3
      #<<Anchor1>>
      =A0 1. This should be line= number 4, but is reset by the anchor tag
      =A0 2. This should be line num= ber 5.

      * This is the second header line
      =A0
      =A0 1. This is line number = 1
      =A0 2. This is line number 2
      =A0 3. This is line number 3
      #+BEGI= N_HTML
      <a name=3D'anchor2'>
      #+END_HTML
      =A0 1. This s= tays line number 4
      =A0 2. This stays line number 5

      The numbers associated with the list= items are the numbers created as new items are added automatically with AL= T-ENTER.=A0 After the #<<Anchor1>> entry and the #+END_HTML, do= ing the Alt-Enter starts the list number back at 1.=A0 However, when this i= s exported to HTML, something else occurs.=A0 In the case of the #<<A= nchor1>> entry, the HTML also restarts the list number, whereas with = the #+BEGIN_HTML it does not.=A0 The generated HTML looks like the below.= =A0 Notice in the first section the <ol> tag is closed and the anchor= is wrapped with paragraph tags, then <ol> reopens, so there is a spa= ce as well as re-starting number, but in the second case the anchor tag is = inline.=A0 Further down is the actual generated HTML text.

      Shouldn't #<<anchor>> tags be treated in the same way a= s BEGIN_HTML/END_HTML?


      1 This is the firs= t header line

      1. This is line number 1
      2. This is line number 2
      3. This is line number 3

      1. This should be line number 4, but is reset by the anchor tag
      2. This should be line number 5.

      2 This is the seco= nd header line

      1. This is line number 1
      2. This is line number 2
      3. This is line number 3
      4. This stays line number 4
      5. This stays line number 5





      <div id=3D"outline-container-1" clas= s=3D"outline-2">
      <h2 id=3D"sec-1"><span = class=3D"section-number-2">1</span> This is the first he= ader line </h2>
      <div class=3D"outline-text-2" id=3D"text-1">
      <= br>
      <ol>
      <li>
      This is line number 1

      </li>=
      <li>
      This is line number 2

      </li>
      <li> This is line number 3
      </li>
      </ol>

      <p><a n= ame=3D"Anchor1" id=3D"Anchor1"></a>
      </p&= gt;<ol>
      <li>
      This should be line number 4, but is reset b= y the anchor tag

      </li>
      <li>
      This should be line number 5.

      <o= l>
      </ol>
      </li>
      </ol>
      </div>

      &= lt;/div>

      <div id=3D"outline-container-2" class=3D&qu= ot;outline-2">
      <h2 id=3D"sec-2"><span class=3D"section-number-2&qu= ot;>2</span> This is the second header line </h2>
      <div= class=3D"outline-text-2" id=3D"text-2">


      = <ol>
      <li>
      This is line number 1

      </li>
      <li>
      Thi= s is line number 2

      </li>
      <li>
      This is line number = 3
      <a name=3D'anchor2'>
      </li>
      <li>
      Thi= s stays line number 4

      </li>
      <li>
      This stays line number 5
      </li></ol>
      </div>
      </div>


      --0016e6d7e3255505e9047e11b22f-- --===============2122083014== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============2122083014==--