[Tex/LaTex] The key ‘cas/fig/h’ is unknown and is being ignored

els-casfloatsgraphicspositioning

I need to put a figure in a specific position in my text, and I tried {h}, {ht}, {hbt} in my commands, but I get this error:

LaTeX error: "kernel/key-unknown" The key 'cas/fig/h' is unknown and is being ignored. For immediate help type H .

This is my code for plotting my figure:

\begin{figure}[h]
    \centering
    \includegraphics[scale=.5]{flowchart.pdf}
    \caption{The schematic workflow of the rock-frame calibration.}
    \label{fig1}
\end{figure}

I used the following packages:

\usepackage{lineno}
 \usepackage{float}
  \usepackage{here}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}

Could you please help me to solve the problem?

Best Answer

The cas-sc class redefines figure and the optional argument accepts a key-value type of syntax.

\documentclass{cas-sc}
\usepackage{graphicx}
\usepackage{natbib}

\usepackage{lipsum} % for context

\begin{document}

\lipsum[1]

\begin{figure}[pos=htp]
\centering

\includegraphics[width=0.4\textwidth]{example-image}

\caption{Test of figure}

\end{figure}

\lipsum

\end{document}

enter image description here

Related Question