The current code will not work if the caption includes parentheses.
e.g {\pos(264,682)\clip(m 258 668 l 612 366 898 954 1202 552 1424 748 1862 286)}(caption)
Therefore, I suggest changing the code so only characters within the nearest parentheses of a tag are captured.
The current code will not work if the caption includes parentheses. e.g {\pos(264,682)\clip(m 258 668 l 612 366 898 954 1202 552 1424 748 1862 286)}(caption) Therefore, I suggest changing the code so only characters within the nearest parentheses of a tag are captured.