GeneralInput File from a Windows Server

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fpires
Posts: 15
Joined: Wed Dec 23, 2015 7:10 pm

Input File from a Windows Server

Post by fpires »

Hello, everyone, and happy 2017!

Well, in my first topic of this year, I would like to ask about a specific usage of the command \input. I run Latex from my computer, wich uses Linux, but I wish to use \input to input a file which is in a Windows server connected to my computer. Is it possible? For example, it would be something like \input{Windows-server/directory/file}. I would not like to transfer the file to my computer, and then input it locally, because my Latex file may be used by other people in my work, which would use it in their own computers. I would like to import it directly from the Windows server.

As always, thank you very much for your help!

Best wishes,

Felipe

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Input File from a Windows Server

Post by Johannes_B »

I asn't sure aabout this, so I asked the LaTeX development team and got two replies almost immediately:
Joseph Wright wrote:It's a feature of the file system, so much the same as C:/.... I'd probably suggest the path of least resistance is to mount the server as a drive: for example, my 'home' folder is \\ueahome3\stfsci2\c227\data\Documents but is also accessible as U:\Documents
David Carlisle wrote:doesn't that just work? It's like using a mounted disk on unix??

EDIT: scroll a bit down to see more of the chat.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Input File from a Windows Server

Post by josephwright »

In general you should avoid absolute paths in sources (they make them non-portable): something like export TEXINPUTS=/server/path//: should allow just \input{file}.
Joseph Wright
fpires
Posts: 15
Joined: Wed Dec 23, 2015 7:10 pm

Input File from a Windows Server

Post by fpires »

Thank you all very much!

Well, sorry for my inexperience, but I tried to use the suggestion of writing the export command, but the output is exactly the inputted text! In my case, I wrote export TEXINPUTS=//fileserveript.ad.ipt.br/ctf/LEA/Teste//:, but the output was exactly this "phrase": export TEXINPUTS=//fileserveript.ad.ipt.br/ctf/LEA/Teste//:

I used it also in the preamble, but got an error. Sorry, what am I doing wrong?

Thank you again.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Input File from a Windows Server

Post by Johannes_B »

export is a thing for the terminal. You are exporting the path to the search paths of your OS. This is not LaTeX related
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
fpires
Posts: 15
Joined: Wed Dec 23, 2015 7:10 pm

Input File from a Windows Server

Post by fpires »

Oops! Sorry...

Thank you!
Post Reply