Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Latex: warning with caption

I’m using the following settings on Overleaf:

\documentclass[%
 aip,
 jmp,%
 amsmath,amssymb,
%preprint,%
 reprint,%
 nofootinbib,
 nobibnotes,
%author-year,%
%author-numerical,%
10pt
]{revtex4-2}

\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{tabularx}

\usepackage[a4paper, total={6.5in, 9in}]{geometry}

\usepackage{microtype}
\usepackage[english]{babel}
\usepackage[utf8]{inputenx}
\usepackage{bm}
\usepackage{amsbsy}
\usepackage{fixmath}
\usepackage{commath}
\usepackage{float}
\usepackage{siunitx} % notazione \num{e-}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
%\usepackage{subcaption}

\usepackage{hyperref}

\usepackage{curve2e}
%\usepackage{caption}
\usepackage{subcaption}
%\usepackage{silence}
%\WarningFilter{caption}{Unsupported document class}
%\usepackage[center]{subfigure}
\usepackage{comment}
%\usepackage[mathlines]{lineno}% Enable numbering of text and display math
%\linenumbers\relax % Commence numbering lines

and I get the following warning:

Package caption Warning: Unknown document class (or package), standard defaults will be used. See the caption package documentation for explanation.

The thing is that I’ve commented the caption package (it shouldn’t be active anymore), trying to replace it with subcaption.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Is there a way to solve the warning?

>Solution :

subcaption automatically loads the caption package. The warning is vanishes if you remove this package as well:

\documentclass[%
 aip,
 jmp,%
 amsmath,amssymb,
%preprint,%
 reprint,%
 nofootinbib,
 nobibnotes,
%author-year,%
%author-numerical,%
10pt
]{revtex4-2}

\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{tabularx}

\usepackage[a4paper, total={6.5in, 9in}]{geometry}

\usepackage{microtype}
\usepackage[english]{babel}
\usepackage[utf8]{inputenx}
\usepackage{bm}
\usepackage{amsbsy}
\usepackage{fixmath}
\usepackage{commath}
\usepackage{float}
\usepackage{siunitx} % notazione \num{e-}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
%\usepackage{subcaption}

\usepackage{hyperref}

\usepackage{curve2e}
%\usepackage{caption}
%\usepackage{subcaption}
%\usepackage{silence}
%\WarningFilter{caption}{Unsupported document class}
%\usepackage[center]{subfigure}
\usepackage{comment}
%\usepackage[mathlines]{lineno}% Enable numbering of text and display math
%\linenumbers\relax % Commence numbering lines


\begin{document}
content...
\end{document}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading