Numbering figures' problem

2010-01-06 Thread Matteo A.
Hello everybody

I have a problem with lyx. when i draw a numbered figure or table, lyx works
and gives it a correct number. the same for the next figure/table. But when
i view the lyx file as PDF file and take a look to the figure and table's
numbers i notice that all the figures and tables, of a same section or
subsection, get the same number.

I mean that when i write in lyx chapter 4-section 3(for example) and put 2
tables or figures that are numbered in lyx automatically as table or figure
6 and table or figure 7, then when i update the PDF, i notice that the 2
tables or figures get the same number like table 4.3 and not table 4.3.1
and table 4.3.2 or whatever is the correct number. i cannot understand the
reason. can anyone help me?? it is very important. i am using lyx for my
Thesis.

i tried to save and close my lyx document. Then to open it again and
click View PDF (pdflatex) to get whole document compiled again but it
doesn't work..it doesn't change anything.

 i am using lyx 1.6.5 on windows vista sp 2, miktex 2.7, and Book (AMS) as
document class

Thanks in advance


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 06.01.2010 13:34, schrieb Matteo A.:


I mean that when i write in lyx chapter 4-section 3(for example) and put 2
tables or figures that are numbered in lyx automatically as table or figure
6 and table or figure 7, then when i update the PDF, i notice that the 2
tables or figures get the same number like table 4.3 and not table 4.3.1
and table 4.3.2 or whatever is the correct number.


I assume that your document class is a book class. In books figures and tables are numbered in the 
scheme

chapter.number
Within LyX the numbering might be different because every document class can define its own 
numbering scheme.


I haven't understood what exactly is the problem. Do you want the numbering 
scheme
chapter.section.number
or a numbering without the chapter number?

Can you provide a -small_ LyX example file?

regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 06.01.2010 18:44, schrieb Matteo A.:


When i get the lyx file as pdf file
with the buttons updated pdf and view pdf i notice a problem. Each
figure in chapter one comes out as figure 1.1, each figure in chapter 2
comes out as figure 2.1. so i can't distinguish them by number.


Then you have a wrong setting in your document preamble or something similar. I'll have a look if 
you provide a LyX testfile.


regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 07.01.2010 00:15, schrieb Matteo A.:


this is all i have in my preable:

\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}

\renewcommand{\thetable}{\thechapter.\arabic{subsection}}


That's the bug. You redefined the table number to be the number of the subsection. So you overwrite 
the number by

chapter.subsection
and this number is independent of the table number.

Independent of this, you should better use the command \numberwithin to change the numbering. See 
sec. 3.3 Float Numbering of the EmbeddedObjects manual that you find in the Help menu of LyX.


 \usepackage{graphicx}

This settings is unnecessary because LyX already takes care of this.

regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 07.01.2010 00:53, schrieb Matteo A.:


so i just need to delete this line 
\renewcommand{\thetable}{\thechapter.\arabic{subsection}}


You also need to remove the other lines where you redefine the counters, like 
for figures.
When you don't like the numbering scheme of the AMS book class, use the \numberwithin command to 
change it as I wrote.


regards Uwe


Numbering figures' problem

2010-01-06 Thread Matteo A.
Hello everybody

I have a problem with lyx. when i draw a numbered figure or table, lyx works
and gives it a correct number. the same for the next figure/table. But when
i view the lyx file as PDF file and take a look to the figure and table's
numbers i notice that all the figures and tables, of a same section or
subsection, get the same number.

I mean that when i write in lyx chapter 4-section 3(for example) and put 2
tables or figures that are numbered in lyx automatically as table or figure
6 and table or figure 7, then when i update the PDF, i notice that the 2
tables or figures get the same number like table 4.3 and not table 4.3.1
and table 4.3.2 or whatever is the correct number. i cannot understand the
reason. can anyone help me?? it is very important. i am using lyx for my
Thesis.

i tried to save and close my lyx document. Then to open it again and
click View PDF (pdflatex) to get whole document compiled again but it
doesn't work..it doesn't change anything.

 i am using lyx 1.6.5 on windows vista sp 2, miktex 2.7, and Book (AMS) as
document class

Thanks in advance


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 06.01.2010 13:34, schrieb Matteo A.:


I mean that when i write in lyx chapter 4-section 3(for example) and put 2
tables or figures that are numbered in lyx automatically as table or figure
6 and table or figure 7, then when i update the PDF, i notice that the 2
tables or figures get the same number like table 4.3 and not table 4.3.1
and table 4.3.2 or whatever is the correct number.


I assume that your document class is a book class. In books figures and tables are numbered in the 
scheme

chapter.number
Within LyX the numbering might be different because every document class can define its own 
numbering scheme.


