# Compilation error when plot and subplot are inserted [closed]

I am trying to add subtables inside tables. To achieve that I add the following packages:

``````\usepackage[format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage{subcaption}
``````

After adding these the compilation gives

``````(/usr/share/texmf-texlive/tex/latex/psfrag/psfrag.sty)
(/usr/share/texmf-texlive/tex/latex/tools/theorem.sty
(/usr/share/texmf-texlive/tex/latex/tools/thp.sty)))

! LaTeX Error: Option clash for package caption.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.13 \usepackage
{subcaption}
?
``````

The packages added before that are:

``````\usepackage[utf8]{inputenc}                               %Allows input of tex files encoded in UTF8
\usepackage[T1]{fontenc}                            %Set font encoding for   output PDF
\usepackage[danish,english]{babel}                    %Allows langauge switching (English is default)
\usepackage{graphicx}                                     %Support for including graphics
\usepackage{xcolor}                                 %Support for using colours
\usepackage[hang,normalsize,bf]{caption}            %Make pretty captions
\usepackage{hyperref}                               %References package
\usepackage{varioref}                                       %Enhances references (\vref {label})
You have `\usepackage[hang,normalsize,bf]{caption} ` and `\usepackage[format=plain,labelfont=bf,up,textfont=it,up]{caption}` you can't load caption with two sets of options. One or the other (or both at the same time) – David Carlisle Oct 16 '12 at 16:45
You probably also don't want `epsfig` which was a compatibility wrapper around `graphicx` for a package popular in the 1980's and `hyperref` usually wants to be loaded last – David Carlisle Oct 16 '12 at 16:47