tecosaur / LaTeX-Utilities

An add-on to LaTeX Workshop that provides some features that go beyond the bare essentials
MIT License
474 stars 28 forks source link

Formatted paste can't find graphicspath while in input file #366

Closed gruvw closed 6 months ago

gruvw commented 1 year ago

Bug Report

Disable all the other extensions except for LaTeX Workshop and LaTeX Utilities, and check that you still see this issue.

You still see this issue?: Yes

Describe the bug

When I am in a file that is included into a main latex document using the \input{path} and I use the formatted paste to include an image, the extension is not finding my call to graphicspath located in the main latex document. This results in saving the image in the wrong place.

Ideally, I would like the extension to detect my graphicspath automatically from my main file.
Another solution could be to have a simple vscode setting to force images to be saved in a specific directory.

Desktop

leoleoasd commented 1 year ago

Hi Jung Detecting the graphicspath in the main document seems impossible since a subfile may be included multiple times in different main files, and they may have different graphicspath.

I'll add a setting to overwrite the image path when I have time. In the meantime, if you are interested in implementing this, a PR is always welcomed!

gruvw commented 1 year ago

Ok, thank you.

I would love to help, however I don't code that much in JS and I never developed a VSCode extension so I'm sorry I won't help this time.