2

Is there a way to grab a figure from another computer (and enter the password in the console or via command line)? For example, is there a way to do this?

 \begin{figure}

 \includegraphics{user@xxx.xyz:/home/user/pic.pdf}

 \end{figure}

Thank you

  • 1
    It would (nost likely) be possible to use the shell escape feature to launch a copy command but it's simpler just to copy them to the local machine first. – David Carlisle Mar 26 '13 at 17:06
  • 1
    In Linux and the like, you can mount temporarily or permanently (when available) ssh locations with sshfs; passwordless logins with public keys can be set up. – alfC Mar 26 '13 at 17:20
1

ConTeXt can grab files via HTTP. When you mean SSH with “remote computer” then, I'm afraid it's not supported. Here's an example how to use a graphic via HTTP. Since there's no graphic extension provided I added the method option.

\starttext
  \externalfigure [http://placekitten.com/g/800/600][method=jpg]
\stoptext

The easiest solution would probably be to set up an HTTP server to provide access to the files.

1

Perhaps it can be done (as DavidCarlisle says), but the problem is that the resulting file can't be shipped around (much). Besides, placing the password in the LaTeX source is a security risk.

Presumably you want to grab the image because it isn't fixed. What I do anyway is to use make (under Linux) to build my more complex documents (compile images from their asymptote, dia or other format, translate some SVGs to PDF, ...) and then run pdflatex and bibtex as needed. Perhaps add other information, like exact version from git or do other stuff that is hard ro do in LaTeX. I'd just add the "grab the image" in there.

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.