0

I write my thesis in TeXstudio and i use for package manager MiKTeX. In the text who i write I want to put two shapes side by side. I find a very good solution for that "application" the subfigure.

I try to use it but i have an errors

My code:

\documentclass[a4paper,12pt,twoside,openany]{okonbook}
\usepackage[dvips]{graphicx}

\usepackage{makeidx}

\usepackage[english,greek]{babel}

\usepackage[iso-8859-7]{inputenc}
\usepackage{okonstyle}

\usepackage{amssymb}
\usepackage{amsfonts}

\usepackage{float}

%% The amsthm package provides extended theorem environments
%\usepackage{amsthm}
\usepackage{amsmath}

\usepackage{subfig}

\usepackage{url}
%\usepackage{algorithm}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\usepackage{algpseudocode}

\usepackage{mathtools}

\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{marginnote}
\usepackage{comment}

%% My packages
%\usepackage[super]{nth}
\newcommand{\gr}{\selectlanguage{greek}}
\newcommand{\en}{\selectlanguage{english}}
\usepackage{enumerate}
\usepackage[document]{ragged2e}
\usepackage{ mathrsfs }
\usepackage{cleveref}
\usepackage{caption}
\usepackage{subcaption}

\usepackage{drop}
\begin{document}

\begin{figure}
\centering
\begin{subfigure}[b]{0.1\textwidth}
    \includegraphics[width=\textwidth]{images/grafima3.eps}
    \caption{Graph 1}
    \label{fig:Graph 1}
\end{subfigure}

\begin{subfigure}[b]{0.1\textwidth}
    \includegraphics[width=\textwidth]{images/grafima4.eps}
    \caption{Graph 2}
    \label{fig:Graph 3}
\end{subfigure}

\caption{Graphs}\label{fig:Graphs}
\end{figure}

\end{document}

When I run it I have the following erros:

subcaption.sty line 60 Package subcaption Error: This package can't be used in cooperation(subcaption) with the subfig package. \subcaption@CheckCompatibility
Environment subfigure undefined. \begin{subfigure}
Missing number, treated as zero. \begin{subfigure}[b]{0.1\textwidth}
Illegal unit of measure (pt inserted). \begin{subfigure}[b]{0.1\textwidth}
\begin{figure} on input line 979 ended by \end{subfigure}. \end{subfigure}

Does anyone know what conflict I have with the packages and how to fix it.

P.S. Μy packages are up to date Thank you for your time.

  • All it does is check if subfigure.sty or subfig.sty are loaded and generate an error message if so. To fix it, don't load subfigure.sty or subfig.sty (really not needed). – John Kormylo Apr 03 '19 at 03:37
  • Thank you [tag: Kurt] for suggestion you same my day. My template for my thesis he gave to me, my professor and he has the files okonbook.cls,okonstyle.stl . – Giannis Aggelis Apr 03 '19 at 08:17
  • @JouleV I don't think the linked question is a suitable duplicate. https://tex.stackexchange.com/q/48837/35864 seems more appropriate (edit: Mhhh, probably not memoir makes things a bit more complicated there, apparently). https://tex.stackexchange.com/q/371158/35864 has the same error message, but no answer because of a non-MWE code example – moewe Apr 06 '19 at 12:50
  • Related (but with subfigure instead of subfig): https://tex.stackexchange.com/q/337495/35864 – moewe Apr 06 '19 at 12:56

0 Answers0