Text FormattingTable in appendix

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm

Table in appendix

Post by jannetta »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Table in appendix

Post by Stefan Kottwitz »

Hi Jannetta,

perhaps post a Infominimal 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
LaTeX.org admin
jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm

Table in appendix

Post by jannetta »

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.

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 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
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Table in appendix

Post by Johannes_B »

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.
jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm

Re: Table in appendix

Post by jannetta »

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
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Table in appendix

Post by Johannes_B »

Ok, i was able to reproduce it.

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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
What you have done with your 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.
jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm

Table in appendix

Post by jannetta »

:lol: My sincere apologies LaTeX. I promise I'll do better. Hopefully the folks here can save my soul. :lol:

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
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
to just before it.
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.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Table in appendix

Post by Johannes_B »

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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm

Table in appendix

Post by jannetta »

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 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
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Table in appendix

Post by Johannes_B »

\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.
Post Reply