page numbers missing from linked text

Comments

3 comments

  • Avatar
    Sally Derrick

    Just remembered the link tab and turned off page numbers.  I'm still curious about the issue though.  In a larger PDF, I would  want the page numbers to work ... consistently.

    0
    Comment actions Permalink
  • Avatar
    Jens Rutschmann

    Hi Sally,

    apparently this happens because the anchor macro in the heading manipulates the original ID of the heading element.

    This is the HTML generated by your markup:

    <h1 id="TestPage-ReqMaterialsRequiredMaterials">
        <span id="TestPage-ReqMaterials" class="confluence-anchor-link"></span>
        Required Materials
    </h1>

    <a href="#TestPage-ReqMaterials">ReqMaterials</a>

    As you can see, the link does not point to the heading, but to a span element inside the heading. Our exporters do not support rich text content in headings due to the single source approach they are following and therefore only consider the ID of the heading element itself.

    To add links to headings you do not need an anchor macro at all because the headings generate anchors by themselves. Unfortunately the anchor macro manipulates the ID of the heading element, so you need to remove it from the heading. Then simply add links in confluence as shown in the screenshot below.

    link.png

     

    Best regards,
    Jens

    0
    Comment actions Permalink
  • Avatar
    Sally Derrick

    So, insstead of putting an anchor on a heading, just use the # with the heading text?  I'll give it a try as soon as the alligator's stop biting! 

     

    Sally

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk