Easier support for numbering sections within parts

Nicolas M. Thiéry avatarNicolas M. Thiéry created an issue

To number sections within parts, the best I could do:

\numberwithin{section}{part}
\AtBeginPart{\beamer@tocsectionnumber=0\relax}

The second bit was not quite intuitive to find. Could it be made so that the first bit would automatically imply the second? If not, could this trick (or anything better!) be documented? If it is and I missed it, please accept my apologies!

Comments (11)

  1. Anonymous

    I've been having the same problem. Unfortunately, the \AtBeginPart{\beamer@tocsectionnumber=0\relax} trick does not work for me, I get:

    ! Undefined control sequence.
    \beamer@atbeginpart ->\beamer
                                  @tocsectionnumber=0\relax
    
    
    

    I managed to get the section numbers to reset by manually patching beamerbasesection.sty, but that's not a very good idea. There should be a simpler way for doing this?

  2. Anonymous

    Thanks, I've actually tried makeatletter...other before, it seems to work half: When I add

        \numberwithin{section}{part}
    

    I get the error

     Package calc Error: `.' invalid at this point.
    
        See the calc package documentation for explanation.
    

    which of course doesn't explain anything...

    Wiith the tocsectionnumber=0 alone, my sections start at 1, but the slides (framenumer) number continues counting up (e.g., starting with 2.41 instead of 2.1 when the first lecture had 40 slides) *sigh*

  3. Anonymous

    Ok, an additional

        \AtBeginPart{\setcounter{framenumber}{0}}
    

    resets the framenumbers for each part -- still pretty ugly, though...

  4. Anonymous

    Ok, an additional

        \AtBeginPart{\setcounter{framenumber}{0}}
    

    resets the framenumbers for each part -- still pretty ugly, though...

  5. Anonymous

    Ok, an additional

        \AtBeginPart{\setcounter{framenumber}{0}}
    

    resets the framenumbers for each part -- still pretty ugly, though...

  6. Anonymous

    sorry for the duplicates, it was not showing after "Update issue"...

    Also, this only resets the numbering on the handouts, not on the slides, but this might be my (by now completely) messed up preamble.

  7. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.