I was wondering becasue a .sty in a document's own directory is
recognisable and usable in the current document with out the LaTeX
distro yet knowing about it, so I was wondering if any sort of
document package path directives existed like
\graphicspath{{c:\mypict~1\camera}} does for graphics?
Or whether
there is way of placing a path in the
\usepackage{{{../styles/here/}}myStyle}
The real life purpose is for current team work where people are
potentially on different LaTeX distros, all using TeXWorks and you
want to keep a project file structure with custom packages in a
certain part of that structure, which can be accessed with relative
paths preferably.
(Not re-supplying changed .sty on a document by document basis,
becasue multiple seperate documents (in their own folders) are sharing
the same .sty and all need access to the updated version of it)
Any adivce appreciated please.
Paul
Yes, absolutely. In the file texmf.cnf is the shell path spec for where TeX looks for stuff. You can add and modify these on a per-user basis.
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
I have brought this here from a thread on the TeXWorks mail-list.
There we have been canvassing whether this kind of thing which works
on Mac OS and possibly reliably on MikTeX works becasue a standard
issue (un-altered) texmf.cnf or other points of LaTeX casue it to be
so, or whether the result is fickle and unrelaible between differing
LaTeX (*TeX) distros.
This is the sort of thing envisaged which works for some users -
WITHOUT altering the texmf.cnf
>>>> \documentclass[11pt]{book}
>>>> \usepackage{../StyleSheets/Preamble}
>>>> \usepackage{../StyleSheets/AssessmentDocumentConstruction}
>>>> \usepackage{../StyleSheets/QuizConstructionParameters}
>>>> \usepackage{../StyleSheets/GraphicsPaths}
>>>> \begin{document}
Another very experienced user, Bruno Voisin, has suggested:
"That's likely distribution-specific and also platform-specific.
"Namely, the definition of \usepackage (in latex.ltx) is highly
convoluted, it goes through a sequence of cascading definitions
involving \RequirePackage and \InputIfFileExists, and in between more
obscure stuff like \@onefilewithoptions, \@@input and the like.
"But it all seems in the end to go down to the \input TeX
primitive, which is implemented at the time TeX is built.
"Let me be more specific: in TeX Live, file searching involves
kpathsea, which is a C file searching library. So what TeX accepts in
TeX Live comes down to what kpathsea accepts. MikTeX must similarly
involve its own file searching library, which may place different
restrictions on file names and a different syntax for path
specification.
"Over the years I've seen all sorts of situations on different
platforms (Mac and Linux) and different TeX distributions (Textures,
OzTeX, DirectTeX, CMacTeX, teTeX, gwTeX, TeX Live). Some accepted file
names with spaces directly as \input{file name}, others required
quotes \input{"file name"}, others bluntly rejected spaces. Same with
8-bit characters in file names (Textures accepted it, OzTeX rejected
it). Textures accepted to typeset in plain TeX a file with spaces in
its name, but OzTeX didn't; both refused to typeset in LaTeX a file
with a space in its name, owing to the creation and reading of
ancillary files (.aux, etc.).
"Also in the same distro different TeX programs may see things
differently. This may have changed, but originally XeTeX, owing to its
Mac roots, was less strict on the use of spaces in file names than
pdfTeX.
"Similarly the path specification varies from platform to
platform. On Mac OS Classic a subfolder Figures in the current
directory was specified (in \graphicspath) as :Figures: and a
subsubfolder as :Figures:Part1:, but on Mac OS X it's Figures/ and
Figures/Part1/, respectively.
"So I don't think there is any norm on this, and I'm not even
sure where to look for information. I looked briefly at the
documentation of kpathsea for TeX Live, and I couldn't find any info.
"Bruno Voisin
So I am trying to determine whether relataive paths like above would
be able to be relied upon across the board of LaTeX distros - with
out user alteration of the texmf.cnf ?
At the moment it seems not?
Paul
Putting it more crudely, if you specify a relative, absolute, or partial path in a \usepackage command, LaTeX will try to obey it, and won't use texmf.cnf. But this is really only for development or a last resort; regularly-used packages should go in their proper tree (system, local, version, global, user, etc) as defined in texmf.cnf, and be referenced by their name alone.
> Yes, absolutely. In the fil...
--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group....
I whole heartedly agree that we should genereally be steering folk to
using there packetmanagement setups.
It does appear from the feed back I am getting along with our own
needs, that during coillaberative and other projects, there may be
situations where in-house (but geographically seperated) and other
needs require the use of packages which are not appropriate or useful
for CTAN - not having a wider auidience, and often times the LaTEX
user (while capible at LaTeX tasks) is not going to be proficient with
altering their Dostro's configuartion (seriously:- might even be
scared of touching it).
I have today received this on the TeXWorks mail list.
> > a) can packages be accessed by \usepackage{} on relative paths from
> > the document's directory,
>
> It depends on the setting of openin_any in texmf.cnf.
>
> % Allow TeX \openin, \openout, or \input on filenames starting with `.'
> % (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)?
> % a (any) : any file can be opened.
> % r (restricted) : disallow opening "dotfiles".
> % p (paranoid) : as `r' and disallow going to parent directories, and
> % restrict absolute paths to be under $TEXMFOUTPUT.
> openout_any = p
> openin_any = a
But, just to confirm and clarify, your understanding points us to the
fact that LaTeX will try to attempt to interpret and use any path
statement in \usepackage{} any way?
Thanks again,
paul
> --
>
> You received this message because you are subscribed to the Google Groups
> "LaTeX Users Group" group....
>
> On 15 October 2010 03:28, Peter Flynn <angleb...@gmail.com> wrote:
>> Yes, absolutely. In the fil...
>
> --
> You received this message because you are subscribed to the Google Groups
"When it is not approapiate for a package to be in the .tex files
directory, nor on CTAN then ...
"It looks to me like an admin / education issue if someone can't get a
package to load thorugh a relative path, rather than an area where
TeXWorks could help,
what is to be done is give them guidence on
1) placing packages in their local system where their *TeX distro is
then 2) told to find them.
Paul
Dear Peter thanks for that.
I whole heartedly agree that we should genereally be steering folk to
using there packetmanagement setups.
It does appear from the feed back I am getting along with our own
needs, that during coillaberative and other projects, there may be
situations where in-house (but geographically seperated) and other
needs require the use of packages which are not appropriate or useful
for CTAN - not having a wider auidience, and often times the LaTEX
user (while capible at LaTeX tasks) is not going to be proficient with
altering their Dostro's configuartion (seriously:- might even be
scared of touching it).
I have today received this on the TeXWorks mail list.
> > a) can packages be accessed by \usepackage{} on relative paths from
> > the document's directory,
>
> It depends on the setting of openin_any in texmf.cnf.
>
> % Allow TeX \openin, \openout, or \input on filenames starting with `.'
> % (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)?
> % a (any) : any file can be opened.
> % r (restricted) : disallow opening "dotfiles".
> % p (paranoid) : as `r' and disallow going to parent directories, and
> % restrict absolute paths to be under $TEXMFOUTPUT.
> openout_any = p
> openin_any = a
But, just to confirm and clarify, your understanding points us to the
fact that LaTeX will try to attempt to interpret and use any path
statement in \usepackage{} any way?
I'll keep comp.text.tex in mind if it becomes necessary to get
greater clarity on this.
Paul