Next in thread → Next in month →

Re: [docbook-apps] Superscript footnote numbers in XHTML not formatting correctly

From
Bob Stayton <>
Date
2012-02-20T18:38:15+00:00
ID
005f01cceffe$c9e966b0$6600a8c0@pazu
Thread
Re: [docbook-apps] Superscript footnote numbers in XHTML not formatting correctly
Hi,

I checked in the fix for this, putting the whole 
<sup> inside the anchor.  That seems to work well.  It will be 
in the next snapshot.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Xmplar 

  
To: Bob Stayton 

  
Cc:  
  

  
Sent: Friday, February 17, 2012 5:42 
  PM

  
Subject: Re: [docbook-apps] Superscript 
  footnote numbers in XHTML not formatting correctly

  

  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  

  
I tried a few variations, and noted that with the default 
  generated <sup> markup, the problem of a split footnote number occurs 
  only with the first footnote in a chunk ? subsequent footnotes in the chunk 
  are rendered correctly (which is, a smaller superscript number and the 
  hyperlink immediately underneath only the number: <sup>[<a 
  id="d0e490" href="" class="footnote">1c</a>]</sup>). 
  This is the case for Firefox, Chrome and SeaMonkey. IE8 breaks the footnote 
  across two lines.

  
I then found a workaround that renders the first footnote 
  correctly in most browsers (IE8 still breaks across lines) ? put an empty 
  <a> tag before the <sup> (though having duplicate <a> tags 
  might have issues regarding accessibility or validity, and I?m not sure if 
  epubcheck would pass such a chunk as valid):

  
<a></a><sup>[<a id="d0e490" 
  href="" class="footnote">1c</a>]</sup>

  
But the markup that is rendered most consistently across 
  browsers is to put the superscript inside the <a>:

  
<a id="d0e490" href="" 
  class="footnote"><sup>[1a]</sup></a>

  
This places the hyperlink underline a small distance below 
  the superscript and makes the square brackets and the number active ? this 
  could be better than the default markup because there?s a slightly larger 
  active link area.

  
  
  
  
  

On 18-02-12 4:42 AM, Bob Stayton wrote: 
  
    
    
Hi Dave,

    
That HTML code looks legit to me.  Can you 
    try these variants and see if any of them work in all the 
    browsers?

    
 

    
<p>Original: earth occur in 
    Australia.<sup>[<a id="d0e490" href="" 
    class="footnote">1</a>]</sup> More ...</p>

    
 

    
<p>Variant 1:  earth occur in 
    Australia.<sup><a id="d0e490" href="" 
    class="footnote">[1]</a></sup> More 
...</p>

    

<p>Variant 2:  earth occur in 
    Australia.<a id="d0e490" href="" 
    class="footnote"><sup>[1]</sup></a> More 
    ...</p>

    
Bob Stayton
Sagehill Enterprises


    
 

    
 

    
      
----- Original Message ----- 

      
From: 
      Xmplar 

      
To:  

      
Sent: Friday, February 17, 2012 6:46 
      AM

      
Subject: Re: [docbook-apps] 
      Superscript footnote numbers in XHTML not formatting correctly

      

Bob,
I've viewed this chunk with Firefox 10, Google 
      Chrome 17 and SeaMonkey 2.7 - they all show the first footnote the same 
      way as my screenshots. Internet Explorer 8 actually shows the 
      left-bracket, then *breaks* the rest of the footnote number onto the next 
      line! (number and right-bracket). Only IE6 shows the first footnote number 
      correctly.

Here is the part of the HTML output:

... earth 
      occur in Australia.<sup>[<a id="d0e490" href="" 
      class="footnote">1</a>]</sup> More ...

This is 
      exactly the same output for the next footnote - it seems to be a browser 
      problem. Interesting...

On 17-02-12 5:03 AM, Bob Stayton wrote: 
      
        
        

        
Hi Dave,

        
Can you show what the generated HTML code 
        looks like?

        
 

        
Does this problem show up in other 
        browsers?

        
 

        
Bob Stayton
Sagehill Enterprises


        
 

        
 

        
          
----- Original Message ----- 

          
From: 
          Xmplar 

          
To:  

          
Sent: Thursday, February 16, 2012 
          3:28 AM

          
Subject: [docbook-apps] 
          Superscript footnote numbers in XHTML not formatting correctly

          

I am producing XHTML 1.1 files with DB5 1.76.1ns and 
          Saxon 6.5.5 - regarding superscript footnote numbers in body text, the 
          first footnote is not correctly sized to superscript size - the 
          footnote number and the closing right square bracket are the same size 
          as the body text (whereas the opening square bracket is correctly 
          sized). The second footnote number in the same paragraph is sized 
          properly. See the attached screenshots.
I have made sure my 
          customisation layer and CSS file is not interfering. I'm using the 
          markup: 
          <footnote><para>text...</para></footnote>.

          
-- 
Dave Gardiner

          
          
---------------------------------------------------------------------
To 
          unsubscribe, e-mail: 
For 
          additional commands, e-mail: 
Next in thread → Next in month →