I have been trying to implement the solution that is mentioned here to solve the error, "Cannot determine size of graphic".

However when I want to add \usepackage[dvipdfmx]{graphicx} \usepackage{bmpsize}; I get the error "Option clash for package graphicx."

I am using overleaf and I just can't figure out what is going on because I just copied the following code that I had used there before for another project which was working. Now it gets the error "Cannot determine size of graphic".

  \caption{Probability density distribution comparisons of the true target and resampled instance spaces}

One additional thing is, now I had to give the name as 05_cost.png while before, it basically worked only with 05_cost and simply just by using the graphicx package.

I would be so happy to hear some advices.

Thanks a lot.

closed as off-topic by Mensch, Zarko, user13907, barbara beeton, Przemysław Scherwentke Jun 28 '16 at 20:19

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    It looks like the graphicx package is loaded twice. Check carefully your \usepackage declarations. Edit: What happens wihout the bmpsize package? – GuM Jun 9 '16 at 14:13
  • 1
    the full error message which you have not shown says exactly what the clashing options are. – David Carlisle Jun 9 '16 at 14:25
  • 1
    With the information you give, I'm not sure what really happens but how about passing dvipdfmx option as a global option (like \documentclass[dvipdfmx, <other options>]{article})? It can avoid option clash caused by packages which internally load the graphicx package. – yudai-nkt Jun 9 '16 at 15:11
  • 1
    As previously mentioned, you've not provided sufficient information for anybody to diagnose the problem. Did you try @DavidCarlisle 's suggestions? – cfr Jun 9 '16 at 21:09
  • 4
    I'm voting to close this question as off-topic because the op solved it by his own as mentioned in the last comment. – Mensch Jun 28 '16 at 19:08