6

I write a package named umtools.sty, since Ubuntu One can only sync the folder which is in ~/, so I put *.sty in ~/tlpkg/.

Now, how can I use it like \usepackage{umtools} instead of \usepackage{~/tlpkg/umtools}, as the way it is set up, \usepackage{<absolute path>} causes a warning: "You have requested package `~/tlpkg/umtools', but the package provides umtool", which makes me uncomfortable.

I've tried to modify ~/.pam_environment to add new PATH, but it doesn't work. Does someone know kpathsea.

Ubuntu 13.04 + Tex Live 2012 by sh install_tl + TeXstudio + XeTeX

3
  • mkdir -p ~/texmf/tex/latex && mv ~/tlpkg/umtools.sty ~/texmf/tex/latex/. ~/texmf is the proper local/personal directory; but make it mimic a proper 'tex tree' directory structure.
    – jon
    Jun 7, 2013 at 18:36
  • 1
    Welcome to TeX.SX! Your post was migrated here from another Stack Exchange site. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Joseph Wright
    Jun 8, 2013 at 5:13
  • Please Read The Fine Manual. Jun 9, 2013 at 14:49

1 Answer 1

4

You have two options:

  1. Put them in a standard directory where TeX will look:

    ~/texmf/tex/latex/umtools

    You may need to run texhash afterwards.

  2. Set the env. variable TEXINPUTS. (just like you'd set $PATH). I prefer to set it to something like this:

    TEXINPUTS=.:./packages:$HOME/texmf

    which gives me the flexibility of what package to use for a project:

    1. First check in the current working directory (for small projects)
    2. Then check in the sub directory packages
    3. Then check in ~/texmf
    4. And finally use the distribution default package.
2
  • 1
    TeX Live 2012 doesn't require texhash on your 'local' tree unless it's on a remote file system.
    – Joseph Wright
    Jun 8, 2013 at 5:12
  • 1
    I needed to append a trailing colon (:) to TEXINPUTS, otherwise the default locations were not searched. Oct 19, 2015 at 9:00

You must log in to answer this question.