1

I have 4 separate documents Appendix A,B,C,D. There is no cross reference. So all of these 4 documents are independent.

I want all the propositions in Appendix B labeled as Proposition B.1, Proposition B.2,....

I know how to do it for Appendix A,

 \documentclass[11pt]{article}
 \newtheorem{proposition}{Proposition}
 \usepackage{chngcntr}
 \begin{document}
 \appendix
 \counterwithin{proposition}{section}
 \begin{proposition}
   This is a proposition
 \end{proposition}
 \end{document}

However, how to do the similar thing for Appendix B and C

1 Answer 1

4

Redefine \theproposition to include the appendixlabel.

\newcommand\appendixlabel{C}
\newtheorem{proposition}{Proposition}
\renewcommand\theproposition{\appendixlabel.\arabic{proposition}}

Here is an example with the code below it.

enter image description here

\documentclass{article}
\newcommand\appendixlabel{C}
\newtheorem{proposition}{Proposition}
\renewcommand\theproposition{\appendixlabel.\arabic{proposition}}
\begin{document}
\title{Appendix \appendixlabel}
\author{By Me}
\maketitle

\begin{proposition}
  Some proposition.
\end{proposition}

\section{First section}

\begin{proposition}
  Some proposition.
\end{proposition}

\begin{proposition}
  Some proposition.
\end{proposition}

\section{Second section}

\begin{proposition}
  Some proposition.
\end{proposition}

\begin{proposition}
  Some proposition.
\end{proposition}
\end{document}
4
  • I am sorry that I didn't express my problem clearly. My Appendix B also have many sections. I wish I could have within this document Appendix B, then Section 1. Proposition B.1, Proposition B.2, then Section 2. Proposition B.3, the number of the Proposition does not have to related to section number, but it must have a "B".
    – KevinKim
    Dec 15, 2016 at 16:13
  • @KevinKim But your code does something different: you explicitly reset the proposition counter with every new section, and you have an \appendix command. So the sections in the appendix will be numbered A, B, C, and the propositions will be numbered A.1, A.2, ..., B.1, B.2, ..., C.1, C.2, I suggest to rewrite your question. Give the code that does what you want for A (including several sections and propositions per sections); you say that you know how to do it. And then ask how your code can be modified to have the same with B, C, ...
    – gernot
    Dec 15, 2016 at 16:21
  • @KevinKim I have added another solution; does this capture your intentions?
    – gernot
    Dec 15, 2016 at 16:42
  • sorry for the late reply, this one is great!
    – KevinKim
    Dec 20, 2016 at 13:18

You must log in to answer this question.

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