Does someone knows how can I include a file from Google drive? Something like

  • I don't think, that TeX will have access to the internet/build a socket to input content somewhere in the cloud ;-)
    – user31729
    Sep 18, 2014 at 15:59
  • The download package might be useful.
    – mvkorpel
    Sep 18, 2014 at 16:05
  • 2
    on windows and mac at least, can't you sync drive to a local folder tex could see? Sep 18, 2014 at 16:16

1 Answer 1


Here is the minimal example which should work, no extra packages are needed.

I created webfile.tex with the following content:


I put it on my webpage.

In the main document, which is in my case ~/StackOverflow/ex2.tex, use \write18 to run shell command and \immediate to do it immediately. I recommend to use \unexpanded, if your link contains ~, # etc. The document is here:



Here is the main document.

And here will be the imported \texttt{webfile.tex} file, which I uploaded on my web page.

\immediate\write18{\unexpanded{wget -P ~/StackOverflow http://sirrah.troja.mff.cuni.cz/~pavlik/webfile.tex}}


Then compile it with pdflatex -shell-escape ex2.tex

The result is

enter image description here

But this will still download the .tex file to your computer (download directory is specified by the -P /some/dir/here switch), there is imho no way to do it without downloading the file.

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.