Forum Bugs

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

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:

      .fn {
        float: footnote;
      *::footnote-marker {
        content: prince-script(formatPageNumber, counter(footnote)) '. ';
      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.

      Prince.addScriptFunc('formatPageNumber', formatPageNumber)

      function formatPageNumber(pageNumber) {
        return pageNumber //I'm just returning the pageNumber to display the bug

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

Edited by arash

Wow that's an unexpected one! Thank you for the test case, we will investigate this issue.
Thank you for investigating the issue. will any update on this posted here?
Yes, that is why we have the forum, to address issues like this. :D
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

My apologies for the delay, we have a backlog of tricky issues that we hope to address this year.
We now have a fix for this issue in the latest build, thank you for your patience!
Thank you for the update and hard work.
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:

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