I am trying to get the "Chapter number" in the \begin{appendices} to be a number instead of a Letter.

Since I need 2 appendice chapters, one called appendix and one called "Bilag", where Appendix have to be with letters, and bilag have to be with numbers, I have made a new environment that should be able to do it, but I can´t seem to figure out the right command

%Reset Appendix counter, and making it into numbers

\renewcommand{\the@apps}{\arabic{@apps}} %This is the one that is supposed to work?


%Choosing the name of the new environment and adding it
  • Can you post a compilable MWE, i.e., from \documentclass{...}...\begin{document}...\end{document}
    – MadyYuvi
    May 17 '18 at 12:38

I think the main reason your code is not working is that you are using the wrong counter. The @pps counter doesn't count appendix chapters/sections, but appendices environments. The counter used to number individual appendix chapters/sections is either chapter or section, depending on your document class.

Because the appendices environment redefines \thechapter or \thesection, you should moreover redefine these macros after \begin{appendices}.

I think the following probably does what you want. If you are using the article class you should replace all instances of chapter below by section.


\renewcommand{\restoreapp}{} %% <- Start numbering at 1 in every 'appendices'

% \usepackage[danish]{babel} %% <- Uncomment if you are using babel
% \addto\captionsdanish{ %% <- Uncomment if you are using babel
% } %% <- Uncomment if you are using babel

  \appendices %% <- would be called as part of \begin{appendices}
  % \setcounter{chapter}{0} %% <- Not needed if you redefine \restoreapp above
  \renewcommand\thechapter{\arabic{chapter}} %% <- Should come AFTER \appendices
  \endappendices %% <- would be called as part of \end{appendices}



\chapter{First chapter}
\section{A section}
\chapter{Second chapter}
\section{A section}

\chapter{First appendix}
\section{A section}
\chapter{Second appendix}
\section{A section}

\chapter{First bilag}
\section{A section}
\chapter{Second bilag}
\section{A section}


enter image description here


I am afraid I don't understand what you want, but here is a guess:

\chapter{First Chapter}
\chapter{Second Chapter}

\section{First Appendix section}
\section{First Bilag section}

\chapter{Final thoughts}

Table of contents

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.