A Good Strategy for Labeling Sections, Equations, Figures or Tables
We usually use label for a section, equation, figure or table so that we can refer to it in the sequel of the text. I usually use a systematic way for labeling my environments for example
label{sec:12}label{eq:1}label{fig:3}label{tab:7}
However, when the text becomes long and longer remembering those numbers will be difficult. Specially, when I displace some texts in the editor then the order of the numbering of labels is ruined and it is really annoying. So here are my questions
- Is there a better strategy for labeling?
- Is it possible to create an automatic labeling system for an environment?
cross-referencing
add a comment |
We usually use label for a section, equation, figure or table so that we can refer to it in the sequel of the text. I usually use a systematic way for labeling my environments for example
label{sec:12}label{eq:1}label{fig:3}label{tab:7}
However, when the text becomes long and longer remembering those numbers will be difficult. Specially, when I displace some texts in the editor then the order of the numbering of labels is ruined and it is really annoying. So here are my questions
- Is there a better strategy for labeling?
- Is it possible to create an automatic labeling system for an environment?
cross-referencing
4
best strategy is never to use numbers in labels.
– David Carlisle
Dec 1 '16 at 22:31
@DavidCarlisle I use counters, but that is probably a bit of a special use case. (Usually, I don't use numbers.)
– cfr
Dec 1 '16 at 22:54
@cfr: Would you please give us an example with the counters. :)
– H. R.
Dec 1 '16 at 22:59
@cfr: That would be really nice if you write an answer about the usage of counters and making a comparison with descriptive naming. :)
– H. R.
Dec 1 '16 at 23:00
I don't think it would be helpful. It is rather a niche use-case. In my case, the counters merely ensure uniqueness for LaTeX's purposes. I don't need uniqueness for human purposes. If LaTeX didn't want globally unique labels, I wouldn't need the counters at all.
– cfr
Dec 1 '16 at 23:28
add a comment |
We usually use label for a section, equation, figure or table so that we can refer to it in the sequel of the text. I usually use a systematic way for labeling my environments for example
label{sec:12}label{eq:1}label{fig:3}label{tab:7}
However, when the text becomes long and longer remembering those numbers will be difficult. Specially, when I displace some texts in the editor then the order of the numbering of labels is ruined and it is really annoying. So here are my questions
- Is there a better strategy for labeling?
- Is it possible to create an automatic labeling system for an environment?
cross-referencing
We usually use label for a section, equation, figure or table so that we can refer to it in the sequel of the text. I usually use a systematic way for labeling my environments for example
label{sec:12}label{eq:1}label{fig:3}label{tab:7}
However, when the text becomes long and longer remembering those numbers will be difficult. Specially, when I displace some texts in the editor then the order of the numbering of labels is ruined and it is really annoying. So here are my questions
- Is there a better strategy for labeling?
- Is it possible to create an automatic labeling system for an environment?
cross-referencing
cross-referencing
edited Jan 1 at 20:59
Christian Hupfer
148k14193390
148k14193390
asked Dec 1 '16 at 21:59
H. R.H. R.
431412
431412
4
best strategy is never to use numbers in labels.
– David Carlisle
Dec 1 '16 at 22:31
@DavidCarlisle I use counters, but that is probably a bit of a special use case. (Usually, I don't use numbers.)
– cfr
Dec 1 '16 at 22:54
@cfr: Would you please give us an example with the counters. :)
– H. R.
Dec 1 '16 at 22:59
@cfr: That would be really nice if you write an answer about the usage of counters and making a comparison with descriptive naming. :)
– H. R.
Dec 1 '16 at 23:00
I don't think it would be helpful. It is rather a niche use-case. In my case, the counters merely ensure uniqueness for LaTeX's purposes. I don't need uniqueness for human purposes. If LaTeX didn't want globally unique labels, I wouldn't need the counters at all.
– cfr
Dec 1 '16 at 23:28
add a comment |
4
best strategy is never to use numbers in labels.
– David Carlisle
Dec 1 '16 at 22:31
@DavidCarlisle I use counters, but that is probably a bit of a special use case. (Usually, I don't use numbers.)
– cfr
Dec 1 '16 at 22:54
@cfr: Would you please give us an example with the counters. :)
– H. R.
Dec 1 '16 at 22:59
@cfr: That would be really nice if you write an answer about the usage of counters and making a comparison with descriptive naming. :)
– H. R.
Dec 1 '16 at 23:00
I don't think it would be helpful. It is rather a niche use-case. In my case, the counters merely ensure uniqueness for LaTeX's purposes. I don't need uniqueness for human purposes. If LaTeX didn't want globally unique labels, I wouldn't need the counters at all.
– cfr
Dec 1 '16 at 23:28
4
4
best strategy is never to use numbers in labels.
– David Carlisle
Dec 1 '16 at 22:31
best strategy is never to use numbers in labels.
– David Carlisle
Dec 1 '16 at 22:31
@DavidCarlisle I use counters, but that is probably a bit of a special use case. (Usually, I don't use numbers.)
– cfr
Dec 1 '16 at 22:54
@DavidCarlisle I use counters, but that is probably a bit of a special use case. (Usually, I don't use numbers.)
– cfr
Dec 1 '16 at 22:54
@cfr: Would you please give us an example with the counters. :)
– H. R.
Dec 1 '16 at 22:59
@cfr: Would you please give us an example with the counters. :)
– H. R.
Dec 1 '16 at 22:59
@cfr: That would be really nice if you write an answer about the usage of counters and making a comparison with descriptive naming. :)
– H. R.
Dec 1 '16 at 23:00
@cfr: That would be really nice if you write an answer about the usage of counters and making a comparison with descriptive naming. :)
– H. R.
Dec 1 '16 at 23:00
I don't think it would be helpful. It is rather a niche use-case. In my case, the counters merely ensure uniqueness for LaTeX's purposes. I don't need uniqueness for human purposes. If LaTeX didn't want globally unique labels, I wouldn't need the counters at all.
– cfr
Dec 1 '16 at 23:28
I don't think it would be helpful. It is rather a niche use-case. In my case, the counters merely ensure uniqueness for LaTeX's purposes. I don't need uniqueness for human purposes. If LaTeX didn't want globally unique labels, I wouldn't need the counters at all.
– cfr
Dec 1 '16 at 23:28
add a comment |
1 Answer
1
active
oldest
votes
Usually you should give labels that reflect the content or purpose of the thing you are labeling. So for instance, instead of label{eq:1}, say label{eq:functional_equation} or label{eq:what_this_equation_does}. The whole point of labels rather than just writing the equation number directly into the document is that you might later add more equations before the current one, which shifts all of the equation numbers forward by one. Then you'll have an equation numbered 2 that you will have to refer to by ref{eq:1}, which would be unfortunate.
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
4
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
3
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.fig:grph:whateverorfig:photo:whateverorfig:photo:person:whatever. Whatever makes sense.
– cfr
Dec 1 '16 at 22:56
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
|
show 2 more comments
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%2f341948%2fa-good-strategy-for-labeling-sections-equations-figures-or-tables%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
Usually you should give labels that reflect the content or purpose of the thing you are labeling. So for instance, instead of label{eq:1}, say label{eq:functional_equation} or label{eq:what_this_equation_does}. The whole point of labels rather than just writing the equation number directly into the document is that you might later add more equations before the current one, which shifts all of the equation numbers forward by one. Then you'll have an equation numbered 2 that you will have to refer to by ref{eq:1}, which would be unfortunate.
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
4
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
3
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.fig:grph:whateverorfig:photo:whateverorfig:photo:person:whatever. Whatever makes sense.
– cfr
Dec 1 '16 at 22:56
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
|
show 2 more comments
Usually you should give labels that reflect the content or purpose of the thing you are labeling. So for instance, instead of label{eq:1}, say label{eq:functional_equation} or label{eq:what_this_equation_does}. The whole point of labels rather than just writing the equation number directly into the document is that you might later add more equations before the current one, which shifts all of the equation numbers forward by one. Then you'll have an equation numbered 2 that you will have to refer to by ref{eq:1}, which would be unfortunate.
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
4
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
3
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.fig:grph:whateverorfig:photo:whateverorfig:photo:person:whatever. Whatever makes sense.
– cfr
Dec 1 '16 at 22:56
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
|
show 2 more comments
Usually you should give labels that reflect the content or purpose of the thing you are labeling. So for instance, instead of label{eq:1}, say label{eq:functional_equation} or label{eq:what_this_equation_does}. The whole point of labels rather than just writing the equation number directly into the document is that you might later add more equations before the current one, which shifts all of the equation numbers forward by one. Then you'll have an equation numbered 2 that you will have to refer to by ref{eq:1}, which would be unfortunate.
Usually you should give labels that reflect the content or purpose of the thing you are labeling. So for instance, instead of label{eq:1}, say label{eq:functional_equation} or label{eq:what_this_equation_does}. The whole point of labels rather than just writing the equation number directly into the document is that you might later add more equations before the current one, which shifts all of the equation numbers forward by one. Then you'll have an equation numbered 2 that you will have to refer to by ref{eq:1}, which would be unfortunate.
answered Dec 1 '16 at 22:10
Hood ChathamHood Chatham
4,1891428
4,1891428
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
4
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
3
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.fig:grph:whateverorfig:photo:whateverorfig:photo:person:whatever. Whatever makes sense.
– cfr
Dec 1 '16 at 22:56
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
|
show 2 more comments
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
4
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
3
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.fig:grph:whateverorfig:photo:whateverorfig:photo:person:whatever. Whatever makes sense.
– cfr
Dec 1 '16 at 22:56
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
(+1) Thanks for your attention. I mentioned the issue you said in my question, however, finding descriptive names for large number of equations is not that much easy! :)
– H. R.
Dec 1 '16 at 22:23
4
4
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@H.R. you only need to label an equation when you reference it and it's usually easy enough to think of an internal label name at that point.
– David Carlisle
Dec 1 '16 at 22:32
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
@DavidCarlisle: Thanks for the advice David. :) So you suggest using descriptive names!? There are lots of figures, tables, equations and sections! :) Anyway, you are the man of experience and I will take it. :)
– H. R.
Dec 1 '16 at 22:45
3
3
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.
fig:grph:whatever or fig:photo:whatever or fig:photo:person:whatever. Whatever makes sense.– cfr
Dec 1 '16 at 22:56
@H.R. There is no reason you can't divide each kind into sub-kinds e.g.
fig:grph:whatever or fig:photo:whatever or fig:photo:person:whatever. Whatever makes sense.– cfr
Dec 1 '16 at 22:56
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
@cfr: Thanks for the suggestion. :)
– H. R.
Dec 1 '16 at 22:58
|
show 2 more comments
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f341948%2fa-good-strategy-for-labeling-sections-equations-figures-or-tables%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
4
best strategy is never to use numbers in labels.
– David Carlisle
Dec 1 '16 at 22:31
@DavidCarlisle I use counters, but that is probably a bit of a special use case. (Usually, I don't use numbers.)
– cfr
Dec 1 '16 at 22:54
@cfr: Would you please give us an example with the counters. :)
– H. R.
Dec 1 '16 at 22:59
@cfr: That would be really nice if you write an answer about the usage of counters and making a comparison with descriptive naming. :)
– H. R.
Dec 1 '16 at 23:00
I don't think it would be helpful. It is rather a niche use-case. In my case, the counters merely ensure uniqueness for LaTeX's purposes. I don't need uniqueness for human purposes. If LaTeX didn't want globally unique labels, I wouldn't need the counters at all.
– cfr
Dec 1 '16 at 23:28