Number of figure by chapter
up vote
4
down vote
favorite
I need number of figure by chapter:
I'm using this but sometimes it repeats the numeration
usepackage{chngcntr}
counterwithin{figure}{chapter}
counterwithin{table}{chapter}
example:
chapter1
figure 1.1
figure 1.2
figure 1.3
chapter2
figure 2.1
section 2.1
figure 2.2
figure 2.3
chapter3
figure 3.1
figure 3.2
section 3.1
figure 3.3
example:
documentclass{report}
usepackage{float}
usepackage{chngcntr}
counterwithin{figure}{section}
begin{document}
chapter{}
section{section 1.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{section 1.2}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
chapter{}
section{section 2.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
this is the screeshot:
numbering
add a comment |
up vote
4
down vote
favorite
I need number of figure by chapter:
I'm using this but sometimes it repeats the numeration
usepackage{chngcntr}
counterwithin{figure}{chapter}
counterwithin{table}{chapter}
example:
chapter1
figure 1.1
figure 1.2
figure 1.3
chapter2
figure 2.1
section 2.1
figure 2.2
figure 2.3
chapter3
figure 3.1
figure 3.2
section 3.1
figure 3.3
example:
documentclass{report}
usepackage{float}
usepackage{chngcntr}
counterwithin{figure}{section}
begin{document}
chapter{}
section{section 1.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{section 1.2}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
chapter{}
section{section 2.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
this is the screeshot:
numbering
3
Please add a minimal working example (MWE) of which replicates your problem.
– CarLaTeX
Nov 17 at 5:32
1
Plus from your example it is not obvious that any counter gets repeated. According to what I see, each figure counter is unique, and so is each section counter.
– marmot
Nov 17 at 5:35
If you want chapters why not use report class? Then all you're expecting will be fixed...
– santimirandarp
Nov 17 at 5:48
@santimirandarp I am new to latex, please help me
– x-rw
Nov 17 at 5:49
@santimirandarp i edited my question, it still does not work
– x-rw
Nov 17 at 6:00
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I need number of figure by chapter:
I'm using this but sometimes it repeats the numeration
usepackage{chngcntr}
counterwithin{figure}{chapter}
counterwithin{table}{chapter}
example:
chapter1
figure 1.1
figure 1.2
figure 1.3
chapter2
figure 2.1
section 2.1
figure 2.2
figure 2.3
chapter3
figure 3.1
figure 3.2
section 3.1
figure 3.3
example:
documentclass{report}
usepackage{float}
usepackage{chngcntr}
counterwithin{figure}{section}
begin{document}
chapter{}
section{section 1.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{section 1.2}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
chapter{}
section{section 2.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
this is the screeshot:
numbering
I need number of figure by chapter:
I'm using this but sometimes it repeats the numeration
usepackage{chngcntr}
counterwithin{figure}{chapter}
counterwithin{table}{chapter}
example:
chapter1
figure 1.1
figure 1.2
figure 1.3
chapter2
figure 2.1
section 2.1
figure 2.2
figure 2.3
chapter3
figure 3.1
figure 3.2
section 3.1
figure 3.3
example:
documentclass{report}
usepackage{float}
usepackage{chngcntr}
counterwithin{figure}{section}
begin{document}
chapter{}
section{section 1.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{section 1.2}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
chapter{}
section{section 2.1}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
this is the screeshot:
numbering
numbering
edited Nov 17 at 5:59
asked Nov 17 at 5:28
x-rw
28717
28717
3
Please add a minimal working example (MWE) of which replicates your problem.
– CarLaTeX
Nov 17 at 5:32
1
Plus from your example it is not obvious that any counter gets repeated. According to what I see, each figure counter is unique, and so is each section counter.
– marmot
Nov 17 at 5:35
If you want chapters why not use report class? Then all you're expecting will be fixed...
– santimirandarp
Nov 17 at 5:48
@santimirandarp I am new to latex, please help me
– x-rw
Nov 17 at 5:49
@santimirandarp i edited my question, it still does not work
– x-rw
Nov 17 at 6:00
add a comment |
3
Please add a minimal working example (MWE) of which replicates your problem.
– CarLaTeX
Nov 17 at 5:32
1
Plus from your example it is not obvious that any counter gets repeated. According to what I see, each figure counter is unique, and so is each section counter.
– marmot
Nov 17 at 5:35
If you want chapters why not use report class? Then all you're expecting will be fixed...
– santimirandarp
Nov 17 at 5:48
@santimirandarp I am new to latex, please help me
– x-rw
Nov 17 at 5:49
@santimirandarp i edited my question, it still does not work
– x-rw
Nov 17 at 6:00
3
3
Please add a minimal working example (MWE) of which replicates your problem.
– CarLaTeX
Nov 17 at 5:32
Please add a minimal working example (MWE) of which replicates your problem.
– CarLaTeX
Nov 17 at 5:32
1
1
Plus from your example it is not obvious that any counter gets repeated. According to what I see, each figure counter is unique, and so is each section counter.
– marmot
Nov 17 at 5:35
Plus from your example it is not obvious that any counter gets repeated. According to what I see, each figure counter is unique, and so is each section counter.
– marmot
Nov 17 at 5:35
If you want chapters why not use report class? Then all you're expecting will be fixed...
– santimirandarp
Nov 17 at 5:48
If you want chapters why not use report class? Then all you're expecting will be fixed...
– santimirandarp
Nov 17 at 5:48
@santimirandarp I am new to latex, please help me
– x-rw
Nov 17 at 5:49
@santimirandarp I am new to latex, please help me
– x-rw
Nov 17 at 5:49
@santimirandarp i edited my question, it still does not work
– x-rw
Nov 17 at 6:00
@santimirandarp i edited my question, it still does not work
– x-rw
Nov 17 at 6:00
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
- Use
report
class when chapters are needed. - Remove some packages (not needed to get the output).
Do not include numbers in section and chapters (those are created automatically by latex)
documentclass{report}
usepackage{float}
begin{document}
chapter{ } %if you want a name write it as chapter{name}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{ }
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
Glad to know it. @x-rw removeusepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument ofsection{}
. Also, use reportclass when you need chapters.
– santimirandarp
Nov 17 at 6:07
1
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
- Use
report
class when chapters are needed. - Remove some packages (not needed to get the output).
Do not include numbers in section and chapters (those are created automatically by latex)
documentclass{report}
usepackage{float}
begin{document}
chapter{ } %if you want a name write it as chapter{name}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{ }
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
Glad to know it. @x-rw removeusepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument ofsection{}
. Also, use reportclass when you need chapters.
– santimirandarp
Nov 17 at 6:07
1
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
add a comment |
up vote
3
down vote
accepted
- Use
report
class when chapters are needed. - Remove some packages (not needed to get the output).
Do not include numbers in section and chapters (those are created automatically by latex)
documentclass{report}
usepackage{float}
begin{document}
chapter{ } %if you want a name write it as chapter{name}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{ }
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
Glad to know it. @x-rw removeusepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument ofsection{}
. Also, use reportclass when you need chapters.
– santimirandarp
Nov 17 at 6:07
1
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
- Use
report
class when chapters are needed. - Remove some packages (not needed to get the output).
Do not include numbers in section and chapters (those are created automatically by latex)
documentclass{report}
usepackage{float}
begin{document}
chapter{ } %if you want a name write it as chapter{name}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{ }
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
- Use
report
class when chapters are needed. - Remove some packages (not needed to get the output).
Do not include numbers in section and chapters (those are created automatically by latex)
documentclass{report}
usepackage{float}
begin{document}
chapter{ } %if you want a name write it as chapter{name}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{}
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
section{ }
begin{figure}[H]
centering
rule{1cm}{1cm}% placeholder for graphic
caption{A figure}
end{figure}
end{document}
edited Nov 17 at 6:12
answered Nov 17 at 6:04
santimirandarp
1,4203722
1,4203722
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
Glad to know it. @x-rw removeusepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument ofsection{}
. Also, use reportclass when you need chapters.
– santimirandarp
Nov 17 at 6:07
1
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
add a comment |
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
Glad to know it. @x-rw removeusepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument ofsection{}
. Also, use reportclass when you need chapters.
– santimirandarp
Nov 17 at 6:07
1
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
yes, this result is good, what is the secret?
– x-rw
Nov 17 at 6:07
Glad to know it. @x-rw remove
usepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument of section{}
. Also, use reportclass when you need chapters.– santimirandarp
Nov 17 at 6:07
Glad to know it. @x-rw remove
usepackage{chngcntr}
counterwithin{figure}{section}
and modify the argument of section{}
. Also, use reportclass when you need chapters.– santimirandarp
Nov 17 at 6:07
1
1
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
muchas gracias, su respuesta me ayudo a aprender algo nuevo (la clase report), i am user with language native spanish
– x-rw
Nov 17 at 6:19
add a comment |
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%2f460406%2fnumber-of-figure-by-chapter%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
3
Please add a minimal working example (MWE) of which replicates your problem.
– CarLaTeX
Nov 17 at 5:32
1
Plus from your example it is not obvious that any counter gets repeated. According to what I see, each figure counter is unique, and so is each section counter.
– marmot
Nov 17 at 5:35
If you want chapters why not use report class? Then all you're expecting will be fixed...
– santimirandarp
Nov 17 at 5:48
@santimirandarp I am new to latex, please help me
– x-rw
Nov 17 at 5:49
@santimirandarp i edited my question, it still does not work
– x-rw
Nov 17 at 6:00