I haven't understood what exactly is the problem. Do you want the numbering 
scheme
chapter.section.number
or a numbering without the chapter number?

Can you provide a -small_ LyX example file?

regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 06.01.2010 18:44, schrieb Matteo A.:


When i get the lyx file as pdf file
with the buttons updated pdf and view pdf i notice a problem. Each
figure in chapter one comes out as figure 1.1, each figure in chapter 2
comes out as figure 2.1. so i can't distinguish them by number.


Then you have a wrong setting in your document preamble or something similar. I'll have a look if 
you provide a LyX testfile.


regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 07.01.2010 00:15, schrieb Matteo A.:


this is all i have in my preable:

\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}

\renewcommand{\thetable}{\thechapter.\arabic{subsection}}


That's the bug. You redefined the table number to be the number of the subsection. So you overwrite 
the number by

chapter.subsection
and this number is independent of the table number.

Independent of this, you should better use the command \numberwithin to change the numbering. See 
sec. 3.3 Float Numbering of the EmbeddedObjects manual that you find in the Help menu of LyX.


 \usepackage{graphicx}

This settings is unnecessary because LyX already takes care of this.

regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 07.01.2010 00:53, schrieb Matteo A.:


so i just need to delete this line 
\renewcommand{\thetable}{\thechapter.\arabic{subsection}}


You also need to remove the other lines where you redefine the counters, like 
for figures.
When you don't like the numbering scheme of the AMS book class, use the \numberwithin command to 
change it as I wrote.


regards Uwe


Numbering figures' problem

2010-01-06 Thread Matteo A.
Hello everybody

I have a problem with lyx. when i draw a numbered figure or table, lyx works
and gives it a correct number. the same for the next figure/table. But when
i view the lyx file as PDF file and take a look to the figure and table's
numbers i notice that all the figures and tables, of a same section or
subsection, get the same number.

I mean that when i write in lyx chapter 4-section 3(for example) and put 2
tables or figures that are numbered in lyx automatically as "table or figure
6" and "table or figure 7", then when i update the PDF, i notice that the 2
tables or figures get the same number like "table 4.3" and not "table 4.3.1"
and "table 4.3.2" or whatever is the correct number. i cannot understand the
reason. can anyone help me?? it is very important. i am using lyx for my
Thesis.

i tried to save and close my lyx document. Then to open it again and
click "View PDF (pdflatex)" to get whole document compiled again but it
doesn't work..it doesn't change anything.

 i am using lyx 1.6.5 on windows vista sp 2, miktex 2.7, and Book (AMS) as
document class

Thanks in advance


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 06.01.2010 13:34, schrieb Matteo A.:


I mean that when i write in lyx chapter 4-section 3(for example) and put 2
tables or figures that are numbered in lyx automatically as "table or figure
6" and "table or figure 7", then when i update the PDF, i notice that the 2
tables or figures get the same number like "table 4.3" and not "table 4.3.1"
and "table 4.3.2" or whatever is the correct number.


I assume that your document class is a book class. In books figures and tables are numbered in the 
scheme

chapter.number
Within LyX the numbering might be different because every document class can define its own 
numbering scheme.


I haven't understood what exactly is the problem. Do you want the numbering 
scheme
chapter.section.number
or a numbering without the chapter number?

Can you provide a -small_ LyX example file?

regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 06.01.2010 18:44, schrieb Matteo A.:


When i get the lyx file as pdf file
with the buttons "updated pdf" and "view pdf" i notice a problem. Each
figure in chapter one comes out as "figure 1.1", each figure in chapter 2
comes out as "figure 2.1". so i can't distinguish them by number.


Then you have a wrong setting in your document preamble or something similar. I'll have a look if 
you provide a LyX testfile.


regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 07.01.2010 00:15, schrieb Matteo A.:


this is all i have in my preable:

\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}

\renewcommand{\thetable}{\thechapter.\arabic{subsection}}


That's the bug. You redefined the table number to be the number of the subsection. So you overwrite 
the number by

chapter.subsection
and this number is independent of the table number.

Independent of this, you should better use the command \numberwithin to change the numbering. See 
sec. 3.3 "Float Numbering" of the EmbeddedObjects manual that you find in the Help menu of LyX.


> \usepackage{graphicx}

This settings is unnecessary because LyX already takes care of this.

regards Uwe


Re: Numbering figures' problem

2010-01-06 Thread Uwe Stöhr

Am 07.01.2010 00:53, schrieb Matteo A.:


so i just need to delete this line 
\renewcommand{\thetable}{\thechapter.\arabic{subsection}}


You also need to remove the other lines where you redefine the counters, like 
for figures.
When you don't like the numbering scheme of the AMS book class, use the \numberwithin command to 
change it as I wrote.


regards Uwe