GeneralTEXINPUTS problems

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lnewton
Posts: 17
Joined: Mon Mar 31, 2008 3:01 pm

TEXINPUTS problems

Post by lnewton »

Can someone tell me what I need to change in order to get pdflatex/latex/tex/ to find local versions of files before the defaults?

Sorry, but I have not had to deal with this in years, but I've recently changed environments.

I now use TeXLive, both on Ubuntu and as MacTeX on my Macbook Pro, after using teTeX for many years. I used to set the TEXINPUTS variable, but find that things were found properly even without that being set under TeXLive, and didn't need to set TEXINPUTS at all.

Now I wish to create a test environment in which I can test changes to style files by having it find my local version before the production version on our Ubuntu server.

Therefore, I created a directory $HOME/ih/interhack-test-sty in which I put the development versions of the style files. Then I set the environment variable

export TEXINPUTS=:$HOME/ih/interhack-test-sty

I also ran texhash, not knowing if that was necessary.

I copied my primary unaltered style file to interjunk.sty and added to a simple test document

\usepackage{interjunk}

It did not complain about this, which tells me that it found the package, meaning that it searched the directory, although it did give me an error because \ProvidesPackage says interhack, not interjunk, but that was all the information I needed to assure me that *that* file was being loaded.

So then I added

\ThisIsNonsense

to the beginning of the real interhack.sty style file in order to provoke an error, and switched my test document to say

\usepackage[ia]{interhack}

where ia is a new option I have added to the style file that is in my development version only, but not in the production version, and the error message told me it was not an option. This tells me that it is finding interhack.sty in the production directory before if finds my local copy.

What information am I missing?

Thank you.
Lynn

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

TEXINPUTS problems

Post by Stefan Kottwitz »

Hi Lynn,

have a look at the TeX UK FAQ: "Private" installations of files.
Write sudo texhash. Maybe you did, but you did not mention the sudo. This topic from ubuntuforums.org could help too.

Stefan
LaTeX.org admin
lnewton
Posts: 17
Joined: Mon Mar 31, 2008 3:01 pm

Re: TEXINPUTS problems

Post by lnewton »

Regarding attempts to find newer versions of LaTeX style files
before the ones installed in the production hierarchy :

Resolution of this problem is still pending. Pardon my belated
response. I wish always to acknowledge helpful advice offered on
lists such as this, especially if I hope to receive more in the
future.

> have a look at the TeX UK FAQ: "Private" installations of
> files.

Thanks, I tried that. My objective is somewhat different from
what is described therein, but I created a private directory, put
some stuff in it, including a new test style file mysty.sty that
does not exist elsewhere, created a texmf.cnf, modified it as
described, ran texhash, added \usepackage{mysty} to a simple
LaTeX file, set TEXINPUTS to include that directory, and when I
run latex, it works. That's the good news.

However, if I then add a simple \newcommand to an existing
(development) version of a style file that is in that directory,
but the production version is out in the $TEXFIND tree, in this
case in:

/usr/local/texlive/texmf-local/tex/latex/local/interhack-sty/interhack.sty

and then I try to use that new command in my test document, latex
fails to recognize the command. This tells me that it finds the
style file in the TEXFIND tree before my development version, and
ignores the new one ... which is exactly the opposite of what I
want to accomplish.

(For reference, I'm developing on a Macbook Pro running MacTeX,
the version of TeXLive for the Mac, and will be installing it on
a large Ubuntu server, also with TeXLive.

s> Write sudo texhash. Maybe you did, but you did not
s> mention the sudo.

Yes, always run texhash as root when making changes that apply
systemwide.

s> This topic from ubuntuforums.org could help too.

I read this thread, but it did not help.

One possible workaround might be to put the development copies of
the new style files in the current working directory of a LaTeX
document I'm using to test it, so when i run latex on it, it
finds that copy first. It's not the way I wish to do it, though.

I'm certainly not the first person who wants to test updated
versions of locally produced style packages on a production
system before installing them for all users. I'm stuck on this
problem.

Thanks to all for continued support. This forum is excellent.
Lynn
Post Reply