I am trying to include an image (institurtional logo) from direct web address, using \hyperref and pdftex. I am trying a command of the form (many other variants tried, with varios error messages ...):
\href{http://www.hbv.no/getfile.php/1-hbv.no/bilder/Logo%20og%20grafiske%20elementer/}{\includegraphics[]{hbv}}
The image filetype is .png. A complicating problem might be the presence of percent % signs in the url ... The actual error message produced is "file `hbv' not found"
?ideas? (In trying to research this, I found a lot of material about \hyperref on the web, but mostly without image examples ...)
Adding a minimal example, as asked for (the included packages are there because they are needed in the full file, and there might be interferences ...)
\documentclass[norsk,a4paper,pdftex]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
\href{http://www.hbv.no/getfile.php/1-hbv.no/bilder/Logo%20og%20grafiske%20elementer/}{\includegraphics[]{hbv}}
\end{document}
pdftexing this produces a onepage pdf with an emptybox-symbol followed by the letters hbv, all inside a small (blue-green) box.
.texdocument - for instance, there are same packages that need to be loaded for your command to compile that people who would like to help you might not realize need to be loaded. – Jānis Lazovskis Nov 26 '14 at 14:17TeX encountered an unknown command name. You probably misspelled the name. If this message occurs when a LaTeX command is being processed, the command is probably in the wrong place---for example, the error can be produced by an \item command that's not inside a list-making environment.
– kjetil b halvorsen Nov 26 '14 at 14:46%comment out your line and you have not loadedgraphicxpackage to define\includegraphics– David Carlisle Nov 26 '14 at 14:55hbv.png(or different extension) If not, it won't be found... – David Carlisle Nov 26 '14 at 15:24\includegraphics{hbv}so tex needs a file of that name in its search path. this is for the link text the fact that you make it an active link pointing to some web site doesn't change that. The URL is just specifying what happens when a reader clicks on the image it doesn't affect how it is typeset – David Carlisle Nov 26 '14 at 15:27--shell-escapeand make it call a command line http client such aswget(if you have that) to fetch the file each time, but there is no point, you may as well just fetch it once. – David Carlisle Nov 26 '14 at 15:35