Why do all of my hyperrefs take me to the same page?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I can't reproduce this in miniature outside of my document, so I'm asking more debugging help on how I can fix it within the document I have.



The problem is, I have a section with something like:



First is hyperref[P1]Item I, go there. hyperref[P2]Next is item 2, and finally is hyperref[P3]Item III.
newpage

%% later...
section*Item I
labelP1
stuff
section*Item II
labelP2
stuff
section*Item III
labelP3
stuff


Suppose



  • Item I, P1 is on page 1.

  • Item II, P2 is on page 6.

  • Item III, P3 is on page 20.

No matter what I change, hyperref[P3]Item III points to page 5, instead of 20.



I have tried the following debugs:




  1. Did I actually mislabel P3 as P2? No, it's P3.


  2. Did I actually fail to update the original hyperref, so it still says P2? No, it says P3.


  3. Am I sure? How about I call it something totally different, like LOCATION. hyperref[LOCATION]Item III section*Item IIIlabelLOCATION Still points to page 5, not page 20!


  4. Is there an error I'm missing, such as: LaTeX Warning: There were undefined references.? Nope, there are no missing references.


  5. How about completely remove labelP2 and see if P3 is still pointing there? Removed, yes, it still points to page 5, which now has zero labels intentionally pointing to it.


  6. What about debugging the pages themselves? pagerefP1 pagerefP2 pagerefP3 prints 2 7 21 Close enough, but this tells me in fact pagerefP2 is also incorrect. It's not pointing at P2, but at the end of P1, just as P3 is pointing at the end of P1.

Beyond this, I have no idea how to make any refs defined after the first one work, and by that I mean point elsewhere than at page 5. What could be going on?










