1

I've tried looking around for some answers to this questions, but couldn't find anything, so any help would be appreciated. My LaTeX document has several figures and graphs in it, and their captions are the ordinary "Figure 1: ...". However, I would like to make the graphs have an independent counter that captions them as "Graph 1" rather than "Figure 1", while also having the regular images be captioned with "Figure".

I found some questions related to this (like so) but they either involve \renewcommand{\figurename}{Fig.} or the caption package, neither of which seem to accomplish the idea of two independent figure counters.

Edit: Solution

Someone might stumble upon this later by chance so I just wanted to put in the solution to this issue.

\documentclass{article}
\usepackage{float}
\newfloat{Graph}{tbp}{ext}

\begin{document} ... \begin{Graph}[h!] \centering \includegraphics[width=0.65\textwidth]{graph1.PNG} \caption{caption goes here.} \end{Graph} ... \end{document}

heeyaw
  • 13

2 Answers2

1

You can use the float package and \newfloat{graph}.

David Carlisle
  • 757,742
0

If you only got few or no tables on can use table for graphs.

\renewcommand{\tablename}{Graphs}%
\begin{table}
\centering
\includegraphics[width=0.5\textwidth]{graph1.png}
\caption{my fancy graph}
\end{table}%\setcounter{table}{2} % return value if you got other tables,
%if only graphs no need to reset counter.
Oni
  • 705
  • I see; unfortunately, I do have a lot of tables already in my document, but thanks for the help! – heeyaw May 14 '21 at 21:15