Text Formatting ⇒ Table in appendix
Table in appendix
Hi Folks
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
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
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Table in appendix
Hi Jannetta,
perhaps post a
minimal working example which shows your document setup. Such as if it has chapters, how the table numbering is defined, if appendixes are chapters or sections, etc. An example would make that clear. Otherwise it's hard to say, as we don't even know your document class or your preamble settings.
Stefan
perhaps post a

Stefan
LaTeX.org admin
Table in appendix
Hi Stefan
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.
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
Code, edit and compile here:
\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 bookmarkspdftoolbar=true, % show Acrobat’s toolbar?pdfmenubar=true, % show Acrobat’s menu?pdffitwindow=true, % page fit to window when openedpdftitle={Analysis and Modelling of the PY Complex in the Pyloric Circuit of the Crab Stomatogastric Ganglion}, % titlepdfauthor={Jannetta S. Steyn}, % authorpdfsubject={Subject}, % subject of the documentpdfnewwindow=true, % links in new windowpdfkeywords={keywords}, % list of keywordscolorlinks=true, % false: boxed links; true: colored linkslinkcolor=cyan, % color of internal links
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Table in appendix
It does not reproduce the problem. The example (which is huge) only contains one table, so it being numbered as one is no surprise. If i add another table earlier, it is correctly numbered.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: Table in appendix
Aw man! Sorry about that, stupidity struck again! However, when I add another table (say just copy the existing table into the Introduction section), then the Table is still numbered 1. I'm attaching my generated pdf. Do you get something different when you compile?
- Attachments
-
- mwe.pdf
- (119.71 KiB) Downloaded 386 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table in appendix
Ok, i was able to reproduce it.
What you have done with your
What are you trying to achieve?
Code: Select all
Code, edit and compile here:
\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?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
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
Code, edit and compile here:
\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
Sorry, i still don't know what you mean by getting a B in front of the index entry.
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.
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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Table in appendix
Okay, here is (as minimal as I can get it) MWE again with the "malicious code" removed. The first appendix now numbers it sections as .1 and .2 in stead of A.1 and A.2. Let's sort this first and then we can come back to the table problem.
Code: Select all
Code, edit and compile here:
\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 bookmarkspdftoolbar=true, % show Acrobat’s toolbar?pdfmenubar=true, % show Acrobat’s menu?pdffitwindow=true, % page fit to window when openedpdftitle={Analysis and Modelling of the PY Complex in the Pyloric Circuit of the Crab Stomatogastric Ganglion}, % titlepdfauthor={Jannetta S. Steyn}, % authorpdfsubject={Subject}, % subject of the documentpdfnewwindow=true, % links in new windowpdfkeywords={keywords}, % list of keywordscolorlinks=true, % false: boxed links; true: colored linkslinkcolor=cyan, % color of internal linkslinkcolor=blue,citecolor=red, % color of links to bibliographyfilecolor=green, % color of file linksurlcolor=blue % color of external links
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table in appendix
\backmatter
, kick it out.The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.