Graphics, Figures & TablesSeparate and combined list of tables and figures for my appendix

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
chriskl
Posts: 4
Joined: Sun Nov 20, 2022 12:33 am

Separate and combined list of tables and figures for my appendix

Post by chriskl »

Hello community,

I hope you are doing great!
for my master's thesis I need a special layout which is suggested by the university. Currently, I have problems with the appendix. In the table of contents there should only appear an entry which says "Appendix". My working solution for that is:

\chapter*{\large Appendix}
\addcontentsline{toc}{chapter}{Appendix}

My Appendix consists solely of figures and tables. What I want to do now, is to create a separate list of figures combined with the list of tables of the appendix, which I put after the "normal" list of figures and list of tables. Some important things are that the figures and tables in the appendix should be formatted the following: A1: name A2: name ... There should be no distinction between tables and figures in the numbering. The second thing is, that the list of figures and tables for the appendix should be combined and not separated. I tried several approaches so far. But none worked. I would really appreciate it, if you could help me with that.

Below I try to visualize my thoughts:

List of Figures (this is the normal one)

Figure 1: name

...

List of Tables ( this is the normal one)

Table 1: name

...

List of Appendices

A1: name of table or figure

A2: name of table or figure

...

Thank you very much, Regards, Chris

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: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Separate and combined list of tables and figures for my appendix

Post by Stefan Kottwitz »

For reader information, crosspost on goLaTeX.de.

Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Separate and combined list of tables and figures for my appendix

Post by Stefan Kottwitz »

You can redefine \thefigure and \figurename, start the counter from zero and use the figure environment both for figures and tables.

Code: Select all

\documentclass{report}
\begin{document}
\chapter*{Appendix}
\addcontentsline{toc}{chapter}{Appendix}
\renewcommand*{\thefigure}{A\arabic{figure}}
\let\figurename\relax
\setcounter{figure}{0}
\begin{figure}[htb!]
  \centering
  \begin{tabular}{cc}
    A & B
  \end{tabular}
  \caption{A table}
\end{figure}
\end{document}
Stefan
LaTeX.org admin
chriskl
Posts: 4
Joined: Sun Nov 20, 2022 12:33 am

Separate and combined list of tables and figures for my appendix

Post by chriskl »

Stefan Kottwitz wrote:You can redefine \thefigure and \figurename, start the counter from zero and use the figure environment both for figures and tables.
Hello Stefan,

thanks for your help.
I forgot to add a little detail in my description. Most of the tables are actually longtables, therefore the figure environment would not work here. Additionally, I get an error message that \figurename is not defined.
Can you think of a workaround here?

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

Separate and combined list of tables and figures for my appendix

Post by Stefan Kottwitz »

Hi Chris,

you could do the same with table instead of figure.

If there's no \tablename, maybe you don't need it. The \relax just disables it if it's there.

Stefan
LaTeX.org admin
chriskl
Posts: 4
Joined: Sun Nov 20, 2022 12:33 am

Separate and combined list of tables and figures for my appendix

Post by chriskl »

Unfortunately it doesn't work
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Separate and combined list of tables and figures for my appendix

Post by Stefan Kottwitz »

Good to know, but I cannot help without details, what means it doesn't work. Error message, wrong output etc. and which code you tested and tried. I can fix code, but I cannot fix a non-specific doesn't-work thing. ;-)

Stefan
LaTeX.org admin
chriskl
Posts: 4
Joined: Sun Nov 20, 2022 12:33 am

Separate and combined list of tables and figures for my appendix

Post by chriskl »

I found a solution using the tocloft package:
https://texblog.org/2008/07/13/define-your-own-list-of/

Thanks for your help on a Sunday, really appreciate it Stefan :)
Post Reply