I have one document under ~/my_files/test.tex and want to include in test.tex some styling informations, which can be found under ~/latex/styles/info_hypersetup.tex.
When I include the following statement into my test.tex:
%% setting the infos for the pdf
\include{home/helex/latex/styles/info_hypersetup.tex}
I get the following error when running pdflatex test.test:
! I can't write on file `~/latex/styles/info_hypersetup.tex.aux'.
I set the rights to 777 but this doesn't changed anything. It works, if I put info_hypersetup.tex in the directory-structure where test.tex is. But I want to use this styleinformation as a global setting for all my documents and don't want to copy it into every project.
Thanks for your help.
An absolute path is defined as the specifying the location of a file or directory from the root directory(/). In other words we can say absolute path is a complete path from start of actual filesystem from / directory.
Absolute path names always begin with the slash (/) symbol. Traces the path from the current directory through its parent or its subdirectories and files. An absolute path name represents the complete name of a directory or file from the /(root) directory downward.
An absolute path makes no assumptions about your current location in relation to the location of the file or directory it's describing. An absolute path always begins from the absolute start of your hard drive and describes every step you must take through the filesystem to end up at the target location.
~
is not a path in Unix, rather it is a path that Unix shells expand to the value of $HOME.
You've got a few possible ways to solve your problem:
\homedir
whose value is coded in your Latex file to be the absolute path to your home (i.e., the contents of $HOME). Nonportable: if you move your file to another machine, it probably won't work.thisfilesystem.sty
, with hardcoded values for various directories. You can then just change the values of this from machine to machine. This can also be created automatically from a Makefile. \write18
to run echo $HOME
and bind this to you \homedir
macro. It's portable, but I don't advise it: you should get into the habit of avoiding \write18
, because it is an awful security hole.I'd recommend #2.
Here is my dirty solution (because many people out there says not to use input but I want to get on :)):
\newcommand{\home}{../..}
\input{\home/latex/styles/info_hypersetup}
If you find something better, just let me know. The hint with setting output_any = a int the texmf.conf didn't work. I'm using ubuntu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With