2

I'm currently working on my Thesis and I am trying to get my Appendix sorted. here is my Appendix code:

\renewcommand{\figurename}{Appendix}
\renewcommand{\tablename}{Appendix}
\setcounter{figure}{0}
\setcounter{table}{0}
\renewcommand\thefigure{\thesection.\roman{figure}}  
\renewcommand\thetable{\thesection.\roman{table}} 
\pagestyle{plain}
\pagenumbering{Roman}
\setcounter{page}{1} 

Currently it is producing Figure titles like so;

Appendix 5.i:

And treats tables and figures separately, which I would like to avoid. Ideally, I'd like an appendix with continuous numbering despite tables or figures.

Any idea how to do that?
Thanks in advance

Mico
  • 506,678
Maria
  • 47

1 Answers1

1

If the table and figure counters are supposed to move together, it's best to make one counter a duplicate of the other. This may be achieved, e.g., with the \dupcntr macro provided in this answer provided by Martin Scharrer.

enter image description here

\documentclass{article}
\renewcommand{\figurename}{Appendix}
\renewcommand{\tablename}{Appendix}
\setcounter{figure}{0}
\setcounter{table}{0}
\renewcommand\thefigure{\thesection.\roman{figure}}  
\renewcommand\thetable{\thesection.\roman{table}} 
\pagestyle{plain}
\pagenumbering{Roman}
%\setcounter{page}{1} %% not needed

%% see https://tex.stackexchange.com/a/33901/5001
\makeatletter
\newcommand*{\dupcntr}[2]{%
    \expandafter\let\csname c@#1\expandafter\endcsname\csname c@#2\endcsname
}
\makeatother
\dupcntr{table}{figure}  % make one counter the duplicate of the other

\begin{document}

\appendix
\refstepcounter{section} % just for this example

\begin{table}[ht!]\caption{Table A}\label{tab:a}\end{table}
\begin{table}[ht!]\caption{Table B}\label{tab:b}\end{table}
\begin{figure}[ht!]\caption{Figure A}\label{fig:a} \end{figure}
\begin{figure}[ht!]\caption{Figure B}\label{fig:b} \end{figure}
\begin{table}[ht!]\caption{Table C}\label{tab:x}\end{table}

\end{document}
Mico
  • 506,678