Is it possible in LyX to start a new chapter after Appendix??? seems like no matter if I start a new chapter or paragraph, it continues writing in Appendix.

  • 1
    Welcome to TeX.SX! It is easier to help you if you add a minimal working example that takes the form \documentclass{...}\usepackage{....}\begin{document}...\end{document}. If possible, it should compile and have the minimum amount of code needed to illustrate your problem. The idea is to make it easier for people to troubleshoot your problem - and doing this makes it much more likely that some one will! – user30471 Jul 23 '15 at 11:41
  • You could use the appendix package. Then use ERT to insert \begin{subappendices} and \end{subappendices}. – scottkosty Jul 23 '15 at 23:24

This probably should be a duplicate but I couldn't find it. I also don't have lyx installed but I imagine that the solution should be the same (so this is a latex solution). Apologies if lyx is honestly different.

The problem is that \appendix redefines how chapters are printed. It also resets the chapter counter. You have not said how the next chapter should be numbered but it seems reasonable to keep the same numbering which means that we need to save the current chapter number when \appendix is called (I do this using \preto from the etoolbox package) and then we need to restore the value of the chapter counter when we switch back to chapters.

Below I define a \resumechapters command that does these things. Here is the output (with the page breaks suppressed):

enter image description here

and here is the code:

\newcounter{savedchapter}% for remembering the last chapter number
\preto\appendix{\setcounter{savedchapter}{\arabic{chapter}}}% remembering!
\newcommand\resumechapters{% the \appendix command with some tweaks
  \setcounter{chapter}{\arabic{savedchapter}}% restore chapter number
  \setcounter{section}{0}% reset section counter
  \gdef\@chapapp{\chaptername}% reset chapter name
  \gdef\thechapter{\@arabic\c@chapter}% make chapter numbers arabic

\let\cleardoublepage\relax% compressed output of MWE

   \chapter{A chapter}
   \chapter{An appendix}
   \chapter{Another chapter}

There is an environment called subappendices in the package appendix specifically for this. E.g.



\chapter{thesis article one}


  \section{extra info}

\chapter{thesis article two}


This gives:

subappendices1 subappendices2

Note that:

Within the subappendices environment, an appendix is introduced by a \section command in chaptered documents, otherwise it is introduced by a \subsection command. Effectively, this provides for appendices at the end of a main document division, as an integral part of the division. The subappendices environment supports only the title and titletoc options.



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.