10

I'm using KOMA-Script and a mix of \chapter and \addchap commands. I would like to have \glsresetall called for every chapter as I want my acronyms redefined once per chapter.

What is the cleanest way using either pure LaTeX or a KOMA-Script specific method to have \glsresetall called at the beginning of each new chapter?

Ideally the solution should work with the above chapter commands as well as \chapter*.

4
  • You mean \addchap instead of \addchapter, right?
    – cgnieder
    Jul 17 '13 at 21:36
  • Oh, and: welcome to TeX.sx! :)
    – cgnieder
    Jul 17 '13 at 21:37
  • Yes, I do mean \addchap. Oops. Thank you. :) Jul 17 '13 at 21:38
  • But ideally the solution should also work with \chapter*. Should maybe have worded the question differently. Jul 17 '13 at 21:39
10

Since \addchap calls \@schapter, which is also called by \chapter*, one can think to patch both \@chapter and \@schapter. With the help of etoolbox it's quite easy:

\usepackage{etoolbox}

\makeatletter
\pretocmd{\@chapter}{\glsresetall}{}{}
\pretocmd{\@schapter}{\glsresetall}{}{}
\makeatother
1
  • Perfect, exactly what I was looking for. Many thanks! Jul 17 '13 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.