share|improve this question

























    up vote
    1
    down vote

    favorite












    I can't reproduce this in miniature outside of my document, so I'm asking more debugging help on how I can fix it within the document I have.



    The problem is, I have a section with something like:



    First is hyperref[P1]Item I, go there. hyperref[P2]Next is item 2, and finally is hyperref[P3]Item III.
    newpage

    %% later...
    section*Item I
    labelP1
    stuff
    section*Item II
    labelP2
    stuff
    section*Item III
    labelP3
    stuff


    Suppose



    • Item I, P1 is on page 1.

    • Item II, P2 is on page 6.

    • Item III, P3 is on page 20.

    No matter what I change, hyperref[P3]Item III points to page 5, instead of 20.



    I have tried the following debugs:




    1. Did I actually mislabel P3 as P2? No, it's P3.


    2. Did I actually fail to update the original hyperref, so it still says P2? No, it says P3.


    3. Am I sure? How about I call it something totally different, like LOCATION. hyperref[LOCATION]Item III section*Item IIIlabelLOCATION Still points to page 5, not page 20!


    4. Is there an error I'm missing, such as: LaTeX Warning: There were undefined references.? Nope, there are no missing references.


    5. How about completely remove labelP2 and see if P3 is still pointing there? Removed, yes, it still points to page 5, which now has zero labels intentionally pointing to it.


    6. What about debugging the pages themselves? pagerefP1 pagerefP2 pagerefP3 prints 2 7 21 Close enough, but this tells me in fact pagerefP2 is also incorrect. It's not pointing at P2, but at the end of P1, just as P3 is pointing at the end of P1.

    Beyond this, I have no idea how to make any refs defined after the first one work, and by that I mean point elsewhere than at page 5. What could be going on?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I can't reproduce this in miniature outside of my document, so I'm asking more debugging help on how I can fix it within the document I have.



      The problem is, I have a section with something like:



      First is hyperref[P1]Item I, go there. hyperref[P2]Next is item 2, and finally is hyperref[P3]Item III.
      newpage

      %% later...
      section*Item I
      labelP1
      stuff
      section*Item II
      labelP2
      stuff
      section*Item III
      labelP3
      stuff


      Suppose



      • Item I, P1 is on page 1.

      • Item II, P2 is on page 6.

      • Item III, P3 is on page 20.

      No matter what I change, hyperref[P3]Item III points to page 5, instead of 20.



      I have tried the following debugs:




      1. Did I actually mislabel P3 as P2? No, it's P3.


      2. Did I actually fail to update the original hyperref, so it still says P2? No, it says P3.


      3. Am I sure? How about I call it something totally different, like LOCATION. hyperref[LOCATION]Item III section*Item IIIlabelLOCATION Still points to page 5, not page 20!


      4. Is there an error I'm missing, such as: LaTeX Warning: There were undefined references.? Nope, there are no missing references.


      5. How about completely remove labelP2 and see if P3 is still pointing there? Removed, yes, it still points to page 5, which now has zero labels intentionally pointing to it.


      6. What about debugging the pages themselves? pagerefP1 pagerefP2 pagerefP3 prints 2 7 21 Close enough, but this tells me in fact pagerefP2 is also incorrect. It's not pointing at P2, but at the end of P1, just as P3 is pointing at the end of P1.

      Beyond this, I have no idea how to make any refs defined after the first one work, and by that I mean point elsewhere than at page 5. What could be going on?










      share|improve this question













      I can't reproduce this in miniature outside of my document, so I'm asking more debugging help on how I can fix it within the document I have.



      The problem is, I have a section with something like:



      First is hyperref[P1]Item I, go there. hyperref[P2]Next is item 2, and finally is hyperref[P3]Item III.
      newpage

      %% later...
      section*Item I
      labelP1
      stuff
      section*Item II
      labelP2
      stuff
      section*Item III
      labelP3
      stuff


      Suppose



      • Item I, P1 is on page 1.

      • Item II, P2 is on page 6.

      • Item III, P3 is on page 20.

      No matter what I change, hyperref[P3]Item III points to page 5, instead of 20.



      I have tried the following debugs:




      1. Did I actually mislabel P3 as P2? No, it's P3.


      2. Did I actually fail to update the original hyperref, so it still says P2? No, it says P3.


      3. Am I sure? How about I call it something totally different, like LOCATION. hyperref[LOCATION]Item III section*Item IIIlabelLOCATION Still points to page 5, not page 20!


      4. Is there an error I'm missing, such as: LaTeX Warning: There were undefined references.? Nope, there are no missing references.


      5. How about completely remove labelP2 and see if P3 is still pointing there? Removed, yes, it still points to page 5, which now has zero labels intentionally pointing to it.


      6. What about debugging the pages themselves? pagerefP1 pagerefP2 pagerefP3 prints 2 7 21 Close enough, but this tells me in fact pagerefP2 is also incorrect. It's not pointing at P2, but at the end of P1, just as P3 is pointing at the end of P1.

      Beyond this, I have no idea how to make any refs defined after the first one work, and by that I mean point elsewhere than at page 5. What could be going on?







      hyperref cross-referencing href






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      Mittenchops

      404148




      404148




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You need to use



          phantomsection
          section*<title>
          label<label>


          since there is no hyper target set with section* like there is with section. If you're only using section* within your document, you could automate this process using



          letoldsectionsection % Copy section into oldsection
          renewcommandsection%
          phantomsection % Set hyper target
          oldsection*



          in your preamble






          share|improve this answer




















          • This is so reasonable I wish it were the default. The macro helps a lot, thank you!
            – Mittenchops
            18 mins ago






          • 1




            @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
            – Werner
            14 mins ago










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458674%2fwhy-do-all-of-my-hyperrefs-take-me-to-the-same-page%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          You need to use



          phantomsection
          section*<title>
          label<label>


          since there is no hyper target set with section* like there is with section. If you're only using section* within your document, you could automate this process using



          letoldsectionsection % Copy section into oldsection
          renewcommandsection%
          phantomsection % Set hyper target
          oldsection*



          in your preamble






          share|improve this answer




















          • This is so reasonable I wish it were the default. The macro helps a lot, thank you!
            – Mittenchops
            18 mins ago






          • 1




            @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
            – Werner
            14 mins ago














          up vote
          3
          down vote



          accepted










          You need to use



          phantomsection
          section*<title>
          label<label>


          since there is no hyper target set with section* like there is with section. If you're only using section* within your document, you could automate this process using



          letoldsectionsection % Copy section into oldsection
          renewcommandsection%
          phantomsection % Set hyper target
          oldsection*



          in your preamble






          share|improve this answer




















          • This is so reasonable I wish it were the default. The macro helps a lot, thank you!
            – Mittenchops
            18 mins ago






          • 1




            @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
            – Werner
            14 mins ago












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          You need to use



          phantomsection
          section*<title>
          label<label>


          since there is no hyper target set with section* like there is with section. If you're only using section* within your document, you could automate this process using



          letoldsectionsection % Copy section into oldsection
          renewcommandsection%
          phantomsection % Set hyper target
          oldsection*



          in your preamble






          share|improve this answer












          You need to use



          phantomsection
          section*<title>
          label<label>


          since there is no hyper target set with section* like there is with section. If you're only using section* within your document, you could automate this process using



          letoldsectionsection % Copy section into oldsection
          renewcommandsection%
          phantomsection % Set hyper target
          oldsection*



          in your preamble







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 1 hour ago









          Werner

          428k589391616




          428k589391616











          • This is so reasonable I wish it were the default. The macro helps a lot, thank you!
            – Mittenchops
            18 mins ago






          • 1




            @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
            – Werner
            14 mins ago
















          • This is so reasonable I wish it were the default. The macro helps a lot, thank you!
            – Mittenchops
            18 mins ago






          • 1




            @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
            – Werner
            14 mins ago















          This is so reasonable I wish it were the default. The macro helps a lot, thank you!
          – Mittenchops
          18 mins ago




          This is so reasonable I wish it were the default. The macro helps a lot, thank you!
          – Mittenchops
          18 mins ago




          1




          1




          @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
          – Werner
          14 mins ago




          @Mittenchops: The default for section is to issue refstepcounter. This sets a reference point and also steps the counter (section in this case). However, with section* there is no counter to step. Moreover, if you use label-ref, the result is the previous counter that was stepped. So, it's just that there's nothing appropriate to reference in general. The onus is therefore shifted to the end-user.
          – Werner
          14 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458674%2fwhy-do-all-of-my-hyperrefs-take-me-to-the-same-page%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)