How to make in-text page number retroactively update? [duplicate]












1
















This question already has an answer here:




  • How to reference the page of a figure?

    2 answers




It would be useful to have a page number like (see page # for more details) that is tied to a specific section or figure, and as a consequence, automatically updates the text to say where that page # of that section or figure is if a change pushes it to a new page. Can this be done?










share|improve this question













marked as duplicate by samcarter, Werner cross-referencing
Users with the  cross-referencing badge can single-handedly close cross-referencing questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 23:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




















    1
















    This question already has an answer here:




    • How to reference the page of a figure?

      2 answers




    It would be useful to have a page number like (see page # for more details) that is tied to a specific section or figure, and as a consequence, automatically updates the text to say where that page # of that section or figure is if a change pushes it to a new page. Can this be done?










    share|improve this question













    marked as duplicate by samcarter, Werner cross-referencing
    Users with the  cross-referencing badge can single-handedly close cross-referencing questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Jan 3 at 23:58


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















      1












      1








      1









      This question already has an answer here:




      • How to reference the page of a figure?

        2 answers




      It would be useful to have a page number like (see page # for more details) that is tied to a specific section or figure, and as a consequence, automatically updates the text to say where that page # of that section or figure is if a change pushes it to a new page. Can this be done?










      share|improve this question















      This question already has an answer here:




      • How to reference the page of a figure?

        2 answers




      It would be useful to have a page number like (see page # for more details) that is tied to a specific section or figure, and as a consequence, automatically updates the text to say where that page # of that section or figure is if a change pushes it to a new page. Can this be done?





      This question already has an answer here:




      • How to reference the page of a figure?

        2 answers








      cross-referencing






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 23:41









      user14554user14554

      434




      434




      marked as duplicate by samcarter, Werner cross-referencing
      Users with the  cross-referencing badge can single-handedly close cross-referencing questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Jan 3 at 23:58


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by samcarter, Werner cross-referencing
      Users with the  cross-referencing badge can single-handedly close cross-referencing questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Jan 3 at 23:58


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes


















          1














          The magic command you are looking for is pageref{<label>}.



          A short example:



          documentclass{article}

          usepackage{lipsum}% <- only for random text in the example

          begin{document}

          pageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}




          Or you could use the cleveref package which will not only insert the pagenumber but also automatically add the word "page" in front of it:



          documentclass{article}

          usepackage{lipsum}
          usepackage{cleveref}

          begin{document}

          cpageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}





          share|improve this answer


























          • In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

            – user14554
            Jan 3 at 23:53













          • @user14554 You have to compile two times.

            – samcarter
            Jan 3 at 23:55











          • There we go, thanks.

            – user14554
            Jan 3 at 23:55











          • @user14554 You're welcome!

            – samcarter
            Jan 3 at 23:55


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          The magic command you are looking for is pageref{<label>}.



          A short example:



          documentclass{article}

          usepackage{lipsum}% <- only for random text in the example

          begin{document}

          pageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}




          Or you could use the cleveref package which will not only insert the pagenumber but also automatically add the word "page" in front of it:



          documentclass{article}

          usepackage{lipsum}
          usepackage{cleveref}

          begin{document}

          cpageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}





          share|improve this answer


























          • In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

            – user14554
            Jan 3 at 23:53













          • @user14554 You have to compile two times.

            – samcarter
            Jan 3 at 23:55











          • There we go, thanks.

            – user14554
            Jan 3 at 23:55











          • @user14554 You're welcome!

            – samcarter
            Jan 3 at 23:55
















          1














          The magic command you are looking for is pageref{<label>}.



          A short example:



          documentclass{article}

          usepackage{lipsum}% <- only for random text in the example

          begin{document}

          pageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}




          Or you could use the cleveref package which will not only insert the pagenumber but also automatically add the word "page" in front of it:



          documentclass{article}

          usepackage{lipsum}
          usepackage{cleveref}

          begin{document}

          cpageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}





          share|improve this answer


























          • In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

            – user14554
            Jan 3 at 23:53













          • @user14554 You have to compile two times.

            – samcarter
            Jan 3 at 23:55











          • There we go, thanks.

            – user14554
            Jan 3 at 23:55











          • @user14554 You're welcome!

            – samcarter
            Jan 3 at 23:55














          1












          1








          1







          The magic command you are looking for is pageref{<label>}.



          A short example:



          documentclass{article}

          usepackage{lipsum}% <- only for random text in the example

          begin{document}

          pageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}




          Or you could use the cleveref package which will not only insert the pagenumber but also automatically add the word "page" in front of it:



          documentclass{article}

          usepackage{lipsum}
          usepackage{cleveref}

          begin{document}

          cpageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}





          share|improve this answer















          The magic command you are looking for is pageref{<label>}.



          A short example:



          documentclass{article}

          usepackage{lipsum}% <- only for random text in the example

          begin{document}

          pageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}




          Or you could use the cleveref package which will not only insert the pagenumber but also automatically add the word "page" in front of it:



          documentclass{article}

          usepackage{lipsum}
          usepackage{cleveref}

          begin{document}

          cpageref{foo}

          lipsum

          section{title}
          label{foo}


          end{document}






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 3 at 23:54

























          answered Jan 3 at 23:46









          samcartersamcarter

          86.7k795278




          86.7k795278













          • In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

            – user14554
            Jan 3 at 23:53













          • @user14554 You have to compile two times.

            – samcarter
            Jan 3 at 23:55











          • There we go, thanks.

            – user14554
            Jan 3 at 23:55











          • @user14554 You're welcome!

            – samcarter
            Jan 3 at 23:55



















          • In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

            – user14554
            Jan 3 at 23:53













          • @user14554 You have to compile two times.

            – samcarter
            Jan 3 at 23:55











          • There we go, thanks.

            – user14554
            Jan 3 at 23:55











          • @user14554 You're welcome!

            – samcarter
            Jan 3 at 23:55

















          In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

          – user14554
          Jan 3 at 23:53







          In a later section of the paper, I put " label{test} ". Then, I went back the paragraph I wanted to reference that section and put " pageref{test} " but all it produced was ??. Also, what if I don't want the word "page"?

          – user14554
          Jan 3 at 23:53















          @user14554 You have to compile two times.

          – samcarter
          Jan 3 at 23:55





          @user14554 You have to compile two times.

          – samcarter
          Jan 3 at 23:55













          There we go, thanks.

          – user14554
          Jan 3 at 23:55





          There we go, thanks.

          – user14554
          Jan 3 at 23:55













          @user14554 You're welcome!

          – samcarter
          Jan 3 at 23:55





          @user14554 You're welcome!

          – samcarter
          Jan 3 at 23:55



          Popular posts from this blog

          How to change which sound is reproduced for terminal bell?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Can I use Tabulator js library in my java Spring + Thymeleaf project?