Wow, I took some time to get my other work done but I didn't expect to be away this long. Apologies to my avid followers for the absence. The two of you know who you are.
The last few months have been a lot of fun with LaTeX as I have worked to streamline my day-to-day workflow around the lab. One of the things I do rather consistently is calibrating cameras for atmospheric remote sensing. This is mind-numbing, boring, repetitive work: perfect for a computer. I generally do things like this once, maybe twice, by hand and then script the whole thing so that I never have to do anything other than hit 'enter' again. The last step in this pipeline is having scripts that produce nice LaTeX summaries of a calibration run. I love this stuff. I'll write about the whole setup and fun tools like gnumeric (spreadsheet with LaTeX table output) and xfig (drawing tool with LaTeX output) at a later date.
For now, I'll get back on track with an issue that came up just this afternoon. I had the opportunity to get out of the lab and attend a LaTeX workshop/class put on by a local Linux User Group. A question came up during the discussion about resetting equation numbers in LaTeX. If you haven't experienced it yet, LaTeX does a number of things somewhat automatically for you like number equations, pages and figures. This is accomplished through a series of internal counters which keep a sequential, running tally. So, the questioner was wondering, how can one reset this numbering say, for a new section or chapter?
There are a few ways of doing this (probably several more, but these are very accessible) depending on what you want. If you want the numbering to reset at the start of each section or subsection but reflect the section or subsection (first equation of section is numbered 1.1, next is 1.2, first equation of second section is 2.1, etc), put the following two lines into the preamble of the document:
\usepackage{amsmath}
\numberwithin{equation}{section} or {subsection}
We've yet to talk about it here but the preamble of a LaTeX document is anything you put between the \documentclass{} and \begin{document} commands.
I've put together a couple of example files to show how this can be done:Number reset within section and Number reset within subsection
If you want more general control over equation numbers (or any counter), use setcounter and use it thusly:
\setcounter{equation}{number you want to start with - 1}
place this line before the location where you want the new numbering to start and after the last place you want the old numbering to remain and you reset the counter. In the default LaTeX setup, this will give you an integer running tally which jumps out of sequence. I have an example of this here
So, now you too can reset your equation numbers and drive your readers crazy. Enjoy!