[Tex/LaTex] ! Package xkeyval Error: `frame’ undefined in families `Gin’

xkeyval

I have this error in compiling the wiley template

! Package xkeyval Error: `frame' undefined in families `Gin'.

The main file is as follow including the packages. Please guide me…

%% Run LaTeX on this file several times to get Table of Contents,
%% cross-references, and citations.


\documentclass[11pt]{book}
\usepackage{Wiley-AuthoringTemplate}
%\usepackage[sectionbib,authoryear]{natbib}% for name-date citation comment the below line
\usepackage[sectionbib,numbers]{natbib}% for numbered citation comment the above line

\usepackage{color}   %May be necessary if you want to color links
\usepackage{hyperref}%  added by IF
\hypersetup{
    colorlinks=true, %set true if you want colored links
    linktoc=all,     %set to all if you want both sections and subsections linked
    linkcolor=blue,  %choose some color if you want links to stand out
}      

\usepackage[T1]{fontenc}
\usepackage{etex}
\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{listings}
\usepackage{graphicx}        % standard LaTeX graphics tool
                                      % when including figure files
\usepackage[export]{adjustbox}
\usepackage{pstricks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikz}
\usepackage{ulem}
\usetikzlibrary{shapes,arrows,fit}
\tikzstyle{decision} = [diamond, draw, fill=blue!20, text centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
    minimum height=2em]
\tikzset{%
  highlight/.style={rectangle,rounded corners, fill=red!15,draw,fill opacity=0.5,thin,inner sep=2pt}
}
\newcommand{\tikzmark}[2]{\tikz[overlay,remember picture,baseline=(#1.base)] \node (#1) {#2};}
%
\newcommand{\Highlight}[1][submatrix]{%
    \tikz[overlay,remember picture]{
    \node[highlight,fit=(left1.north west) (right1.south east)] (#1) {};\node[highlight,fit=(left2.north west) (right2.south east)] (#1) {};\node[highlight,fit=(left3.north west) (right3.south east)] (#1) {};\node[highlight,fit=(left4.north west) (right4.south east)] (#1) {};\node[highlight,fit=(left5.north west) (right5.south east)] (#1) {};\node[highlight,fit=(left6.north west) (right6.south east)] (#1) {};\node[highlight,fit=(left7.north west) (right7.south east)] (#1) {};\node[highlight,fit=(left8.north west) (right8.south east)] (#1) {};\node[highlight,fit=(left9.north west) (right9.south east)] (#1) {};}
}
\usepackage{xr}
\externaldocument[1-]{chapter1}
\externaldocument[2-]{chapter2}
\externaldocument[3-]{chapter3}
\externaldocument[4-]{chapter4}
\externaldocument[5-]{chapter5}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage[chapter]{algorithm}%  added by AA   
\usepackage[]{algorithmicx}
\usepackage{algpseudocode}%  added by AA 
\let\oldalgorithmic\algorithmic  
\renewcommand\algorithmic{\ttfamily\fontseries{l}\selectfont\oldalgorithmic}
\usepackage{courier}
\usepackage{dirtytalk}  %  added by AA  
\usepackage{amssymb}  %  added by AA  
\usepackage{multirow}  %  added by AA  
\usepackage{eucal}      % added by IF
\usepackage{multicol}        % used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
\usepackage{float}   % added by IF
\usepackage{amsmath} %  added by AA
\usepackage{cleveref} %  added by AA
\usepackage{booktabs} %  added by AA
\usepackage{mathtools}%  added by AA
\usepackage{cleveref} %  added by AA
\usepackage{bm}
\usepackage{subfigure}%  added by IF

Best Answer

First of, always remember to post a full (but minimal) example. Here you are only including the preamble, and the actual problem is now shown.

But, I know that the Gin family comes from graphics handling. So the complaint is from graphics options, and that it does not understand frame.

I also notice that you're using

 \usepackage[export]{adjustbox}

which adds extra options into \includegraphics.

So here is my crystal ball at full effect:

I assume you have this somewhere in your document (that you have not shown us)

\includegraphics[...,frame,...]{...}

However, that is the wrong syntax. The adjustbox for adding a frame is called fbox (because that is what is is doing).

Thus use

\includegraphics[...,fbox,...]{...}

(I've made the same mistake at one point)