How to identify floats that are not referenced in text [duplicate]
This question already has an answer here:
How can I get LaTeX to warn about unreferenced figures and unused labels in general?
1 answer
I would like to ensure that all figures in my document are referenced somewhere in the text. With all the editing I've been doing, some of the figures are no longer being referenced and I would like to find out which (so I can either delete the figures or add appropriate references).
Is there a way (using a package, or custom function) to highlight or list any floats that do not have a corresponding ref{fig:foobar}
in the text body?
Example:
documentclass{article}
usepackage{graphicx}
usepackage{flafter}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}
includegraphics{gold.png}
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}
includegraphics{silver.png}
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
I'd like to run a function that tells me fig:silver
was never referenced in the text
Note that I'm already using flafter
to ensure floats only appear after they have been referenced. Is there an argument I can pass to flafter
or listoffigures
which has the functionality I'm looking for?
floats cross-referencing
New contributor
marked as duplicate by Torbjørn T., 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();
}
);
});
});
8 hours ago
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 can I get LaTeX to warn about unreferenced figures and unused labels in general?
1 answer
I would like to ensure that all figures in my document are referenced somewhere in the text. With all the editing I've been doing, some of the figures are no longer being referenced and I would like to find out which (so I can either delete the figures or add appropriate references).
Is there a way (using a package, or custom function) to highlight or list any floats that do not have a corresponding ref{fig:foobar}
in the text body?
Example:
documentclass{article}
usepackage{graphicx}
usepackage{flafter}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}
includegraphics{gold.png}
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}
includegraphics{silver.png}
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
I'd like to run a function that tells me fig:silver
was never referenced in the text
Note that I'm already using flafter
to ensure floats only appear after they have been referenced. Is there an argument I can pass to flafter
or listoffigures
which has the functionality I'm looking for?
floats cross-referencing
New contributor
marked as duplicate by Torbjørn T., 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();
}
);
});
});
8 hours ago
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 can I get LaTeX to warn about unreferenced figures and unused labels in general?
1 answer
I would like to ensure that all figures in my document are referenced somewhere in the text. With all the editing I've been doing, some of the figures are no longer being referenced and I would like to find out which (so I can either delete the figures or add appropriate references).
Is there a way (using a package, or custom function) to highlight or list any floats that do not have a corresponding ref{fig:foobar}
in the text body?
Example:
documentclass{article}
usepackage{graphicx}
usepackage{flafter}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}
includegraphics{gold.png}
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}
includegraphics{silver.png}
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
I'd like to run a function that tells me fig:silver
was never referenced in the text
Note that I'm already using flafter
to ensure floats only appear after they have been referenced. Is there an argument I can pass to flafter
or listoffigures
which has the functionality I'm looking for?
floats cross-referencing
New contributor
This question already has an answer here:
How can I get LaTeX to warn about unreferenced figures and unused labels in general?
1 answer
I would like to ensure that all figures in my document are referenced somewhere in the text. With all the editing I've been doing, some of the figures are no longer being referenced and I would like to find out which (so I can either delete the figures or add appropriate references).
Is there a way (using a package, or custom function) to highlight or list any floats that do not have a corresponding ref{fig:foobar}
in the text body?
Example:
documentclass{article}
usepackage{graphicx}
usepackage{flafter}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}
includegraphics{gold.png}
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}
includegraphics{silver.png}
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
I'd like to run a function that tells me fig:silver
was never referenced in the text
Note that I'm already using flafter
to ensure floats only appear after they have been referenced. Is there an argument I can pass to flafter
or listoffigures
which has the functionality I'm looking for?
This question already has an answer here:
How can I get LaTeX to warn about unreferenced figures and unused labels in general?
1 answer
floats cross-referencing
floats cross-referencing
New contributor
New contributor
edited 8 hours ago
Torbjørn T.
155k13249437
155k13249437
New contributor
asked 9 hours ago
jayologistjayologist
384
384
New contributor
New contributor
marked as duplicate by Torbjørn T., 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();
}
);
});
});
8 hours ago
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 Torbjørn T., 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();
}
);
});
});
8 hours ago
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 refcheck
package does this. It prints the label next to the caption, and if unreferenced places it between question marks.
documentclass{article}
usepackage[demo]{graphicx}
usepackage{flafter}
usepackage{refcheck}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}[hb]
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}[hb]
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The refcheck
package does this. It prints the label next to the caption, and if unreferenced places it between question marks.
documentclass{article}
usepackage[demo]{graphicx}
usepackage{flafter}
usepackage{refcheck}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}[hb]
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}[hb]
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
add a comment |
The refcheck
package does this. It prints the label next to the caption, and if unreferenced places it between question marks.
documentclass{article}
usepackage[demo]{graphicx}
usepackage{flafter}
usepackage{refcheck}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}[hb]
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}[hb]
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
add a comment |
The refcheck
package does this. It prints the label next to the caption, and if unreferenced places it between question marks.
documentclass{article}
usepackage[demo]{graphicx}
usepackage{flafter}
usepackage{refcheck}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}[hb]
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}[hb]
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
The refcheck
package does this. It prints the label next to the caption, and if unreferenced places it between question marks.
documentclass{article}
usepackage[demo]{graphicx}
usepackage{flafter}
usepackage{refcheck}
begin{document}
There's a lady who's sure all that glitters is gold (See Figure ref{fig:gold}).
And she's buying a stairway to heaven.
begin{figure}[hb]
caption{Picture of gold}
label{fig:gold}
end{figure}
begin{figure}[hb]
caption{Picture of silver}
label{fig:silver}
end{figure}
end{document}
answered 9 hours ago
Torbjørn T.Torbjørn T.
155k13249437
155k13249437
add a comment |
add a comment |