Text FormattingHow can I change teh numbers assigned to equations

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

How can I change teh numbers assigned to equations

Post by bazman »

Hi,

There I would like to change the equation numbers in the example below to be 2.1 and 2.2 respectively how can I do this?

carrently they come up as 1 and 2?

Code: Select all

\documentclass{article} % Your input file must contain these two lines
\usepackage{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\begin{document} % plus the \end{document} command at the end
\parskip = 1pc %change spacing between paragraphs
\parindent = 0pc %change paragraph indentation
\section{Introduction}

\section{LMM} % This command makes a section title.
Following the presentation in Rebonato \nocite{*}.
A discrete set of default-free discount bonds are assumed to trade in the economy $P_t^i$. Spanning forward rates are denoted by.

\begin{equation}
f(t,T_i,T_{i+1}) = f_i^t \qquad i=1,2,...,N \\
\end{equation} 

\begin{equation}
f(t,T_i,T_{i+1}) = f_i^t \qquad i=1,2,...,N \\
\end{equation} 

 \emph{this is emphasized}.
Bold text is typed like this: \textbf{this is bold}.
\subsection{A Warning or Two} % This command makes a subsection title.
If you get too much space after a mid-sentence period---abbreviations
like etc.\ are the common culprits)---then type a backslash followed by
a space after the period, as in this sentence.
Remember, don't type the 10 special characters (such as dollar sign and
backslash) except as directed! The following seven are printed by
typing a backslash in front of them: \$ \& \# \% \_ \{ and \}.
The manual tells how to make other symbols.
\bibliographystyle{plainnat}
\bibliography{volsmile}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How can I change teh numbers assigned to equations

Post by localghost »

The amsmath package provides a command to set equation numbering this way.

Code: Select all

\numberwithin{equation}{section}
For detailed explanation see the manual.


Best regards
Thorsten
bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

Re: How can I change teh numbers assigned to equations

Post by bazman »

thanks to both of you!!!
Post Reply