Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image paste: sub-folder tex files not working #71

Open
sbaier1 opened this issue Nov 5, 2019 · 2 comments
Open

Image paste: sub-folder tex files not working #71

sbaier1 opened this issue Nov 5, 2019 · 2 comments
Labels
✨ Feature request This would be nice, a new feature ⏳ Waiting for response I need a reply, and I'm not a mind reader...

Comments

@sbaier1
Copy link

sbaier1 commented Nov 5, 2019

Feature Request

Is your feature request related to a problem? Please describe.

I am using a project structure where chapters have sub-folders which are then \input from the root folder. I also set graphicspath and would like to use the image paste feature.

However, when using graphicspath, the paste feature will place the image relative to the current .tex file, while graphicspath will only search the root/ directory, leading to the resulting .tex file not compiling, because either paste should include the relative path to the current tex file in the path to the image or place the image in the root/ directory, as expected by pdftex.

Bildschirmfoto 2019-11-05 um 12 47 10

In the screenshot you can see the result of configuring graphicspath as diag and pasting a diag.png into intro.tex. pdftex can't find the file because it's in a sub-folder.

When not using graphicspath the paste command will use no parent-path, leading to the same issue: the image is dropped into the folder of the tex file (which is not the tex-root, so pdftex doesn't see the image)

Describe the solution you'd like

Pasting the file should use the texpath / texroot path instead of the current directory of the file being edited

Describe alternatives you've considered

alternatively, pasting the file should append the current directory for the imagePath variable (or add another variable to use for this case)

@sbaier1 sbaier1 added the ✨ Feature request This would be nice, a new feature label Nov 5, 2019
@tecosaur
Copy link
Owner

tecosaur commented Nov 6, 2019

Hi Simon, from what you have said, it sounds like you have set graphicspath, but it isn't being resolved correctly.

The determination of the appropriate graphicspath path isn't actually done by this extension, it actually comes from LaTeX Workshop via the getGraphicsPath() api function. If that is resolved incorrectly I'm afraid that's an issue with them not us 😞

@tecosaur
Copy link
Owner

tecosaur commented Nov 6, 2019

Oh, what did you set graphicspath to by the way?

@tecosaur tecosaur added the ⏳ Waiting for response I need a reply, and I'm not a mind reader... label Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature request This would be nice, a new feature ⏳ Waiting for response I need a reply, and I'm not a mind reader...
Projects
None yet
Development

No branches or pull requests

2 participants