How to make in-text page number retroactively update? [duplicate]
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?
cross-referencing
marked as duplicate by samcarter, Werner
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.
add a comment |
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?
cross-referencing
marked as duplicate by samcarter, Werner
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.
add a comment |
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?
cross-referencing
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
cross-referencing
asked Jan 3 at 23:41
user14554user14554
434
434
marked as duplicate by samcarter, Werner
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
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.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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}
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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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}
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
add a comment |
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}
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
add a comment |
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}
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}
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
add a comment |
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
add a comment |