Discussion:
packages and images in server
(too old to reply)
p***@gmail.com
2020-04-05 04:11:26 UTC
Permalink
Dear TeX users,

I am trying to link my package and images in my tex paper as like below in LaTeX2e.

E.g.

\documentclass{article}

\usepackage{\\192.168.2.2/path/myownstyle}

\begin{document}

\includegraphics{\\192.168.2.2/path/image/}
\end{document}

But it show error. Is there any way to link from common place. Please advise.

Best regards
sudham
Jean-Côme Charpentier
2020-04-05 09:50:28 UTC
Permalink
Post by p***@gmail.com
Dear TeX users,
I am trying to link my package and images in my tex paper as like below in LaTeX2e.
E.g.
\documentclass{article}
\usepackage{\\192.168.2.2/path/myownstyle}
\begin{document}
\includegraphics{\\192.168.2.2/path/image/}
\end{document}
But it show error. Is there any way to link from common place. Please advise.
\usepackage{\\???\...\graphicx}

It's the first time I see somme calls like
\usepackage{\\192.168.2.2/...}

Jean-Côme Charpentier
Peter Flynn
2020-04-05 13:50:57 UTC
Permalink
Post by p***@gmail.com
Dear TeX users,
I am trying to link my package and images in my tex paper as like below in LaTeX2e.
E.g.
\documentclass{article}
\usepackage{\\192.168.2.2/path/myownstyle}
\begin{document}
\includegraphics{\\192.168.2.2/path/image/}
\end{document}
But it show error. Is there any way to link from common place.
No, I don't think you can do that, and certainly not with a backslash.

Image files need to reside on the machine being used to run LaTeX. AFAIK
neither \usepackage or \includegraphics has any way to invoke a network
protocol by itself. Possibly some operating system environments may do
that by themselves.

Or maybe someone has done something with one of the newer flavours of TeX.

Peter
Peter Flynn
2020-04-05 14:16:13 UTC
Permalink
On 05/04/2020 14:50, Peter Flynn wrote:
[...]
Post by Peter Flynn
No, I don't think you can do that, and certainly not with a backslash.
Having stuck my neck out, if someone has managed to do this, I'd be
interested in hearing.

It *is* of course possible to make a separate system call beforehand to
retrieve a remote resource, eg

\immediate\write18{wget Loading Image...}
\includegraphics{somefile.jpg}

but that's a different mechanism.

Peter
Mauro Orlandini
2020-04-06 06:24:04 UTC
Permalink
Post by p***@gmail.com
\usepackage{\\192.168.2.2/path/myownstyle}
I do not think this is possible in LaTeX. You have to do it at the system
level. Just mount the network drive to some directory, like /mnt/Shared.
You can do it via samba (if it is a windows system) or via NFS (if it is
a linux/mac system). You can find plenty of tutorials on how to do it.

Once you have mounted your shared network folder /mnt/Shared, then you
can give the command

\graphicspath{{/mnt/Shared/image}}

in the preamble to instruct graphicx to search images also in
/mnt/Shared/image

In your document then you do need to give the full path to
includegraphics when loading an image

\includegraphics{myimage.jpg}

If there is an image myimage.jpg in /mnt/Shared/image, then it will be
loaded. Actually, you do need the extension .jpg, too.

Ciao, Mauro

Loading...