How to enumerate figures in sync with another counter? Announcing the arrival of Valued...
What is this single-engine low-wing propeller plane?
Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?
Does accepting a pardon have any bearing on trying that person for the same crime in a sovereign jurisdiction?
Is the Standard Deduction better than Itemized when both are the same amount?
When is phishing education going too far?
Is there a documented rationale why the House Ways and Means chairman can demand tax info?
Is there a "higher Segal conjecture"?
How do I mention the quality of my school without bragging
Why are there no cargo aircraft with "flying wing" design?
Using et al. for a last / senior author rather than for a first author
Super Attribute Position on Product Page Magento 1
What do you call a phrase that's not an idiom yet?
How to recreate this effect in Photoshop?
Gastric acid as a weapon
Single word antonym of "flightless"
Is the address of a local variable a constexpr?
When to stop saving and start investing?
Are my PIs rude or am I just being too sensitive?
What LEGO pieces have "real-world" functionality?
Check which numbers satisfy the condition [A*B*C = A! + B! + C!]
What's the difference between `auto x = vector<int>()` and `vector<int> x`?
Why aren't air breathing engines used as small first stages
3 doors, three guards, one stone
What happens to sewage if there is no river near by?
How to enumerate figures in sync with another counter?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Numbering figuresCustom enumeration for axioms or hypothesisEnumeration in theorem environmentHow to create in-paragraph enumerations in ConTeXt?How to customize enumeration to implement Brazilian law texts?Nested enumeration with enumitem packageCreate an enumerate environment that can be turned offNo new line for theorem in enumerateInconsistent margins with non-standard enumerationCannot specify enumeration label in Frontiers styleTOC-like list where the entries come from an enumeration
I when I create a command for (for example) the examples in my article, I do it in this way:
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
So the enumeration is consecuent to what I have done with the theorems and other things, but the figures do their own enumeration, how can I change that in the same way of the examples? Thanks
floats enumerate
add a comment |
I when I create a command for (for example) the examples in my article, I do it in this way:
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
So the enumeration is consecuent to what I have done with the theorems and other things, but the figures do their own enumeration, how can I change that in the same way of the examples? Thanks
floats enumerate
We can see that Theorem and Example are "numbering-friends" - they have the same counter. But Figure will have the same counter with what?
– JouleV
2 hours ago
Exactly, for example, if there is a figure between theorem 2.3, and example 2.4, I want them to be, theorem 2.3, figure 2.4, and example 2.5
– J.Rodriguez
1 hour ago
Did you see this answer to the query Numbering figures?
– Mico
48 mins ago
add a comment |
I when I create a command for (for example) the examples in my article, I do it in this way:
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
So the enumeration is consecuent to what I have done with the theorems and other things, but the figures do their own enumeration, how can I change that in the same way of the examples? Thanks
floats enumerate
I when I create a command for (for example) the examples in my article, I do it in this way:
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
So the enumeration is consecuent to what I have done with the theorems and other things, but the figures do their own enumeration, how can I change that in the same way of the examples? Thanks
floats enumerate
floats enumerate
edited 3 mins ago
Mico
287k32391780
287k32391780
asked 2 hours ago
J.RodriguezJ.Rodriguez
2185
2185
We can see that Theorem and Example are "numbering-friends" - they have the same counter. But Figure will have the same counter with what?
– JouleV
2 hours ago
Exactly, for example, if there is a figure between theorem 2.3, and example 2.4, I want them to be, theorem 2.3, figure 2.4, and example 2.5
– J.Rodriguez
1 hour ago
Did you see this answer to the query Numbering figures?
– Mico
48 mins ago
add a comment |
We can see that Theorem and Example are "numbering-friends" - they have the same counter. But Figure will have the same counter with what?
– JouleV
2 hours ago
Exactly, for example, if there is a figure between theorem 2.3, and example 2.4, I want them to be, theorem 2.3, figure 2.4, and example 2.5
– J.Rodriguez
1 hour ago
Did you see this answer to the query Numbering figures?
– Mico
48 mins ago
We can see that Theorem and Example are "numbering-friends" - they have the same counter. But Figure will have the same counter with what?
– JouleV
2 hours ago
We can see that Theorem and Example are "numbering-friends" - they have the same counter. But Figure will have the same counter with what?
– JouleV
2 hours ago
Exactly, for example, if there is a figure between theorem 2.3, and example 2.4, I want them to be, theorem 2.3, figure 2.4, and example 2.5
– J.Rodriguez
1 hour ago
Exactly, for example, if there is a figure between theorem 2.3, and example 2.4, I want them to be, theorem 2.3, figure 2.4, and example 2.5
– J.Rodriguez
1 hour ago
Did you see this answer to the query Numbering figures?
– Mico
48 mins ago
Did you see this answer to the query Numbering figures?
– Mico
48 mins ago
add a comment |
2 Answers
2
active
oldest
votes
You can essentially use the same approach as in your MWE except that you use figure
to number your theorems:
numberwithin{figure}{section}% number figures inside sections
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
The numberwithin
command, which comes from amsmath
, numbers the figures in tandem with the sections. Using this approach you can get the output
using the code:
documentclass{amsart}
numberwithin{figure}{section}
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
begin{document}
section{Let the section begin}
begin{teo}The sum of two numbers is a numberlabel{T:one}end{teo}
begin{figure}[h]A figurecaption{Nice one}label{F:one}end{figure}
begin{ex}For example, $1+2=3$.label{E:one}end{ex}
See ref{T:one}, ref{F:one} and ref{E:one}.
end{document}
add a comment |
Here's a solution that employs the xassoccnt package to couple the teo
and figure
counters.
documentclass{report}
usepackage{amsthm}
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
usepackage{xassoccnt}
DeclareCoupledCounters[name=figurteo]{figure,teo}
renewcommandthefigure{thesection.arabic{figure}}
% just to allow 4 floats on a page:
setcounter{totalnumber}{4}
setcounter{topnumber}{4}
begin{document}
% just for this example
setcounter{chapter}{2}
setcounter{section}{3}
begin{teo}In the beginning, dots end{teo}
begin{teo}After a while, dotsend{teo}
begin{figure}[ht]caption{Fee}end{figure}
begin{figure}[ht]caption{Fi}end{figure}
begin{figure}[ht]caption{Fo}end{figure}
begin{figure}[ht]caption{Fum}end{figure}
begin{ex}And then, dotsend{ex}
begin{ex}Finally, dotsend{ex}
end{document}
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%2f485068%2fhow-to-enumerate-figures-in-sync-with-another-counter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can essentially use the same approach as in your MWE except that you use figure
to number your theorems:
numberwithin{figure}{section}% number figures inside sections
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
The numberwithin
command, which comes from amsmath
, numbers the figures in tandem with the sections. Using this approach you can get the output
using the code:
documentclass{amsart}
numberwithin{figure}{section}
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
begin{document}
section{Let the section begin}
begin{teo}The sum of two numbers is a numberlabel{T:one}end{teo}
begin{figure}[h]A figurecaption{Nice one}label{F:one}end{figure}
begin{ex}For example, $1+2=3$.label{E:one}end{ex}
See ref{T:one}, ref{F:one} and ref{E:one}.
end{document}
add a comment |
You can essentially use the same approach as in your MWE except that you use figure
to number your theorems:
numberwithin{figure}{section}% number figures inside sections
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
The numberwithin
command, which comes from amsmath
, numbers the figures in tandem with the sections. Using this approach you can get the output
using the code:
documentclass{amsart}
numberwithin{figure}{section}
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
begin{document}
section{Let the section begin}
begin{teo}The sum of two numbers is a numberlabel{T:one}end{teo}
begin{figure}[h]A figurecaption{Nice one}label{F:one}end{figure}
begin{ex}For example, $1+2=3$.label{E:one}end{ex}
See ref{T:one}, ref{F:one} and ref{E:one}.
end{document}
add a comment |
You can essentially use the same approach as in your MWE except that you use figure
to number your theorems:
numberwithin{figure}{section}% number figures inside sections
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
The numberwithin
command, which comes from amsmath
, numbers the figures in tandem with the sections. Using this approach you can get the output
using the code:
documentclass{amsart}
numberwithin{figure}{section}
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
begin{document}
section{Let the section begin}
begin{teo}The sum of two numbers is a numberlabel{T:one}end{teo}
begin{figure}[h]A figurecaption{Nice one}label{F:one}end{figure}
begin{ex}For example, $1+2=3$.label{E:one}end{ex}
See ref{T:one}, ref{F:one} and ref{E:one}.
end{document}
You can essentially use the same approach as in your MWE except that you use figure
to number your theorems:
numberwithin{figure}{section}% number figures inside sections
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
The numberwithin
command, which comes from amsmath
, numbers the figures in tandem with the sections. Using this approach you can get the output
using the code:
documentclass{amsart}
numberwithin{figure}{section}
newtheorem{teo}[figure]{Theorem}
newtheorem{ex}[figure]{Example}
begin{document}
section{Let the section begin}
begin{teo}The sum of two numbers is a numberlabel{T:one}end{teo}
begin{figure}[h]A figurecaption{Nice one}label{F:one}end{figure}
begin{ex}For example, $1+2=3$.label{E:one}end{ex}
See ref{T:one}, ref{F:one} and ref{E:one}.
end{document}
edited 33 mins ago
answered 41 mins ago
AndrewAndrew
31k34482
31k34482
add a comment |
add a comment |
Here's a solution that employs the xassoccnt package to couple the teo
and figure
counters.
documentclass{report}
usepackage{amsthm}
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
usepackage{xassoccnt}
DeclareCoupledCounters[name=figurteo]{figure,teo}
renewcommandthefigure{thesection.arabic{figure}}
% just to allow 4 floats on a page:
setcounter{totalnumber}{4}
setcounter{topnumber}{4}
begin{document}
% just for this example
setcounter{chapter}{2}
setcounter{section}{3}
begin{teo}In the beginning, dots end{teo}
begin{teo}After a while, dotsend{teo}
begin{figure}[ht]caption{Fee}end{figure}
begin{figure}[ht]caption{Fi}end{figure}
begin{figure}[ht]caption{Fo}end{figure}
begin{figure}[ht]caption{Fum}end{figure}
begin{ex}And then, dotsend{ex}
begin{ex}Finally, dotsend{ex}
end{document}
add a comment |
Here's a solution that employs the xassoccnt package to couple the teo
and figure
counters.
documentclass{report}
usepackage{amsthm}
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
usepackage{xassoccnt}
DeclareCoupledCounters[name=figurteo]{figure,teo}
renewcommandthefigure{thesection.arabic{figure}}
% just to allow 4 floats on a page:
setcounter{totalnumber}{4}
setcounter{topnumber}{4}
begin{document}
% just for this example
setcounter{chapter}{2}
setcounter{section}{3}
begin{teo}In the beginning, dots end{teo}
begin{teo}After a while, dotsend{teo}
begin{figure}[ht]caption{Fee}end{figure}
begin{figure}[ht]caption{Fi}end{figure}
begin{figure}[ht]caption{Fo}end{figure}
begin{figure}[ht]caption{Fum}end{figure}
begin{ex}And then, dotsend{ex}
begin{ex}Finally, dotsend{ex}
end{document}
add a comment |
Here's a solution that employs the xassoccnt package to couple the teo
and figure
counters.
documentclass{report}
usepackage{amsthm}
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
usepackage{xassoccnt}
DeclareCoupledCounters[name=figurteo]{figure,teo}
renewcommandthefigure{thesection.arabic{figure}}
% just to allow 4 floats on a page:
setcounter{totalnumber}{4}
setcounter{topnumber}{4}
begin{document}
% just for this example
setcounter{chapter}{2}
setcounter{section}{3}
begin{teo}In the beginning, dots end{teo}
begin{teo}After a while, dotsend{teo}
begin{figure}[ht]caption{Fee}end{figure}
begin{figure}[ht]caption{Fi}end{figure}
begin{figure}[ht]caption{Fo}end{figure}
begin{figure}[ht]caption{Fum}end{figure}
begin{ex}And then, dotsend{ex}
begin{ex}Finally, dotsend{ex}
end{document}
Here's a solution that employs the xassoccnt package to couple the teo
and figure
counters.
documentclass{report}
usepackage{amsthm}
newtheorem{teo}{Theorem}[section]
newtheorem{ex}[teo]{Example}
usepackage{xassoccnt}
DeclareCoupledCounters[name=figurteo]{figure,teo}
renewcommandthefigure{thesection.arabic{figure}}
% just to allow 4 floats on a page:
setcounter{totalnumber}{4}
setcounter{topnumber}{4}
begin{document}
% just for this example
setcounter{chapter}{2}
setcounter{section}{3}
begin{teo}In the beginning, dots end{teo}
begin{teo}After a while, dotsend{teo}
begin{figure}[ht]caption{Fee}end{figure}
begin{figure}[ht]caption{Fi}end{figure}
begin{figure}[ht]caption{Fo}end{figure}
begin{figure}[ht]caption{Fum}end{figure}
begin{ex}And then, dotsend{ex}
begin{ex}Finally, dotsend{ex}
end{document}
answered 31 mins ago
MicoMico
287k32391780
287k32391780
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%2f485068%2fhow-to-enumerate-figures-in-sync-with-another-counter%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
We can see that Theorem and Example are "numbering-friends" - they have the same counter. But Figure will have the same counter with what?
– JouleV
2 hours ago
Exactly, for example, if there is a figure between theorem 2.3, and example 2.4, I want them to be, theorem 2.3, figure 2.4, and example 2.5
– J.Rodriguez
1 hour ago
Did you see this answer to the query Numbering figures?
– Mico
48 mins ago