0

I am currently writing my thesis (book class, thesis.tex), which englobes different manuscripts (article class, manuscript.tex). For that I created manuscript_text.tex, which is the text part of the manuscript, without title or else. That way I can input this in the manuscript.tex, or in the thesis.tex.

What I want to have, while not having to modify the manuscript_text.tex.

Manuscript:

  • 1 Introduction
  • 2 Results
  • 3 Conclusions
  • A Manuscript appendix
  • B Another manuscript appendix

Thesis:

  • 1 Introduction
  • 2 Manuscript
    • 2.1 Introduction
    • 2.2 Results
    • 2.3 Conclusions
    • 2.A First appendix
    • 2.B Second appendix
  • 3 Conclusions
  • A Thesis appendix
  • B Another thesis appendix

Here is what I tried:

a) using \renewcommand{\thesection}{\thechapter.\Alph{section}} and \setcounter{section}{0} before the appendices of the manuscripts yields a Manuscript with an appendix numbering like ".A", ".B" but the numbering in the Thesis works out!

b) using \renewcommand{\thesection}{\Alph{section}} and \setcounter{section}{0} yields a good result in the manuscript but then only "A" and "B" in the thesis.

c) using \appendix in "manuscript_text.tex" yields all the following chapters of the thesis being appendices themselves

Is there a way to change the numbering of the section, without affecting the indication of the chapter? That should be possible, but I couldn't find anything.

Thank you for your help.

Here are MWE:

Thesis.tex:

\documentclass[a4paper]{book}
\begin{document}

\frontmatter
    \tableofcontents

\mainmatter
    \chapter{Introduction}
    \chapter{Manuscript}
        \input{Manuscript_text.tex}
    \chapter{Conclusions}

\appendix
    \chapter{Thesis appendix}
    \chapter{Another thesis appendix}

\end{document}

Manuscript.tex:

\documentclass[a4paper]{article}

\begin{document}

    \input{Manuscript_text.tex}

\end{document}

Manuscript_text.tex

\section{Introduction}
\section{Materials and Methods}
\section{Results}
\section{Conclusions}

\renewcommand{\thesection}{\thechapter.\Alph{section}}
\setcounter{section}{0}
\section{Manuscript appendix}
\section{Another manuscript appendix}
3
  • If \thechapter is not added, \renewcommand overwrites the layout and you end up with only the section indicated. Commented Jul 9, 2021 at 12:17
  • How would you do it? Commented Jul 13, 2021 at 9:06
  • The reason is that I need sections to be numbered with numbers in the main part of the manuscript, while they need to have letters in the appendix. If I wouldn't use the \renewcommand line, I would end up with sections with numbers only. Does that answers your question? Commented Jul 14, 2021 at 12:07

1 Answer 1

0

One solution:

  1. Use the appendix package which allows per-chapter subappendices
  2. Introduce a switch to convert between subappendices and appendices.

Thesis.tex

\documentclass[a4paper]{book}
\usepackage{appendix}
\def\manuappendix{subappendices}

\begin{document}

\frontmatter
    \tableofcontents

\mainmatter
    \chapter{Introduction}
    \chapter{Manuscript}
        \input{Manuscript_text.tex}
    \chapter{Conclusions}

\begin{appendices}
    \chapter{Thesis appendix}
    \chapter{Another thesis appendix}
\end{appendices}

\end{document}

Manuscript.tex

\documentclass[a4paper]{article}
\usepackage{appendix}
\def\manuappendix{appendices}

\begin{document}

    \input{Manuscript_text.tex}

\end{document}

Manuscript_text.tex

\section{Introduction}
\section{Materials and Methods}
\section{Results}
\section{Conclusions}

\begin{\manuappendix}
\section{Manuscript appendix}
\section{Another manuscript appendix}
\end{\manuappendix}
1
  • It is not what I expected, but it works perfectly. Thanks for the rapid and easy solution! Commented Jul 13, 2021 at 9:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .