Whenever a Google Doc is converted, captioned figures in the doc are duplicated

When converting a Google Doc to a latex file, most of the figures with captions (using the Docx2Latex add-on functions) are duplicated. In the code produced you can see the code:
\begin{subfigure} \includegraphics[width=6.5in,height=6.96in]{./media/image2.png}
inserted above the figure code.

I assume this is a bug in the add-on as I have experienced this issue with multiple documents and conversions. I have no clue how to fix this issue except by manually deleting the snippet of code above. Can you help me with this?

This looks like a bug introduced in latest release. Can you share the sample doc with support@docx2latex.com so that we can test and fix it?

Yes I will share the document with, but in order to try to avoid this bug I specifically did not caption my figures (and my tables too just to be safe).

So if you wish to recreate the bug just create a caption and convert it to Latex code and you’ll see the issue.

The bug no longer occurs when you create a figure caption, but that same code snippet is now added when you create a new reference to the figure with the Google Docs add-on. The bug does not occur if the references already exists.

Just to be explicit the bug occurs when you click the “Latex Source Code” button in the “Convert To” section of the Docx2Latex add-on window.

@Joep This bug should now be fixed in all the cases. Let us know if you run into this bug again.