Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

\@addtoreset limitations?

  1. Mar 11, 2014 #1
    Greetings,

    I am using LyX. When I type

    \@addtoreset{thm}{section},

    in the preamble, the theorem numbering is reset at each section, as desired. Similarly, when I type

    \@addtoreset{thm}{subsection},

    in the preamble, the theorem numbering is reset at each subsection, as desired. However, when I type

    \@addtoreset{thm}{subsubsection},

    in the preamble, the command is ignored entirely. Does anyone know how to get it working, i.e., how to get the theorem numbering reset at each subsubsection?

    Thanks very much for any help that you can give.

    -HJ Farnsworth
     
  2. jcsd
  3. Mar 12, 2014 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    Are your subsubsections actually numbered in your document?

    The \@addtoreset command doesn't do its thing when a \section command, etc is executed. It does its thing when the counter named "section" is incremented, inside the \section command. That only happens if the section is numbered.

    If you make an unnumbered section with

    \section*{the heading}

    that will not reset the thm counter either.

    By default, everything down to \subsection is numbered but \subsubsection (and lower levels) are not. You can change that be setting the counter secnumdepth. The default value is 2, so

    \setcounter{secnumdepth}{3}

    in your preamble will give you subsubsection numbers.
     
  4. Mar 13, 2014 #3
    Hi, thanks for the response AlephZero.

    So I just tried the secnumdepth thing you suggested, but it didn't work. The subsubsections are already numbered in the document, with or without secnumdepth. However, what I need is for the theorem counter to reset each time a new subsubsection is started. \@addtoreset does this correctly for anything higher than a subsubsection, but doesn't work for a subsubsection.

    Does anyone know how to get \@addtoreset working for things lower than subsection?

    Thanks again.
     
  5. Mar 13, 2014 #4

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    Can you attach the .tex code for a complete (short) document that doesn't work?

    The fact that
    is probably sigmificant, but playing 20 questions to guess why it's significant is probably not a good way to debug the problem.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: \@addtoreset limitations?
  1. Mathematica limited (Replies: 6)

Loading...