# Using \section*{} messes up equation numbering? [duplicate]

Here is my code:

\documentclass[letterpaper,10pt,fleqn]{article}

\setlength{\mathindent}{1cm}
\usepackage{geometry}
\geometry{textheight=9in, textwidth=6.5in}
\usepackage{amssymb}
\usepackage{amsmath}

\numberwithin{equation}{section}

\parindent = 0.0in
\parskip = 0.2in

\begin{document}

\section*{New Section}
\hrule

Text

\begin{align}
\phi =& \int_S \mathrm{d}a\\
=& \int_S f(u, v) |\mathbf{T}_u \times \mathbf{T}_v| \mathrm{d}u\mathrm{d}v
\end{align}

\end{document}


I don't want the number to be in front of "New Section", so I am using the asterisk \section*{New Section} but I do want the equations to be numbered as (1.1) and (1.2) etc. However, I have found that using the asterisk sets the equation numbers to (0.1) and (0.2) and I have yet to find a way around this.

• How will the reader know that you are in section 1, etc. without section numbers? Oct 9 '13 at 21:15
• Maybe this tex.stackexchange answer is what you are looking for, although it doesn't automatically number the equations. Another option may be this answer. Oct 9 '13 at 21:16
• No section number? The equations can't be numbered according to a number that doesn't exist. Leave out the \numberwithin instruction which doesn't make sense. Oct 9 '13 at 21:29

\newcommand{\mysection}[1]{\addtocounter{section}{1}\section*{#1}}


before your first section. Then use

\mysection{New Section}


This code works:

\documentclass[letterpaper,10pt,fleqn]{article}
\setlength{\mathindent}{1cm}
\usepackage{geometry}
\geometry{textheight=9in, textwidth=6.5in}
\usepackage{amssymb}
\usepackage{amsmath}

\numberwithin{equation}{section}

\parindent = 0.0in
\parskip = 0.2in