TransWikia.com

Problem with insert an image in LaTeX

TeX - LaTeX Asked by Halyna on January 5, 2021

I have a problem with floating pictures. The system places it anywhere, but I want after some text. I had to use different ways to place images, but no result.
My code is:

documentclass[
% twocolumn,
]{ceurart}

usepackage{float}

....
begin{figure}[h]
centering
includegraphics[width=13cm]{ranking.png}
caption{Diagram of the functionality of online platforms}
label{ris:ranking}
end{figure}

In the line of code with key [h] I have a message:

Latex3 error: the key ‘cas/fig/h’ is unknown and is being ignored.

2 Answers

The document class ceurart doesn't allow the use of placement options. The following MWE works fine:

documentclass{ceurart}

usepackage{float}

begin{document}
    begin{figure}  % <--- ceurart doesn't allow the use of placement options
    centering
includegraphics[width=13cm]{example-image-duck}
caption{Diagram of the functionality of online platforms}
label{ris:ranking}
    end{figure}
end{document}

enter image description here

Answered by Zarko on January 5, 2021

The class is based on cas-common and has a key-value system for options to figure and table.

documentclass[
% twocolumn,
]{ceurart}

begin{document}

begin{figure}[width=13cm,pos=htp]
centering
includegraphics[width=figwidth]{example-image}
caption{Diagram of the functionality of online platforms}
label{ris:ranking}
end{figure}

end{document}

You should probably set width in terms of columnwidth.

Answered by egreg on January 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP