1

I have been using Sublime Text 3 with Latexing to produce my documents.

However, I need to add lots of screenshots in my document. I am on windows and one can think how difficult it can be to get absolute paths right.

Any Latexing or ST3 support in this regard to ease insertion of absolute paths would be very helpful.

Thanks!

  • Do you have to use absolute paths? Might be easier with relative paths. The following command \graphicspath{dir-list} might also help you with your absolute paths (from graphicx package) – someonr Nov 29 '13 at 9:49
  • I need to definitely add an absolute path, the pngs are somewhere else and the doc is somewhere else. Not sure if \graphicspath{dir-list} could be useful. – deowood Nov 29 '13 at 11:39
  • 1
    If you have all graphics at different directories \graphicspath won't help, but this is quite uncommon. If you would like to compile again you need to place all the images at the right folders. It might be a good idea to copy them all in a subfolder. (but probably this won't fit to your application) – someonr Nov 29 '13 at 13:00
  • I do have all my graphics at one location and I have successfully tried \graphicspath, which is good but was just one part. However I want some more help from ST3: that it parses all the folders in the project and presents a list and I am able to include file's path in few clicks. I am sure it is possible. – deowood Dec 2 '13 at 5:21
1

Using the package latexing (http://www.latexing.com/) and \graphicspath{dir-list} solved the problem.

Install the Latexing plugin and configure it so that its working according to your needs.

Keep the screenshots folder in the same directory as the .tex file.

In the header of the document add: \graphicspath{{Z:/screenshots/}, {Y:/path/to/dir/having/the/tex/file}}

To include a file path in the document: press ctrl+shift+l, ctrl+shift+l. enter image description here

You will be presented with a few options, select: "Fill Include Graphics Anywhere"; just start typing the file name, and click the one you've got to insert:

enter image description here

The path (screenshots/backAnno/Screenshot-Done-1.png) will be inserted at the cursor, and you are done now!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.