Understanding Warning 'Destination with the same identifier has been already used' caused by Theorems
In the following mwe I get two warnings: LaTeX Warning: Citation 'foo' on page 2 undefined on input line 29.
and pdfTeX warning (ext4): destination with the same identifier (name{definition.1}) has been already used, duplicate ignored
.
While the first is obvious I don't see where the second would come from. The second warning disappears if, e.g. the newpage
is removed or the wrong citation is removed or corrected or cleveref
is removed. It also disappears if I use newtheorem
instead of thmtools
and declaretheorem
.
Can somebody explain me why that warning occurs? I started out with a big document which contained all these things, hence my desire to know.
I researched similar questions like this, this, this and this but it seems to be something different. Also I respect the order of loading packages.
The MWE
documentclass{scrbook}
usepackage{amsmath}
usepackage{amsthm}
usepackage{thmtools}
declaretheorem[style=plain,parent=section]{theorem}
declaretheorem[style=definition,qed=$triangle$,sibling=theorem]{definition}
% newtheorem{theorem}{Theorem}[section]
% newtheorem{definition}[theorem]{Definition}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
chapter{chap}
section{Sec1}
begin{definition}
Text
end{definition}
newpage
section{Sec2}
The reference cite{foo} is undefined.
begin{definition}
Text
end{definition}
end{document}
hyperref theorems warnings
add a comment |
In the following mwe I get two warnings: LaTeX Warning: Citation 'foo' on page 2 undefined on input line 29.
and pdfTeX warning (ext4): destination with the same identifier (name{definition.1}) has been already used, duplicate ignored
.
While the first is obvious I don't see where the second would come from. The second warning disappears if, e.g. the newpage
is removed or the wrong citation is removed or corrected or cleveref
is removed. It also disappears if I use newtheorem
instead of thmtools
and declaretheorem
.
Can somebody explain me why that warning occurs? I started out with a big document which contained all these things, hence my desire to know.
I researched similar questions like this, this, this and this but it seems to be something different. Also I respect the order of loading packages.
The MWE
documentclass{scrbook}
usepackage{amsmath}
usepackage{amsthm}
usepackage{thmtools}
declaretheorem[style=plain,parent=section]{theorem}
declaretheorem[style=definition,qed=$triangle$,sibling=theorem]{definition}
% newtheorem{theorem}{Theorem}[section]
% newtheorem{definition}[theorem]{Definition}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
chapter{chap}
section{Sec1}
begin{definition}
Text
end{definition}
newpage
section{Sec2}
The reference cite{foo} is undefined.
begin{definition}
Text
end{definition}
end{document}
hyperref theorems warnings
1
The twodeclaretheorem
directives should occur afterhyperref
andcleveref
are loaded. Make this change irrespective of anynewpage
directives in the body of the document.
– Mico
Jan 29 at 1:28
1
Arg.. thanks! :-) Could you post this as answer, then I can accept.
– Heinrich Ody
Jan 29 at 10:01
1
@Mico Do you know if it is documented that theorems should be declared after loading all packages? Asking cause I could not find anything
– Heinrich Ody
Jan 29 at 10:30
add a comment |
In the following mwe I get two warnings: LaTeX Warning: Citation 'foo' on page 2 undefined on input line 29.
and pdfTeX warning (ext4): destination with the same identifier (name{definition.1}) has been already used, duplicate ignored
.
While the first is obvious I don't see where the second would come from. The second warning disappears if, e.g. the newpage
is removed or the wrong citation is removed or corrected or cleveref
is removed. It also disappears if I use newtheorem
instead of thmtools
and declaretheorem
.
Can somebody explain me why that warning occurs? I started out with a big document which contained all these things, hence my desire to know.
I researched similar questions like this, this, this and this but it seems to be something different. Also I respect the order of loading packages.
The MWE
documentclass{scrbook}
usepackage{amsmath}
usepackage{amsthm}
usepackage{thmtools}
declaretheorem[style=plain,parent=section]{theorem}
declaretheorem[style=definition,qed=$triangle$,sibling=theorem]{definition}
% newtheorem{theorem}{Theorem}[section]
% newtheorem{definition}[theorem]{Definition}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
chapter{chap}
section{Sec1}
begin{definition}
Text
end{definition}
newpage
section{Sec2}
The reference cite{foo} is undefined.
begin{definition}
Text
end{definition}
end{document}
hyperref theorems warnings
In the following mwe I get two warnings: LaTeX Warning: Citation 'foo' on page 2 undefined on input line 29.
and pdfTeX warning (ext4): destination with the same identifier (name{definition.1}) has been already used, duplicate ignored
.
While the first is obvious I don't see where the second would come from. The second warning disappears if, e.g. the newpage
is removed or the wrong citation is removed or corrected or cleveref
is removed. It also disappears if I use newtheorem
instead of thmtools
and declaretheorem
.
Can somebody explain me why that warning occurs? I started out with a big document which contained all these things, hence my desire to know.
I researched similar questions like this, this, this and this but it seems to be something different. Also I respect the order of loading packages.
The MWE
documentclass{scrbook}
usepackage{amsmath}
usepackage{amsthm}
usepackage{thmtools}
declaretheorem[style=plain,parent=section]{theorem}
declaretheorem[style=definition,qed=$triangle$,sibling=theorem]{definition}
% newtheorem{theorem}{Theorem}[section]
% newtheorem{definition}[theorem]{Definition}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
chapter{chap}
section{Sec1}
begin{definition}
Text
end{definition}
newpage
section{Sec2}
The reference cite{foo} is undefined.
begin{definition}
Text
end{definition}
end{document}
hyperref theorems warnings
hyperref theorems warnings
asked Jan 28 at 23:14
Heinrich OdyHeinrich Ody
445213
445213
1
The twodeclaretheorem
directives should occur afterhyperref
andcleveref
are loaded. Make this change irrespective of anynewpage
directives in the body of the document.
– Mico
Jan 29 at 1:28
1
Arg.. thanks! :-) Could you post this as answer, then I can accept.
– Heinrich Ody
Jan 29 at 10:01
1
@Mico Do you know if it is documented that theorems should be declared after loading all packages? Asking cause I could not find anything
– Heinrich Ody
Jan 29 at 10:30
add a comment |
1
The twodeclaretheorem
directives should occur afterhyperref
andcleveref
are loaded. Make this change irrespective of anynewpage
directives in the body of the document.
– Mico
Jan 29 at 1:28
1
Arg.. thanks! :-) Could you post this as answer, then I can accept.
– Heinrich Ody
Jan 29 at 10:01
1
@Mico Do you know if it is documented that theorems should be declared after loading all packages? Asking cause I could not find anything
– Heinrich Ody
Jan 29 at 10:30
1
1
The two
declaretheorem
directives should occur after hyperref
and cleveref
are loaded. Make this change irrespective of any newpage
directives in the body of the document.– Mico
Jan 29 at 1:28
The two
declaretheorem
directives should occur after hyperref
and cleveref
are loaded. Make this change irrespective of any newpage
directives in the body of the document.– Mico
Jan 29 at 1:28
1
1
Arg.. thanks! :-) Could you post this as answer, then I can accept.
– Heinrich Ody
Jan 29 at 10:01
Arg.. thanks! :-) Could you post this as answer, then I can accept.
– Heinrich Ody
Jan 29 at 10:01
1
1
@Mico Do you know if it is documented that theorems should be declared after loading all packages? Asking cause I could not find anything
– Heinrich Ody
Jan 29 at 10:30
@Mico Do you know if it is documented that theorems should be declared after loading all packages? Asking cause I could not find anything
– Heinrich Ody
Jan 29 at 10:30
add a comment |
1 Answer
1
active
oldest
votes
(Re-posting an earlier comment, so that the query can be treated as having received an answer.)
The immediate cause of the problem is the fact that the two declaretheorem
directives are currently placed before rather than after the hyperref
and cleveref
packages are loaded.
Do change the placement of the two directives, irrespective of any newpage
directives that may be present in the body of the document.
To answer your follow-up question: The user guide of the cleveref
package does mention that while all theorem-related packages -- such as amsthm
and thmtools
-- should be loaded before cleveref
, statements of the newtheorem
and declaretheorem
variety should occur only after cleveref
is loaded. (For more detail, see the final sentence in the second bullet point in section 14.1 on page 25 of the package's user guide.)
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472317%2funderstanding-warning-destination-with-the-same-identifier-has-been-already-use%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
(Re-posting an earlier comment, so that the query can be treated as having received an answer.)
The immediate cause of the problem is the fact that the two declaretheorem
directives are currently placed before rather than after the hyperref
and cleveref
packages are loaded.
Do change the placement of the two directives, irrespective of any newpage
directives that may be present in the body of the document.
To answer your follow-up question: The user guide of the cleveref
package does mention that while all theorem-related packages -- such as amsthm
and thmtools
-- should be loaded before cleveref
, statements of the newtheorem
and declaretheorem
variety should occur only after cleveref
is loaded. (For more detail, see the final sentence in the second bullet point in section 14.1 on page 25 of the package's user guide.)
add a comment |
(Re-posting an earlier comment, so that the query can be treated as having received an answer.)
The immediate cause of the problem is the fact that the two declaretheorem
directives are currently placed before rather than after the hyperref
and cleveref
packages are loaded.
Do change the placement of the two directives, irrespective of any newpage
directives that may be present in the body of the document.
To answer your follow-up question: The user guide of the cleveref
package does mention that while all theorem-related packages -- such as amsthm
and thmtools
-- should be loaded before cleveref
, statements of the newtheorem
and declaretheorem
variety should occur only after cleveref
is loaded. (For more detail, see the final sentence in the second bullet point in section 14.1 on page 25 of the package's user guide.)
add a comment |
(Re-posting an earlier comment, so that the query can be treated as having received an answer.)
The immediate cause of the problem is the fact that the two declaretheorem
directives are currently placed before rather than after the hyperref
and cleveref
packages are loaded.
Do change the placement of the two directives, irrespective of any newpage
directives that may be present in the body of the document.
To answer your follow-up question: The user guide of the cleveref
package does mention that while all theorem-related packages -- such as amsthm
and thmtools
-- should be loaded before cleveref
, statements of the newtheorem
and declaretheorem
variety should occur only after cleveref
is loaded. (For more detail, see the final sentence in the second bullet point in section 14.1 on page 25 of the package's user guide.)
(Re-posting an earlier comment, so that the query can be treated as having received an answer.)
The immediate cause of the problem is the fact that the two declaretheorem
directives are currently placed before rather than after the hyperref
and cleveref
packages are loaded.
Do change the placement of the two directives, irrespective of any newpage
directives that may be present in the body of the document.
To answer your follow-up question: The user guide of the cleveref
package does mention that while all theorem-related packages -- such as amsthm
and thmtools
-- should be loaded before cleveref
, statements of the newtheorem
and declaretheorem
variety should occur only after cleveref
is loaded. (For more detail, see the final sentence in the second bullet point in section 14.1 on page 25 of the package's user guide.)
edited Jan 29 at 11:26
answered Jan 29 at 11:15
MicoMico
277k30380768
277k30380768
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472317%2funderstanding-warning-destination-with-the-same-identifier-has-been-already-use%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The two
declaretheorem
directives should occur afterhyperref
andcleveref
are loaded. Make this change irrespective of anynewpage
directives in the body of the document.– Mico
Jan 29 at 1:28
1
Arg.. thanks! :-) Could you post this as answer, then I can accept.
– Heinrich Ody
Jan 29 at 10:01
1
@Mico Do you know if it is documented that theorems should be declared after loading all packages? Asking cause I could not find anything
– Heinrich Ody
Jan 29 at 10:30