Text Formatting ⇒ Table in appendix
Table in appendix
I have a table in an appendix. The problem is that this table has become "Table 1" even though it is not the first table in the document. I guess that happens because it is in the appendix. I don't mind that so much but now it is showing up in the "List of Tables" as 1 and not B1 (since it is appendix B).
What can I do to fix this?
Kind Regards
Jannetta
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Table in appendix
perhaps post a

Stefan
Table in appendix
Okay here goes. I hope this is minimal enough. I'm not good with MWEs because everytime I start stripping the document down I loose things or it stops working or it doesn't produce the error and I end up spending hours on the thing. As it is now it reproduces the problem that I have an one or two others that I still want to ask about.
Code: Select all
\documentclass[12pt, a4paper, onecolumn, oneside]{book} % Current
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.5}
\setlength{\parskip}{\medskipamount} \setlength{\parindent}{0em}
\usepackage{acro}
\usepackage{etoolbox}
\usepackage{threeparttable}
\usepackage{mwe}
\usepackage{float}
\usepackage{listings}
\usepackage{xcolor}
\usepackage[titletoc,page]{appendix}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{newclude}
\usepackage{multirow}
\usepackage{array}
\usepackage{amsmath}
\usepackage[nonumberlist]{glossaries}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\usepackage{hyperref}
\newcommand*{\bookappendix}[2]{%
\setcounter{secnumdepth}{-1}\chapter{#1}\setcounter{secnumdepth}{2}%
\setcounter{section}{0}\renewcommand*{\thesection}{{#2}.\arabic{section}}%
}
\hypersetup{
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=true, % page fit to window when opened
pdftitle={Analysis and Modelling of the PY Complex in the Pyloric Circuit of the Crab Stomatogastric Ganglion}, % title
pdfauthor={Jannetta S. Steyn}, % author
pdfsubject={Subject}, % subject of the document
pdfnewwindow=true, % links in new window
pdfkeywords={keywords}, % list of keywords
colorlinks=true, % false: boxed links; true: colored links
linkcolor=cyan, % color of internal links
linkcolor=blue,
citecolor=red, % color of links to bibliography
filecolor=green, % color of file links
urlcolor=blue % color of external links
}
\setlength{\topmargin}{-0.8cm}
\setlength{\textheight}{24cm}
\raggedbottom
\newcommand{\note}[1]{}
\newcommand{\species}[1]{\textit{#1}}
\newcommand{\matlab}{MATLAB\textsuperscript{\textregistered}}
\AtBeginEnvironment{tablenotes}{\Large\color{red}}
%\section{{Abbreviations}}
\label{acro}
\DeclareAcronym{AB}{short=AB, long=anterior burster}
\DeclareAcronym{ADHD}{short=ADHD, long=Attention Deficit Hyperactivity Disorder}
\DeclareAcronym{avn}{short=avn, long=anterior dilator nerve}
\renewcommand{\bibname}{References}
\makeglossaries
\begin{document}
%--------------------------------------------------------------------------
% Title page
\pagenumbering{gobble}
\clearpage\thispagestyle{empty}
\begin{titlepage}
\newpage
\begin{center}
\vspace{25mm}
{\bf\LARGE
\label{Title Page}
Short title
}
\vspace{25mm}
{\Large\bf Jannetta S. Steyn}
\large School of Computing Science
\large Newcastle University
\vspace{25mm}
\begin{minipage}[t]{4in}
\begin{center}
\large This thesis is submitted in partial fulfilment of the requirement for the degree of
\large\textit{Doctor of Philosophy}
\vspace{5mm}
\Large August 2015 % Submission date
\end{center}
\end{minipage}
\end{center}
\end{titlepage}
%--------------------------------------------------------------------------
% Initial matter
\frontmatter
\pagestyle{empty}
\acresetall
\chapter{Abstract}
\label{chap:Abstract}
An Abstract
\cleardoublepage
\thispagestyle{empty}
\vspace*{\stretch{1}}
\begin{flushright}
\itshape
A dedication
\end{flushright}
\vspace{\stretch{3}}
\cleardoublepage
\chapter{Acknowledgements}
\label{chap:acknowledgements}
Some acknowledgements
\chapter{Declaration}
\label{chap:declaration}
A declaration
\pagestyle{plain}
\chapter{Publications}
\label{chap:Publications}
Some publications
%\acresetall % Reset acronyms - they'll be displayed in full again
%\begin{singlespace}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
%\cleardoublepage
\pdfbookmark{\contentsname}{Contents}
\tableofcontents
%\cleardoublepage
\pdfbookmark{List of Figures}{lof}
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
%\cleardoublepage
\pdfbookmark{List of Tables}{lot}
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\pdfbookmark{Acronyms}{acro}
\addcontentsline{toc}{chapter}{Acronyms}
\printacronyms[name=Acronyms]
\cleardoublepage
%\end{singlespace}
\include{abbrevs3}
\glsaddall
\printglossaries
\mainmatter
\pagenumbering{arabic}
%\printglossaries
\setcounter{secnumdepth}{15}
%\acresetall % Reset acronyms - they'll be displayed in full again
\acresetall
\chapter{Introduction}
\label{chap:intro}
Chapter one
\acresetall
\chapter{Background}
\label{chap:back}
Chapter two
%--------------------------------------------------------------------------
\backmatter
%\pagestyle{plain}
% Appendix
%\renewcommand{\thechapter} {\Alph{appendix}}
\appendix
\label{Appendices}
\begin{appendices}
\bookappendix{Some appendix}{A}
\label{app:HH}
\bookappendix{Another appendix}{B}
\label{app:dissection}
Some stuff
\begin{table}[H]
\centering
\caption{\species{Cancer pagurus} saline}
\label{tab:saline}
\begin{tabular}{lrrrrr}
\hline
\textbf{Salt} & \textbf{(mM)} & \textbf{g/Liter} & \textbf{g/2 Liter} & \textbf{g/5 Liter} & \textbf{g/8 Liter} \\ \hline
KCl & 11.00 & 0.83 & 1.66 & 4.15 & 6.64 \\
NaCl & 440.00 & 25.80 & 51.60 & 129.00 & 206.40 \\
CaCl2H2O & 13.00 & 1.90 & 3.80 & 9.50 & 15.20 \\
MgCl26H2O & 26.00 & 5.30 & 10.60 & 26.50 & 42.40 \\
Trizma base & 11.2 & 1.50 & 3.00 & 7.30 & 12.00 \\
Maleic Acid & 5.00 & 0.60 & 1.20 & 3.00 & 4.80 \\
Hepes & 10.00 & 2.38 & 4.76 & 9.52 & 19.04 \\
\multicolumn{6}{l}{\textit{(Hepes can be used instead of Tris+Maleate)}} \\
\hline
\end{tabular}%
\end{table}%
\end{appendices}
\bibliographystyle{acm}
\cleardoublepage
\pdfbookmark{References}{bib}
\bibliography{research}
\addcontentsline{toc}{chapter}{References}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Table in appendix
Re: Table in appendix
- Attachments
-
- mwe.pdf
- (119.71 KiB) Downloaded 395 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table in appendix
Code: Select all
\documentclass{book}
\newcommand*{\bookappendix}[2]{%
\setcounter{secnumdepth}{-1}\chapter{#1}\setcounter{secnumdepth}{2}%
\setcounter{section}{0}\renewcommand*{\thesection}{{#2}.\arabic{section}}%
}
%\newcommand{\bookappendix}[2]{\chapter{#1}\renewcommand{\thesection}{#2}}
\begin{document}
\listoftables
\chapter{Introduction}
\begin{table} \caption{} \end{table}%
\appendix
\chapter{}
\chapter{}
\chapter{}
\chapter{}
\bookappendix{Another appendix}{B}
\begin{table} \caption{} \end{table}%
\begin{table} \caption{} \end{table}%
\begin{table} \caption{} \end{table}%
\end{document}
bookappendix
command, is simply slapping LaTeX in the face. What are you trying to achieve?
Table in appendix


To tell you the truth. I have no idea. I probably found that fudge somewhere on the Internet or asked for help on this forum. I think it is to get the page numbering to work correctly. If you look at the pdf that I uploaded, then you can see what I want. Apart from the Acronyms that appeared directly after the List of Tables, the document looks like I want it to. I managed to fix this problem now by moving the \cleardoublepage that used be after :
Code: Select all
\include{abbrevs3}
\addcontentsline{toc}{chapter}{Neuropeptide Acronyms}
\glsaddall
\printglossaries
Now the only problem is still to get a B in front of the 1 in the index entry for appendix B.
I am happy to make the LaTeX syntax more elegant but to tell you the truth I just don't have any more time to struggle to get LaTeX to format the document properly. I feel like I have spent more time on LaTeX than on writing the contents of my thesis and I just don't have the time anymore.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table in appendix
What exactly should be numbered with a B, and what is the malicious code block supposed to do? I think we can find a better solution.
Table in appendix
Code: Select all
\documentclass[12pt, a4paper, onecolumn, oneside]{book} % Current
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.5}
\setlength{\parskip}{\medskipamount} \setlength{\parindent}{0em}
\usepackage{acro}
\usepackage{etoolbox}
\usepackage{threeparttable}
\usepackage{mwe}
\usepackage{float}
\usepackage{listings}
\usepackage{xcolor}
\usepackage[titletoc,page]{appendix}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{newclude}
\usepackage{multirow}
\usepackage{array}
\usepackage{amsmath}
\usepackage[nonumberlist]{glossaries}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\usepackage{hyperref}
\hypersetup{
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=true, % page fit to window when opened
pdftitle={Analysis and Modelling of the PY Complex in the Pyloric Circuit of the Crab Stomatogastric Ganglion}, % title
pdfauthor={Jannetta S. Steyn}, % author
pdfsubject={Subject}, % subject of the document
pdfnewwindow=true, % links in new window
pdfkeywords={keywords}, % list of keywords
colorlinks=true, % false: boxed links; true: colored links
linkcolor=cyan, % color of internal links
linkcolor=blue,
citecolor=red, % color of links to bibliography
filecolor=green, % color of file links
urlcolor=blue % color of external links
}
\setlength{\topmargin}{-0.8cm}
\setlength{\textheight}{24cm}
\raggedbottom
\newcommand{\note}[1]{}
\newcommand{\species}[1]{\textit{#1}}
\newcommand{\matlab}{MATLAB\textsuperscript{\textregistered}}
\AtBeginEnvironment{tablenotes}{\Large\color{red}}
%\section{{Abbreviations}}
\label{acro}
\DeclareAcronym{AB}{short=AB, long=anterior burster}
\DeclareAcronym{ADHD}{short=ADHD, long=Attention Deficit Hyperactivity Disorder}
\DeclareAcronym{avn}{short=avn, long=anterior dilator nerve}
\renewcommand{\bibname}{References}
\makeglossaries
\begin{document}
%--------------------------------------------------------------------------
% Title page
\pagenumbering{gobble}
\clearpage\thispagestyle{empty}
\begin{titlepage}
\newpage
\begin{center}
\vspace{25mm}
{\bf\LARGE
\label{Title Page}
Short title
}
\vspace{25mm}
{\Large\bf Jannetta S. Steyn}
\large School of Computing Science
\large Newcastle University
\vspace{25mm}
\begin{minipage}[t]{4in}
\begin{center}
\large This thesis is submitted in partial fulfilment of the requirement for the degree of
\large\textit{Doctor of Philosophy}
\vspace{5mm}
\Large August 2015 % Submission date
\end{center}
\end{minipage}
\end{center}
\end{titlepage}
%--------------------------------------------------------------------------
% Initial matter
\frontmatter
\pagestyle{empty}
\acresetall
\chapter{Abstract}
\label{chap:Abstract}
An Abstract
\cleardoublepage
\thispagestyle{empty}
\vspace*{\stretch{1}}
\begin{flushright}
\itshape
A dedication
\end{flushright}
\vspace{\stretch{3}}
\cleardoublepage
\chapter{Acknowledgements}
\label{chap:acknowledgements}
Some acknowledgements
\chapter{Declaration}
\label{chap:declaration}
A declaration
\pagestyle{plain}
\chapter{Publications}
\label{chap:Publications}
Some publications
%\acresetall % Reset acronyms - they'll be displayed in full again
%\begin{singlespace}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
%\cleardoublepage
\pdfbookmark{\contentsname}{Contents}
\tableofcontents
%\cleardoublepage
\pdfbookmark{List of Figures}{lof}
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
%\cleardoublepage
\pdfbookmark{List of Tables}{lot}
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\cleardoublepage
\pdfbookmark{Acronyms}{acro}
\addcontentsline{toc}{chapter}{Acronyms}
\printacronyms[name=Acronyms]
%\end{singlespace}
\include{abbrevs3}
\addcontentsline{toc}{chapter}{Neuropeptide Acronyms}
\glsaddall
\printglossaries
\mainmatter
\pagenumbering{arabic}
%\printglossaries
\setcounter{secnumdepth}{15}
%\acresetall % Reset acronyms - they'll be displayed in full again
\acresetall
\chapter{Introduction}
\label{chap:intro}
Chapter one using \ac{AB}
\begin{table}[H]
\centering
\caption{\species{Cancer pagurus} saline}
\label{tab:salin1e}
\begin{tabular}{lrrrrr}
\hline
\textbf{Salt} & \textbf{(mM)} & \textbf{g/Liter} & \textbf{g/2 Liter} & \textbf{g/5 Liter} & \textbf{g/8 Liter} \\ \hline
KCl & 11.00 & 0.83 & 1.66 & 4.15 & 6.64 \\
NaCl & 440.00 & 25.80 & 51.60 & 129.00 & 206.40 \\
CaCl2H2O & 13.00 & 1.90 & 3.80 & 9.50 & 15.20 \\
MgCl26H2O & 26.00 & 5.30 & 10.60 & 26.50 & 42.40 \\
Trizma base & 11.2 & 1.50 & 3.00 & 7.30 & 12.00 \\
Maleic Acid & 5.00 & 0.60 & 1.20 & 3.00 & 4.80 \\
Hepes & 10.00 & 2.38 & 4.76 & 9.52 & 19.04 \\
\multicolumn{6}{l}{\textit{(Hepes can be used instead of Tris+Maleate)}} \\
\hline
\end{tabular}%
\end{table}%
\acresetall
\chapter{Background}
\label{chap:back}
Chapter two using \ac{ADHD}
%--------------------------------------------------------------------------
\backmatter
%\pagestyle{plain}
% Appendix
%\renewcommand{\thechapter} {\Alph{appendix}}
\appendix
\label{Appendices}
\begin{appendices}
\chapter{Some appendix}
\label{app:HH}
Some text
\section{the first bit}
\section{the second bit}
\chapter{Another appendix}
\label{app:dissection}
Some stuff
\begin{table}[H]
\centering
\caption{\species{Cancer pagurus} saline}
\label{tab:saline}
\begin{tabular}{lrrrrr}
\hline
\textbf{Salt} & \textbf{(mM)} & \textbf{g/Liter} & \textbf{g/2 Liter} & \textbf{g/5 Liter} & \textbf{g/8 Liter} \\ \hline
KCl & 11.00 & 0.83 & 1.66 & 4.15 & 6.64 \\
NaCl & 440.00 & 25.80 & 51.60 & 129.00 & 206.40 \\
CaCl2H2O & 13.00 & 1.90 & 3.80 & 9.50 & 15.20 \\
MgCl26H2O & 26.00 & 5.30 & 10.60 & 26.50 & 42.40 \\
Trizma base & 11.2 & 1.50 & 3.00 & 7.30 & 12.00 \\
Maleic Acid & 5.00 & 0.60 & 1.20 & 3.00 & 4.80 \\
Hepes & 10.00 & 2.38 & 4.76 & 9.52 & 19.04 \\
\multicolumn{6}{l}{\textit{(Hepes can be used instead of Tris+Maleate)}} \\
\hline
\end{tabular}%
\end{table}%
\end{appendices}
\bibliographystyle{acm}
\cleardoublepage
\pdfbookmark{References}{bib}
\bibliography{research}
\addcontentsline{toc}{chapter}{References}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table in appendix
\backmatter
, kick it out.