* add modules to do equation/figure/table numbering sectionwise.

Use these modules in the AMS classes (instead of preamble hardcoding).

This is bug 6123.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31475 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-09-28 11:06:53 +00:00
parent eb065995b1
commit 5695850a49
5 changed files with 55 additions and 9 deletions

View File

@ -8,6 +8,7 @@
# modified and modularized by Emmanuel GUREGHIAN <gureghia@boston.bertin.fr>
# Tinkered with Sep. '07 by Paul Rubin <rubin@msu.edu>
# Modularized Jan '08 by Richard Heck <rgheck@brown.edu>
# Moved "number within sections" to modules Aug '09 (Paul Rubin <rubin@msu.edu>)
Format 11
Columns 1
@ -20,6 +21,8 @@ ClassOptions
End
DefaultModule theorems-ams
DefaultModule eqs-within-sections
DefaultModule figs-within-sections
Style Standard
Category MainText
@ -33,13 +36,6 @@ Style Standard
LabelType No_Label
End
Preamble
\numberwithin{equation}{section} %% Comment out for sequentially-numbered
\numberwithin{figure}{section} %% Comment out for sequentially-numbered
EndPreamble
Input stdfloats.inc
Input stdcounters.inc
Input stdinsets.inc

View File

@ -8,6 +8,7 @@
# modified and modularized by Emmanuel GUREGHIAN <gureghia@boston.bertin.fr>
# Tinkered with Sep. '07 by Paul Rubin <rubin@msu.edu>
# Modularized Jan '08 by Richard Heck <rgheck@brown.edu>
# Moved "number within sections" to modules Aug '09 (Paul Rubin <rubin@msu.edu>)
Format 11
@ -21,6 +22,8 @@ ClassOptions
End
DefaultModule theorems-ams
DefaultModule eqs-within-sections
DefaultModule figs-within-sections
Style Standard
Category MainText
@ -37,8 +40,6 @@ End
Preamble
\numberwithin{section}{chapter}
\numberwithin{equation}{section} %% Comment out for sequentially-numbered
\numberwithin{figure}{section} %% Comment out for sequentially-numbered
EndPreamble

View File

@ -0,0 +1,13 @@
#\DeclareLyXModule{Number Equations by Section}
#DescriptionBegin
#Resets the equation number at section start and prepends
#the section number to the equation number, as in '(2.1)'.
#DescriptionEnd
Format 11
Requires amsmath
AddToPreamble
\numberwithin{equation}{section}
EndPreamble

View File

@ -0,0 +1,18 @@
#\DeclareLyXModule{Number Figures by Section}
#DescriptionBegin
#Resets the figure number at section start and prepends
#the section number to the figure number, as in 'fig. 2.1'.
#DescriptionEnd
Format 11
Requires amsmath
AddToPreamble
\numberwithin{figure}{section}
EndPreamble
Float
Type figure
NumberWithin section
End

View File

@ -0,0 +1,18 @@
#\DeclareLyXModule{Number Tables by Section}
#DescriptionBegin
#Resets the table number at section start and prepends
#the section number to the table number, as in 'Table 2.1'.
#DescriptionEnd
Format 11
Requires amsmath
AddToPreamble
\numberwithin{table}{section}
EndPreamble
Float
Type figure
NumberWithin section
End