I am trying to remove all figures and tables in my document, but keep references inside the text still correct (i.e. figure 8/9/x).
I have found the following answer here which allows for all floats/tables to not be processed (and is good since I am already using this package).
However, I would like to still retain the figure counts/etc so there references to figures still work in the text. Furthermore, if I am using the subfloat package, it will also have to remove the sublabels (i.e. a) and b)).
MWE:
\documentclass{article}
\usepackage{graphicx}
\usepackage{float}
\usepackage{subfig}
%%% Remove the next two lines if you want the figures at their place
\usepackage[nolists,nomarkers]{endfloat}
\renewcommand{\processdelayedfloats}{}
\usepackage{lipsum}% mock text
\begin{document}
\lipsum[1]
\begin{figure}
\includegraphics[width=.3\textwidth]{example-image-a}
\caption{Whatever}
\label{fig:A}
\end{figure}
\lipsum[2]
\begin{figure}
\includegraphics[width=.3\textwidth]{example-image-a}
\caption{Whatever}
\label{fig:B}
\end{figure}
\lipsum[3]
\begin{table}[htp]
A table
\caption{Something}
\label{tab:A}
\end{table}
\lipsum[4]
\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[width=0.50\textwidth]{images/s.pdf}\label{sv}}
\hfil
\subfloat[]{\includegraphics[width=0.50\textwidth]{images/p.pdf}\label{pv}}
\caption{(a) shows the orthogonal plots of variables and their contribution on PC1 and PC2 while (b) highlights the individual contribution of each site. Ellipses for north and south in (b) are for 1 $\sigma$.}
\label{svp}
\end{figure}
\end{document}
demopackage option forgraphicx(i.e.,\usepackage[demo]{graphics}) does what you need (it does not load the image files but displays a placeholder instead, and all references and labels remain the same). – Marijn Jan 06 '20 at 17:32\renewcommandand some editing) I would rather do that. – Neviem Jan 06 '20 at 17:42\usepackage[-20]{pagesel}, once you know that your document ends at page 20 and figures are from page 21 on. – egreg Jan 06 '20 at 21:32