How do I show the labels of theorems, definitions, etcAccessing the last value of `label`Theorems and...

How does Captain America channel this power?

Checks user level and limit the data before saving it to mongoDB

Relationship between strut and baselineskip

Can I criticise the more senior developers around me for not writing clean code?

Implications of cigar-shaped bodies having rings?

Minor Revision with suggestion of an alternative proof by reviewer

How to write a column outside the braces in a matrix?

What does the integral of a function times a function of a random variable represent, conceptually?

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

Don’t seats that recline flat defeat the purpose of having seatbelts?

Coordinate my way to the name of the (video) game

Phrase for the opposite of "foolproof"

Is Diceware more secure than a long passphrase?

"You've called the wrong number" or "You called the wrong number"

What is the smallest unit of eos?

Function pointer with named arguments?

Rivers without rain

Two field separators (colon and space) in awk

Extension of 2-adic valuation to the real numbers

Elements other than carbon that can form many different compounds by bonding to themselves?

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

Is it idiomatic to construct against `this`

How exactly does Hawking radiation decrease the mass of black holes?

Can we say “you can pay when the order gets ready”?



How do I show the labels of theorems, definitions, etc


Accessing the last value of `label`Theorems and Definitions as quotesAmsbook: Theoremstyles definition and remark identical?Plain enumeration of theorems definitions etcNumbered Definitions, Theorems in beamerSubsection label appearing within textTheorems and labelsUse the same counter for definitions and theoremsDefinitions and theorems in beamerNo new line for theorem in enumerateHow to link to a Theorem that contains only an enumerated list













3















I'm using the package showlabels which has the effect that when I label something with label{thing1} the thing1 gets typeset in the margin of my document next to where I put the label. This works fine for equations in align and proof environments, and things like that.



The problem is that it does not work when I label a theorem, which I do like this:



begin{theorem}label{fact1}
Important math statement.
end{theorem}


I can still refer to said theorem via ref{fact1}
but I cannot get the label to typeset in the margin next to the theorem.



EDIT:
I originally failed to include a compilable example of the problem. @DavidCarlisle posted an example of the problem not occurring, but with showlabels replaced with showkeys, upon which I noticed that showkeys did not produce the problem.



Looking more closely at my preamble, the problem had to do with the hyperref package. The following does not result in the label on the theorem being displayed.



documentclass{article}

usepackage{showlabels}
usepackage{hyperref}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}


On the other hand, if one moves the hyperref package so it is implemented before showlabels, as follows, it works.



documentclass{article}

usepackage{hyperref}
usepackage{showlabels}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}









share|improve this question




















  • 1





    Can you please make a complete compilable example?

    – egreg
    Jan 23 '16 at 14:20






  • 1





    This made me realize that I probably would have answered my own question before posting if I'd made the minimal example first. This is probably obvious to many, but from now on I'm going to do that as a rule.

    – j0equ1nn
    Jan 23 '16 at 15:27
















3















I'm using the package showlabels which has the effect that when I label something with label{thing1} the thing1 gets typeset in the margin of my document next to where I put the label. This works fine for equations in align and proof environments, and things like that.



The problem is that it does not work when I label a theorem, which I do like this:



begin{theorem}label{fact1}
Important math statement.
end{theorem}


I can still refer to said theorem via ref{fact1}
but I cannot get the label to typeset in the margin next to the theorem.



EDIT:
I originally failed to include a compilable example of the problem. @DavidCarlisle posted an example of the problem not occurring, but with showlabels replaced with showkeys, upon which I noticed that showkeys did not produce the problem.



Looking more closely at my preamble, the problem had to do with the hyperref package. The following does not result in the label on the theorem being displayed.



documentclass{article}

usepackage{showlabels}
usepackage{hyperref}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}


On the other hand, if one moves the hyperref package so it is implemented before showlabels, as follows, it works.



documentclass{article}

usepackage{hyperref}
usepackage{showlabels}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}









share|improve this question




















  • 1





    Can you please make a complete compilable example?

    – egreg
    Jan 23 '16 at 14:20






  • 1





    This made me realize that I probably would have answered my own question before posting if I'd made the minimal example first. This is probably obvious to many, but from now on I'm going to do that as a rule.

    – j0equ1nn
    Jan 23 '16 at 15:27














