0

I am writing a physics book where the problems are NOT at the end of the chapter but immediately follow material that is presented within sections. As such, I cannot use \enumerate to number equations. Instead, if there are two problems in Chapter 1, Section 2, I want them to be labeled 1.2-1 and 1.2-2, and so on. And then in the next sections, the problems should start again

Chapter 1 History

1.1 Intro

TEXT TEXT TEXT

1.2 Theory

TEXT TEXT TEXT

Problem 1.2-1 Derive the ...

TEXT TEXT TEXT

Problem 1.2-2 Determine...

Text Text Text

1.3 Time reversal

Text

Problem 1.3-1 Bla Bla Bla.

1.3.1 Fallacies

TEXT

Problem 1.3.1-1 Bla Bla Bla

You get the picture. I would like to have a counter that automatically resets with a new chapter or section or subsection is started. Now I am using "Problem \ref{label}-x" where I supply the "x" manually -- not very LaTeX-like. And also a pain when I add a problem to the middle of a section.

Werner
  • 603,163
Mark
  • 173
  • 1
  • 5
  • just declare the problem using \newtheorem (from the format or one of the many theorem packages) that has an optional argument to say the counter should be reset every section – David Carlisle Feb 07 '18 at 00:15
  • 1
    What you're after is essentially the same as what is covered in Numeration of theorems considering the depth (section, subsection ...). The difference is you'll be called them problems, not theorems and adjust the display of the problem counter slightly - 1.3.1-1 instead of 1.3.1.1. The process is automated, so you don't have to supply the x you're talking about. – Werner Feb 07 '18 at 00:50
  • I just added, verbatim, in the preamble as in the link you suggested. I also added into the text a few theorems as in the example. The document processes just fine, but no theorems are visible. Here is what I added to the text:\begin{theorem} test \end{theorem}

    \begin{theorem} test 2 \end{theorem}

    \subsubsection{Homework Hint}

    \begin{theorem} test 3 \end{theorem}

    – Mark Feb 07 '18 at 20:38

0 Answers0