[Tex/LaTex] directories usr/texmf

texmf

Sorry about the newbie question!!

As a background: I am running Texshop and sometimes Texmaker on OSX 10.9.2

I have used a package called leipzig over the last 2 years. As instructed I have saved it into

/Users/MYNAME/Library/texmf/tex/latex

Everything worked well until I did an update of all the packages in TexUtility a week ago. Apparently the package comes now with the official distribution. although I cannot actually say whether or not it was installed on my system with this update for the first time or whether it was there before. anyway, I blamed update for the problems I got. So, I deleted the above mentioned folder believing the package would now be simply loaded from the place where all the other packages are stored. I believe this is here:

/usr/local/texlive/texmf-local/tex/latex

and indeed the leipzig package is there.

but now I get an error telling me that leipzig.tex is not found. although it is there. so, I copied the folder back to its original place (from the trash bin). but now it tells me that all the \newcommand have been assigned already. This seems like it is loaded twice or from different places?

Can anybody help me with this? and maybe explain to me why the package won't load from the place where TexUtility updates/saves the files to?

My understanding is that the directory

/Users/MYNAME/Library/texmf/tex/latex

is used for non-official packages (or the ones which I am tweaking on some way). is this the case? the other directory

/usr/local/texlive/texmf-local/tex/latex

is used for official packages. shouldn't Texmaker or Texshop find both? How are these kept apart?

Any suggested readings on this topic?

Best Answer

The tree rooted in ~/Library/texmf is for material that doesn't belong to the official TeX Live distribution and should only be available to the owner of the directory.

The tree rooted in /usr/local/texlive/texmf-local, instead is for material that doesn't belong to the official TeX Live distribution, but should be available to all users of the same computer.

For most personal computers, owner and all users coincide, so the distinction is just practical: adding material in /usr/local/texlive/texmf-local requires running

sudo mktexlsr

in order to update the database of file names. This is not required for material in ~/Library/texmf (which is ~/texmf on Unix systems different from Mac OS X; ~ refers to the current user's home).

Font packages, however, should always be installed under /usr/local/texlive/texmf-local, so that

sudo updmap-sys

can be used. Running just updmap will create several problems whenever a font package in the main distribution is updated or added.

If you have leipzig under /usr/local/texlive/texmf-local, you should remove it, now that it is in the official distribution. If you run

tlmgr info leipzig --list

from a Terminal window, you'll receive this output:

package:     leipzig
category:    Package
shortdesc:   Typeset and index linguistic gloss abbreviations.
longdesc:    The leipzig package provides a set of macros for standard glossing abbreviations, with options to create new ones. They are mnemonic (e.g. \Acc{} for accusative, abbreviated acc). These abbre can be used alone or on top of the glossaries package for easy indexing and glossary printing.
installed:   Yes
revision:    31045
sizes:       src: 49k, doc: 477k, run: 9k
relocatable: Yes
cat-version: 1.1
cat-date:    2014-02-26 23:03:13 +0100
cat-license: lppl1.3
collection:  collection-humanities
Included files, by type:
run files:
  texmf-dist/tex/latex/leipzig/leipzig.sty
source files:
  texmf-dist/source/latex/leipzig/leipzig.dtx
  texmf-dist/source/latex/leipzig/leipzig.ins
doc files:
  texmf-dist/doc/latex/leipzig/README details="Readme"
  texmf-dist/doc/latex/leipzig/README.txt
  texmf-dist/doc/latex/leipzig/leipzig.pdf details="Package documentation"
  texmf-dist/doc/latex/leipzig/leipzig.tex

Now you know that you have to remove the corresponding directories:

sudo rm -fr /usr/local/texlive/texmf-local/tex/latex/leipzig
sudo rm -fr /usr/local/texlive/texmf-local/source/latex/leipzig
sudo rm -fr /usr/local/texlive/texmf-local/doc/latex/leipzig/
sudo mktexlsr

Check also in your ~/Library/texmf directory for similarly named directories. In order to see where the TeX programs are looking for leipzig.sty, do

kpsewhich leipzig.sty

which, if the above removal procedure has been successful, should output

/usr/local/texlive/2013/texmf-dist/tex/latex/leipzig/leipzig.sty
Related Question