3












3








3








I'm using the package showlabels which has the effect that when I label something with label{thing1} the thing1 gets typeset in the margin of my document next to where I put the label. This works fine for equations in align and proof environments, and things like that.



The problem is that it does not work when I label a theorem, which I do like this:



begin{theorem}label{fact1}
Important math statement.
end{theorem}


I can still refer to said theorem via ref{fact1}
but I cannot get the label to typeset in the margin next to the theorem.



EDIT:
I originally failed to include a compilable example of the problem. @DavidCarlisle posted an example of the problem not occurring, but with showlabels replaced with showkeys, upon which I noticed that showkeys did not produce the problem.



Looking more closely at my preamble, the problem had to do with the hyperref package. The following does not result in the label on the theorem being displayed.



documentclass{article}

usepackage{showlabels}
usepackage{hyperref}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}


On the other hand, if one moves the hyperref package so it is implemented before showlabels, as follows, it works.



documentclass{article}

usepackage{hyperref}
usepackage{showlabels}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}









share|improve this question
















I'm using the package showlabels which has the effect that when I label something with label{thing1} the thing1 gets typeset in the margin of my document next to where I put the label. This works fine for equations in align and proof environments, and things like that.



The problem is that it does not work when I label a theorem, which I do like this:



begin{theorem}label{fact1}
Important math statement.
end{theorem}


I can still refer to said theorem via ref{fact1}
but I cannot get the label to typeset in the margin next to the theorem.



EDIT:
I originally failed to include a compilable example of the problem. @DavidCarlisle posted an example of the problem not occurring, but with showlabels replaced with showkeys, upon which I noticed that showkeys did not produce the problem.



Looking more closely at my preamble, the problem had to do with the hyperref package. The following does not result in the label on the theorem being displayed.



documentclass{article}

usepackage{showlabels}
usepackage{hyperref}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}


On the other hand, if one moves the hyperref package so it is implemented before showlabels, as follows, it works.



documentclass{article}

usepackage{hyperref}
usepackage{showlabels}
usepackage[english]{babel}

newtheorem{theorem}{Theorem}[section]

begin{document}

begin{theorem}label{a theorem}
Important math statement.
end{theorem}

end{document}






theorems showlabels






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 mins ago







j0equ1nn

















asked Jan 23 '16 at 14:19









j0equ1nnj0equ1nn

398313




398313








  • 1





    Can you please make a complete compilable example?

    – egreg
    Jan 23 '16 at 14:20






  • 1





    This made me realize that I probably would have answered my own question before posting if I'd made the minimal example first. This is probably obvious to many, but from now on I'm going to do that as a rule.

    – j0equ1nn
    Jan 23 '16 at 15:27














  • 1





    Can you please make a complete compilable example?

    – egreg
    Jan 23 '16 at 14:20






  • 1





    This made me realize that I probably would have answered my own question before posting if I'd made the minimal example first. This is probably obvious to many, but from now on I'm going to do that as a rule.

    – j0equ1nn
    Jan 23 '16 at 15:27








1




1





Can you please make a complete compilable example?

– egreg
Jan 23 '16 at 14:20





Can you please make a complete compilable example?

– egreg
Jan 23 '16 at 14:20




1




1





This made me realize that I probably would have answered my own question before posting if I'd made the minimal example first. This is probably obvious to many, but from now on I'm going to do that as a rule.

– j0equ1nn
Jan 23 '16 at 15:27





This made me realize that I probably would have answered my own question before posting if I'd made the minimal example first. This is probably obvious to many, but from now on I'm going to do that as a rule.

– j0equ1nn
Jan 23 '16 at 15:27










1 Answer
1






active

oldest

votes


















5














With showlabels



enter image description here



documentclass{article}
usepackage{showlabels}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}


enter image description here



or with showkeys



documentclass{article}
usepackage{showkeys}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}





share|improve this answer


























  • Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

    – j0equ1nn
    Jan 23 '16 at 14:28











  • @j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

    – David Carlisle
    Jan 23 '16 at 14:29











  • That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

    – j0equ1nn
    Jan 23 '16 at 14:31











  • @j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

    – David Carlisle
    Jan 23 '16 at 14:33











  • Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

    – j0equ1nn
    Jan 23 '16 at 14:46












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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f289038%2fhow-do-i-show-the-labels-of-theorems-definitions-etc%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









