Forum Bugs

counter(footnote) in footnote-marker numbering returns duplicate numbers

arash
When using a custom function to format the footnote-marker, if the footnotes are on the same line, the footnote-marker number will always show the last footnote number in that line. I have created a html page that can be used to duplicate the bug.

I'm using Prince version 12.5 on MacOS Mojave 10.14.5 and Just for reference here is the code for html:

<html>
  <head>
    <style>
      .fn {
        float: footnote;
      }
      *::footnote-marker {
        content: prince-script(formatPageNumber, counter(footnote)) '. ';
      }
    </style>
  </head>
  <body>
    <p>
      One morning<span class="fn">First Footnote</span>,
      when Gregor Samsa<span class="fn">Second Footnote</span> 
      woke from troubled dreams, he found himself
      transformed in his bed into a horrible vermin.
    </p>

    <script>
      Prince.addScriptFunc('formatPageNumber', formatPageNumber)

      function formatPageNumber(pageNumber) {
        return pageNumber //I'm just returning the pageNumber to display the bug
      }
    </script>
  </body>
</html>


  1. demo.html1.7 kB
  2. out.pdf30.4 kB

Edited by arash

mikeday
Wow that's an unexpected one! Thank you for the test case, we will investigate this issue.
arash
Thank you for investigating the issue. will any update on this posted here?
mikeday
Yes, that is why we have the forum, to address issues like this. :D
arash
One major version upgrade from since I posted this bug to your forums and not even an update on when we can see this issue resolved. Can you provide an ETA?

Edited by arash

mikeday
My apologies for the delay, we have a backlog of tricky issues that we hope to address this year.
mikeday
We now have a fix for this issue in the latest build, thank you for your patience!
arash
Thank you for the update and hard work.
arash
Unfortunately it seems while developers fixed this bug with footnote-marker they have introduced another bug with footnote-call when using a custom JavaScript function to format it. I have created a separate issue here:
https://www.princexml.com/forum/topic/4495/using-a-custom-js-function-to-format-the-footnote-call-in

But it is so frustrating to wait for a bug to be fixed almost 20 months after reporting it :(
mikeday
Apologies for the oversight, we will release a fix for this issue shortly!
mikeday
We now have a new latest build with a fix for this issue, thanks for letting us know. :D