Insert an image from the internet in latex

1

I'm trying to insert an image from the Internet in LaTeX, I have the following code. The link is as follows link

\documentclass{article}
\usepackage{hyperref}
\usepackage[demo]{graphicx}

\begin{document}

\href{http://190.145.116.60/ustamail/Escudo_Usta.png{\includegraphics[width=5cm]{Escudo_Usta.png}}

\end{document}
    
asked by Rafael Díaz 22.06.2017 в 05:56
source

1 answer

1

I would recommend downloading the image and using it locally.

I understand that there is a way to run shell commands when compiling (check \write18 and --shell-escape ), but some compilers do not allow any command, more than anything for security.

In web services such as ShareLaTeX and OverLeaf, the most likely is that you can not change it.

EDIT: I can think of an example like that, using wget (which is a shell utility to download files from the Internet.

\documentclass{article}
\usepackage{graphicx}
\begin{document}

% write18 corre wget y guarda la imagen con el nombre de archivo que ya tiene
\write18{wget http://190.145.116.60/ustamail/Escudo_Usta.png}

% Usas el nombre de archivo para incluirla en el documento
\includegraphics{Escudo_Usta.png}

\end{document}
    
answered by 22.06.2017 / 10:23
source