0

I have written large (large, by my understanding, 40 pages) document with a lot of images. I need to make a beamer presentation, and I need to use photos from this document.

So I want to open this document, see the text and images, and make the presentation out of them. If I need any image from the document, it would be good to see it's path or at least name on the disk (or <path>).

How to make \includegraphics[<opts>]{<path>} to to print image path <path> to the image itself? So I could open this document and see where to find image source without browsing the latex code. Is there some workaround?

  • 2
    Most editors have a search functionality where you can double or ctrl click in the pdf and it will take you to that area of the source. You can also pass the draft option to graphicx (or your documentclass), and the images will be replaced by their paths (so you'd need two copies of the pdf - one with images and one with paths). (How bad is your tex code? I can usually ctrl f a choice phrase and get at most three matches in my entire document.) Do any of those possibilities work for you? – Teepeemm Dec 04 '23 at 21:51
  • @Teepeemm ctr-click wont work for me - I use neovim (editor) and skim (pdf-viewer) setup, and all this on Mac OS. For some reason vimtex (neovim plugin that does latex things) wont speak to skim properly and I cant use backward-search. What about draft option, it is and option, but It is not so comfortable to use 2 documents instead of 1 with titles and images in one. Thanks for notes. – Vladyslav Rehan Dec 04 '23 at 22:05
  • 1
    You can do something similar to https://tex.stackexchange.com/a/203309/ but then simpler, just print #2 instead of adding it to a list, or maybe \detokenize{#2} if there are special characters in the filename. – Marijn Dec 05 '23 at 15:30
  • @@Marijn Thank You! I made next thing: ```\LetLtxMacro{\OldIncludegraphics}{\includegraphics} \renewcommand{\includegraphics}[2][]{% \OldIncludegraphics[#1]{#2}% \vspace{-2cm}% \center{\smash{\colorbox{red}{\textcolor{white}{\tiny \tt \detokenize{#2}}}}}% \vspace{2cm}% }
    
    
    – Vladyslav Rehan Dec 06 '23 at 10:19

0 Answers0