5














With showlabels



enter image description here



documentclass{article}
usepackage{showlabels}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}


enter image description here



or with showkeys



documentclass{article}
usepackage{showkeys}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}





share|improve this answer


























  • Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

    – j0equ1nn
    Jan 23 '16 at 14:28











  • @j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

    – David Carlisle
    Jan 23 '16 at 14:29











  • That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

    – j0equ1nn
    Jan 23 '16 at 14:31











  • @j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

    – David Carlisle
    Jan 23 '16 at 14:33











  • Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

    – j0equ1nn
    Jan 23 '16 at 14:46
















5














With showlabels



enter image description here



documentclass{article}
usepackage{showlabels}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}


enter image description here



or with showkeys



documentclass{article}
usepackage{showkeys}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}





share|improve this answer


























  • Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

    – j0equ1nn
    Jan 23 '16 at 14:28











  • @j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

    – David Carlisle
    Jan 23 '16 at 14:29











  • That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

    – j0equ1nn
    Jan 23 '16 at 14:31











  • @j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

    – David Carlisle
    Jan 23 '16 at 14:33











  • Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

    – j0equ1nn
    Jan 23 '16 at 14:46














5












5








5







With showlabels



enter image description here



documentclass{article}
usepackage{showlabels}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}


enter image description here



or with showkeys



documentclass{article}
usepackage{showkeys}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}





share|improve this answer















With showlabels



enter image description here



documentclass{article}
usepackage{showlabels}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}


enter image description here



or with showkeys



documentclass{article}
usepackage{showkeys}
newtheorem{theorem}{Theorem}

begin{document}

section{Zzzz}
zzz

begin{theorem}label{fact1}
Important math statement.
end{theorem}

end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 23 '16 at 14:32

























answered Jan 23 '16 at 14:22









David CarlisleDavid Carlisle

501k4211481897




501k4211481897













  • Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

    – j0equ1nn
    Jan 23 '16 at 14:28











  • @j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

    – David Carlisle
    Jan 23 '16 at 14:29











  • That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

    – j0equ1nn
    Jan 23 '16 at 14:31











  • @j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

    – David Carlisle
    Jan 23 '16 at 14:33











  • Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

    – j0equ1nn
    Jan 23 '16 at 14:46



















  • Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

    – j0equ1nn
    Jan 23 '16 at 14:28











  • @j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

    – David Carlisle
    Jan 23 '16 at 14:29











  • That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

    – j0equ1nn
    Jan 23 '16 at 14:31











  • @j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

    – David Carlisle
    Jan 23 '16 at 14:33











  • Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

    – j0equ1nn
    Jan 23 '16 at 14:46

















Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

– j0equ1nn
Jan 23 '16 at 14:28





Great, thanks very much! I want to include that when adding 'showkeys' I had to remove 'showlabels' to avoid equations getting 2 overlapping labels. But this was not a problem because showkeys gave exactly what I wanted.

– j0equ1nn
Jan 23 '16 at 14:28













@j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

– David Carlisle
Jan 23 '16 at 14:29





@j0equ1nn showkeys and showlabels are designed to do exactly the same thing, just using slightly different code, loading both would be strange to say the least

– David Carlisle
Jan 23 '16 at 14:29













That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

– j0equ1nn
Jan 23 '16 at 14:31





That makes sense, though for some reason in my case the labels shown by showlabels is a proper subset of the labels shown by showkeys. This probably has to do with the other packages I used, which I failed to include. Nonetheless this does the trick!

– j0equ1nn
Jan 23 '16 at 14:31













@j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

– David Carlisle
Jan 23 '16 at 14:33





@j0equ1nn but your comment made me realize I had answered with one package when you had used another. Either work I've changed the answer to show both forms.

– David Carlisle
Jan 23 '16 at 14:33













Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

– j0equ1nn
Jan 23 '16 at 14:46





Weird.. Well, although switching to showkeys resolved my issue, for the benefit of others let me try to find a minimal example of the issue I experienced and I will edit the question to include it.

– j0equ1nn
Jan 23 '16 at 14:46


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f289038%2fhow-do-i-show-the-labels-of-theorems-definitions-etc%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...