Difference between revisions of "TeX Live"

From ArchWiki
Jump to: navigation, search
(Manually installing .sty files: minor formatting updates)
(36 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:TeX (English)]]
+
[[Category:TeX]]
{{i18n|TeXLive|TeX Live}}
+
[[it:TeXLive]]
 +
[[zh-CN:TeXLive]]
 +
{{Article summary start}}
 +
{{Article summary text|Introduce how install and use TeX Live.}}
 +
{{Article summary heading|Related}}
 +
{{Article summary wiki|TeX Live FAQ}}
 +
{{Article summary wiki|TeX Live and CJK}}
 +
{{Article summary wiki|LaTeX}}
 +
{{Article summary end}}
 +
[http://www.tug.org/texlive/ TeX Live] is an "easy way to get up and running with the [[Wikipedia:TeX|TeX]] document production system. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world."
  
From [http://www.tug.org/texlive/ TeX Live - TeX Users Group]:
+
For more information see: [[:Category:TeX]]
  
:''TeX Live is an easy way to get up and running with the [[:Category:TeX (English)|TeX]] document production system. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world.''
+
== Installation ==
 +
The TeX Live packages are arranged into two groups in the [[Official Repositories|official repositories]]:
 +
* {{grp|texlive-most}} includes TeX Live applications.
 +
* {{grp|texlive-lang}} provides various character sets and non-English features.
  
See [[:Category:TeX (English)]] for more information.
+
The essential package {{Pkg|texlive-core}} contains the basic texmf-dist tree, while {{Pkg|texlive-bin}} contains the binaries, libraries, and the texmf tree. {{Pkg|texlive-core}} is based on the “medium” install scheme of the upstream distribution. All other packages are based on the eponymous collections in TeX Live. To determine which CTAN packages are included in each package, lookup the files:
 +
  /var/lib/texmf/arch/installedpkgs/<package>_<revnr>.pkgs
  
Since September 12, 2008, TeX Live packages have been available in [extra] for both architectures, hence replacing the obsolete [http://www.tug.org/tetex/ teTeX]. Packages for the 2009 release of TeX Live have been available since early September 2009 (thus before the official upstream release). By installing the packages {{Package Official|texlive-core}} and its dependency {{Package Official|texlive-bin}}, you will have a very solid and bleeding-edge typesetting system at your disposal!
+
=== texlive-most ===
 +
{| width="100%"
 +
|- valign="top"
 +
|
 +
* {{Pkg|texlive-core}}
 +
* {{Pkg|texlive-bibtexextra}}
 +
* {{Pkg|texlive-fontsextra}}
 +
* {{Pkg|texlive-formatsextra}}
 +
* {{Pkg|texlive-games}}
 +
|
 +
* {{Pkg|texlive-genericextra}}
 +
* {{Pkg|texlive-htmlxml}}
 +
* {{Pkg|texlive-humanities}}
 +
* {{Pkg|texlive-latexextra}}
 +
* {{Pkg|texlive-music}}
 +
|
 +
* {{Pkg|texlive-pictures}}
 +
* {{Pkg|texlive-plainextra}}
 +
* {{Pkg|texlive-pstricks}}
 +
* {{Pkg|texlive-publishers}}
 +
* {{Pkg|texlive-science}}
 +
|}
 +
 
 +
=== texlive-lang ===
 +
* {{Pkg|texlive-langcjk}}
 +
* {{Pkg|texlive-langcyrillic}}
 +
* {{Pkg|texlive-langgreek}}
 +
* {{Pkg|texlive-langextra}}
 +
 
 +
{{note|{{Pkg|texlive-langextra}} provides language support for African, Arabic, Armenian, Croatian, Hebrew, Indic, Mongolian, Tibetan and Vietnamese.}}
 +
 
 +
=== Alternative: TeX Live network install ===
 +
 
 +
Installing TeX Live manually honors the Arch Way in that it gives you much more control and lets you understand the process. It's the only way you can get a full-featured LaTeX distribution under 100 MB that fits your needs without install a thousand of packages you will never use.
 +
 
 +
A detailed guide for TeX Live network install can be found on the [http://en.wikibooks.org/wiki/LaTeX/Installation#Custom_installation_with_TeX_Live LaTeX Wikibook].
 +
 
 +
Information about making TeX Live network install : http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-140003
 +
 
 +
A [https://bbs.archlinux.org/viewtopic.php?id=109427 discussion] of the pros and cons of making the TeX Live network install.
 +
 
 +
For all those programs that require texlive to be installed (e.g. kile) you can use the {{AUR|texlive-dummy}} package from AUR.
  
 
== Important information ==
 
== Important information ==
  
* The way to handle font mappings for updmap has been improved in Sept. 2009, and installation should now be much more reliable than in the past. In the meanwhile, if you encounter error messages about unavailable map file, simply remove them by hand from the {{Filename|updmap.cfg}} file (ideally using {{Codeline|updmap-sys --edit}}). You can also run {{Codeline|updmap-sys --syncwithtrees}} to automatically comment out outdated map lines from the config file.
+
* The way to handle font mappings for updmap has been improved in Sept. 2009, and installation should now be much more reliable than in the past. In the meanwhile, if you encounter error messages about unavailable map file, simply remove them by hand from the {{ic|updmap.cfg}} file (ideally using {{Ic|updmap-sys --edit}}). You can also run {{Ic|updmap-sys --syncwithtrees}} to automatically comment out outdated map lines from the config file.
  
 
* The ConTeXt formats (for MKII and MKIV) are not automatically generated upon installation. See [http://wiki.contextgarden.net '''the ConTeXT wiki'''] for instructions on how to do this.
 
* The ConTeXt formats (for MKII and MKIV) are not automatically generated upon installation. See [http://wiki.contextgarden.net '''the ConTeXT wiki'''] for instructions on how to do this.
Line 20: Line 74:
 
* TeX Live (upstream) now provides a tool for incremental updates of CTAN packages. On that basis, we also plan to update our packages on a regular basis (we have written tools that almost automate that task).
 
* TeX Live (upstream) now provides a tool for incremental updates of CTAN packages. On that basis, we also plan to update our packages on a regular basis (we have written tools that almost automate that task).
  
* Some tools and utilities included in TeX Live rely on {{Package Official|ghostscript}}, {{Package Official|perl}}, and {{Package Official|ruby}}.  
+
* Some tools and utilities included in TeX Live rely on {{Pkg|ghostscript}}, {{Pkg|perl}}, and {{Pkg|ruby}}.  
  
 
* For help and information about TeX Live see: http://tug.org/texlive/doc.html and http://tug.org/texlive/doc/texlive-en/texlive-en.html
 
* For help and information about TeX Live see: http://tug.org/texlive/doc.html and http://tug.org/texlive/doc/texlive-en/texlive-en.html
  
* System-wide configuration files are under {{Filename|/usr/share/texmf-config}}. User-specific ones should be put under {{Filename|~/.texlive/texmf-config}}. {{Codeline|$TEXMFHOME}} is {{Filename|~/texmf}} and {{Codeline|$TEXMFVAR}} is {{Filename|~/.texlive/texmf-var}}.
+
* System-wide configuration files are under {{ic|/usr/share/texmf-config}}. User-specific ones should be put under {{ic|~/.texlive/texmf-config}}. {{Ic|$TEXMFHOME}} is {{ic|~/texmf}} and {{Ic|$TEXMFVAR}} is {{ic|~/.texlive/texmf-var}}.
  
* A skeleton of a local texmf tree is at {{Filename|/usr/local/share/texmf}}: this directory is writable for members of the group '''tex'''.
+
* A skeleton of a local texmf tree is at {{ic|/usr/local/share/texmf}}: this directory is writable for members of the group '''tex'''.
  
 
===Paper Size===
 
===Paper Size===
American users are advised to run
+
If you would like to set the default page size to something other than A4 (such as "Letter"), run the following command:
texconfig
+
  $ texconfig
in order to set the default page size to "Letter", as opposed to A4, the current default. This command is also capable of changing other useful settings.  Not changing this setting can result in slightly flawed output, as the right margin will be bigger than the left.
+
This command is also capable of changing other useful settings.
  
 
===Error with "formats not generated" upon update===
 
===Error with "formats not generated" upon update===
  
See [http://bugs.archlinux.org/task/16467 this bug report]. ('''Note that if you do not use the experimental engine ''LuaTeX'', you can ignore this.''') This situation typically occurs when the configuration files {{Filename|language.def}} and/or {{Filename|language.dat}} for hyphenation patterns contain references to files from earlier releases of {{Codeline|texlive-core}}, in particular to the latest experimental hyphenation patterns for German, whose file name changes frequently. Currently they should point to {{Filename|dehyph{n,t}-x-2009-06-19.tex}}.  
+
See [https://bugs.archlinux.org/task/16467 this bug report]. ('''Note that if you do not use the experimental engine ''LuaTeX'', you can ignore this.''') This situation typically occurs when the configuration files {{ic|language.def}} and/or {{ic|language.dat}} for hyphenation patterns contain references to files from earlier releases of {{Ic|texlive-core}}, in particular to the latest experimental hyphenation patterns for German, whose file name changes frequently. Currently they should point to {{ic|dehyph{n,t}-x-2009-06-19.tex}}.  
  
To solve this, you need to either remove these files: {{Filename|/usr/share/texmf-config/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}}
+
To solve this, you need to either remove these files: {{ic|/usr/share/texmf-config/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}}
or update them using the newest version under: {{Filename|/usr/share/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}}
+
or update them using the newest version under: {{ic|/usr/share/texmf/tex/generic/config/language.<nowiki>{def,dat}</nowiki>}}
 
and then run
 
and then run
 
  # fmtutil-sys --missing
 
  # fmtutil-sys --missing
Line 52: Line 106:
 
   mkfontdir ~/.fonts/OTF (or TTF or Type1)
 
   mkfontdir ~/.fonts/OTF (or TTF or Type1)
  
Alternatively, you can also add a file {{Filename|/etc/fonts/texlive.conf}} that contains a list of the font directories you want to make available system-wide, with a content similar to this:
+
Alternatively, {{Pkg|texlive-bin}} contains the file {{ic|/etc/fonts/conf.avail/09-texlive-fonts.conf}} that contains a list of the font directories used by TeX Live. You can use this file with:
  <?xml version="1.0"?>
+
  <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+
  <fontconfig>
+
    <dir>/usr/share/texmf-dist/fonts/opentype</dir>
+
    <dir>/usr/share/texmf-dist/fonts/truetype</dir>
+
    <dir>/usr/local/share/texmf/fonts/opentype</dir>
+
    <dir>/usr/local/share/texmf/fonts/truetype</dir>
+
  </fontconfig>
+
  
{{Note|This may cause conflicts with XeTeX/XeLaTeX if the same fonts are (separately) available to both TeX and Fontconfig, i.e. if multiple copies of the same font are available on the search path.}}
+
{{bc|# ln -s /etc/fonts/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf}}
  
== List of all texlive-* packages ==
+
And then update fontconfig:
  
The texlive packages are arranged into two groups: '''texlive-most''' and '''texlive-lang'''
+
{{bc|# fc-cache && mkfontscale && mkfontdir}}
(NB: the groups '''texlive-most-doc''' and '''texlive-lang-doc''' are provided in [http://www.archlinux.org/packages/?sort=&arch=&repo=Community&q=texlive community]).
+
  
The essential package '''texlive-core''' contains the basic texmf-dist tree, while '''texlive-bin''' contains the binaries, libraries, and the texmf tree. '''texlive-core''' is based on the “medium” install scheme of the upstream distribution. All other packages are based on the eponymous collections in TeXLive. To determine which CTAN packages are included in each package, lookup the files
+
{{Note|This may cause conflicts with XeTeX/XeLaTeX if the same fonts are (separately) available to both TeX and Fontconfig, i.e. if multiple copies of the same font are available on the search path.}}
  /usr/share/texmf-var/arch/installedpkgs/<package>_<revnr>.pkgs
+
 
+
=== Group texlive-most ===
+
* texlive-bin                   
+
* texlive-core               
+
* texlive-bibtexextra       
+
* texlive-fontsextra         
+
* texlive-formatsextra       
+
* texlive-games             
+
* texlive-genericextra       
+
* texlive-htmlxml           
+
* texlive-humanities         
+
* texlive-latex3           
+
* texlive-latexextra         
+
* texlive-music             
+
* texlive-pictures           
+
* texlive-plainextra         
+
* texlive-pstricks           
+
* texlive-publishers         
+
* texlive-science
+
 
+
=== Group texlive-lang ===
+
* texlive-langcjk         
+
* texlive-langcyrillic
+
* texlive-langgreek         
+
* texlive-langextra
+
 
+
NB: The latter replaces and provides texlive-lang{african, arab, armenian, croatian, hebrew, indic, mongolian, tibetan, vietnamese}.
+
  
 
== TeXLive Local Manager ==
 
== TeXLive Local Manager ==
  
There is now a new utility provided by Firmicus which allows one to conveniently manage a TeXLive installation on Arch Linux.  
+
The TeXLive Local Manager is a utility provided by Firmicus which allows to conveniently manage a TeX Live installation on Arch Linux.
See {{AUR|texlive-localmanager}} in the [[Arch User Repository|AUR]].
+
See {{AUR|texlive-localmanager-git}} in the [[Arch User Repository|AUR]].
 
+
'''NB: The tool is not yet updated for the 2010 packages in [testing].'''
+
  
 
  Usage: tllocalmgr   
 
  Usage: tllocalmgr   
Line 164: Line 179:
 
  texinfo xetex /;
 
  texinfo xetex /;
  
== Manually installing .sty files ==
+
== Install .sty files ==  
Normally, new .sty files go in {{ic|~/texmf/tex/latex/<package name>/*}}. Create this directory if you do not have it. This directory will automatically be searched when *tex is executed. Further discussion can be found here: https://bbs.archlinux.org/viewtopic.php?id=85757
+
TeX Live (and teTeX) uses its own directory indexes (files named {{ic|ls-R}}), and you need to refresh them after you copy something into one of the TeX trees. Or TeX can not see them. Magic command:
 +
mktexlsr
 +
or
 +
texhash
 +
or
 +
texconfig[-sys] rehash
 +
A command line program to search through these indexes is
 +
kpsewhich
 +
Hence you can check that TeX can find a particular file by running
 +
kpsewhich <filename>
 +
The output should be full path to that file.
  
== Installing .sty using PKGBUILDs ==
+
=== Manual Installation  ===
To install a latex package on a global level you should use a PKGBUILD for the sake of simplicity and maintenance. Look at this example.
+
Normally, new .sty files go in {{ic|/usr/share/texmf-dist/tex/latex/<package name>/*}}. Create this directory if you do not have it. This directory will automatically be searched when *tex is executed. Further discussion can be found here: https://bbs.archlinux.org/viewtopic.php?id=85757
 +
 
 +
=== Using PKGBUILDs ===
 +
To install a LaTeX package on a global level, you should use a [[PKGBUILD]] for the sake of simplifying maintenance. Look at this example.
 
<pre>
 
<pre>
 
# Original autor: Martin Kumm <pluto@ls68.de>  
 
# Original autor: Martin Kumm <pluto@ls68.de>  
Line 188: Line 216:
 
build()
 
build()
 
{
 
{
mkdir -p $pkgdir/usr/share/texmf/tex/latex/gantt
+
  mkdir -p $pkgdir/usr/share/texmf/tex/latex/gantt
cp $srcdir/gantt.sty $pkgdir/usr/share/texmf/tex/latex/gantt
+
  cp $srcdir/gantt.sty $pkgdir/usr/share/texmf/tex/latex/gantt
 
}
 
}
 
</pre>
 
</pre>
  
And the .install file:
+
And the {{ic|.install}} file:
 
<pre>
 
<pre>
 
post_install() {
 
post_install() {
Line 211: Line 239:
 
</pre>
 
</pre>
  
From [https://aur.archlinux.org/packages.php?ID=47872 texlive-gantt] aur package
+
From the {{AUR|texlive-gantt}} package in the [[Arch User Repository|AUR]].
 
+
== Alternative: TeX Live network install ==
+
Information about making TexLive network install : http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-140003
+
 
+
A [https://bbs.archlinux.org/viewtopic.php?id=109427 discussion] of the pros and cons of making the TeX Live network install.
+
 
+
== See also ==
+
 
+
For frequently asked qustions about TeX, TeXLive, and how it is packaged on arch, see the [[TeX Live FAQ]]. For basic information on LaTeX see [[LaTeX]]. If you are interested in using CJK (Chinese, Japanese, Korean) characters, see [[TeX Live and CJK]]
+
<!-- vim: set ft=Wikipedia: -->
+

Revision as of 21:00, 4 August 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end TeX Live is an "easy way to get up and running with the TeX document production system. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world."

For more information see: Category:TeX

Installation

The TeX Live packages are arranged into two groups in the official repositories:

The essential package texlive-core contains the basic texmf-dist tree, while texlive-bin contains the binaries, libraries, and the texmf tree. texlive-core is based on the “medium” install scheme of the upstream distribution. All other packages are based on the eponymous collections in TeX Live. To determine which CTAN packages are included in each package, lookup the files:

 /var/lib/texmf/arch/installedpkgs/<package>_<revnr>.pkgs

texlive-most

texlive-lang

Note: texlive-langextra provides language support for African, Arabic, Armenian, Croatian, Hebrew, Indic, Mongolian, Tibetan and Vietnamese.

Alternative: TeX Live network install

Installing TeX Live manually honors the Arch Way in that it gives you much more control and lets you understand the process. It's the only way you can get a full-featured LaTeX distribution under 100 MB that fits your needs without install a thousand of packages you will never use.

A detailed guide for TeX Live network install can be found on the LaTeX Wikibook.

Information about making TeX Live network install : http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-140003

A discussion of the pros and cons of making the TeX Live network install.

For all those programs that require texlive to be installed (e.g. kile) you can use the texlive-dummyAUR package from AUR.

Important information

  • The way to handle font mappings for updmap has been improved in Sept. 2009, and installation should now be much more reliable than in the past. In the meanwhile, if you encounter error messages about unavailable map file, simply remove them by hand from the updmap.cfg file (ideally using updmap-sys --edit). You can also run updmap-sys --syncwithtrees to automatically comment out outdated map lines from the config file.
  • The ConTeXt formats (for MKII and MKIV) are not automatically generated upon installation. See the ConTeXT wiki for instructions on how to do this.
  • TeX Live (upstream) now provides a tool for incremental updates of CTAN packages. On that basis, we also plan to update our packages on a regular basis (we have written tools that almost automate that task).
  • System-wide configuration files are under /usr/share/texmf-config. User-specific ones should be put under ~/.texlive/texmf-config. $TEXMFHOME is ~/texmf and $TEXMFVAR is ~/.texlive/texmf-var.
  • A skeleton of a local texmf tree is at /usr/local/share/texmf: this directory is writable for members of the group tex.

Paper Size

If you would like to set the default page size to something other than A4 (such as "Letter"), run the following command:

$ texconfig

This command is also capable of changing other useful settings.

Error with "formats not generated" upon update

See this bug report. (Note that if you do not use the experimental engine LuaTeX, you can ignore this.) This situation typically occurs when the configuration files language.def and/or language.dat for hyphenation patterns contain references to files from earlier releases of texlive-core, in particular to the latest experimental hyphenation patterns for German, whose file name changes frequently. Currently they should point to dehyph{n,t}-x-2009-06-19.tex.

To solve this, you need to either remove these files: /usr/share/texmf-config/tex/generic/config/language.{def,dat} or update them using the newest version under: /usr/share/texmf/tex/generic/config/language.{def,dat} and then run

# fmtutil-sys --missing

Fonts

By default, the fonts that come with the various TeX Live packages are not automatically available to Fontconfig. If you want to use them with, say XeTeX or LibreOffice, the easiest approach is to make symlinks as follows:

 ln -s /usr/share/texmf-dist/fonts/opentype/public/<some_fonts_you_want> ~/.fonts/OTF/ (or TTF or Type1) 

To make them available to fontconfig, run:

 fc-cache ~/.fonts
 mkfontscale ~/.fonts/OTF (or TTF or Type1) 
 mkfontdir ~/.fonts/OTF (or TTF or Type1)

Alternatively, texlive-bin contains the file /etc/fonts/conf.avail/09-texlive-fonts.conf that contains a list of the font directories used by TeX Live. You can use this file with:

# ln -s /etc/fonts/conf.avail/09-texlive-fonts.conf /etc/fonts/conf.d/09-texlive-fonts.conf

And then update fontconfig:

# fc-cache && mkfontscale && mkfontdir
Note: This may cause conflicts with XeTeX/XeLaTeX if the same fonts are (separately) available to both TeX and Fontconfig, i.e. if multiple copies of the same font are available on the search path.

TeXLive Local Manager

The TeXLive Local Manager is a utility provided by Firmicus which allows to conveniently manage a TeX Live installation on Arch Linux. See texlive-localmanager-gitAUR in the AUR.

Usage: tllocalmgr  
       tllocalmgr [options] [command] [args]

       Running tllocalmgr alone starts the TeXLive local manager shell 
       for Arch Linux. This shell is capable of command-line completion!
       There you can look at the available updates with the command 'status' 
       and you can install individual CTAN packages using 'install' or 'update'
       under $TEXMFLOCAL. This is done by creating a package texlive-local-<pkg>
       and installing it with pacman. Note that this won’t interfere with your 
       standard texlive installation, but files under $TEXMFLOCAL will take
       precedence.  
       
       Here are the commands available in the shell:

Commands:       
              status   --   Current status of TeXLive installation
           shortinfo * --   Print a one-liner description of CTAN packages
                info * --   Print info on CTAN packages
              update * --   Locally update CTAN packages
             install * --   Locally install new CTAN packages
          installdoc * --   Locally install documentation of CTAN packages
          installsrc * --   Locally install sources of CTAN packages
           listfiles * --   List all files in CTAN packages
              search * --   Search info on CTAN packages
         searchfiles * --   Search for files in CTAN packages
             texhash   --   Refresh the TeX file database
               clean   --   Clean local build tree
                help   --   Print helpful information
                quit   --   Quit tllocalmgr

        The commands followed by * take one of more package names as arguments.
        Note that these can be completed automatically by pressing TAB.

        You can also run tllocalmgr as a standard command-line program, with
        one of the above commands as argument, then the corresponding task will
        be performed and the program will exit (except when the command is 'status').

        tllocalmgr accepts the following options:

Options:     --help          Shows this help
             --version       Show the version number
             --forceupdate   Force updating the TeXLive database
             --skipupdate    Skip updating the TeXLive database
             --localsearch   Search only installed packages
             --location      #TODO?
             --mirror        CTAN mirror to use (default is mirror.ctan.org)
             --nocolor       #TODO

Recent "langukenglish" errors

For issues involving this error when trying to run tllocalmgr commands,

Can't get object for collection-langukenglish at /usr/bin/tllocalmgr line 103

See ary0's solution at the AUR: texlive-localmanagerAUR. In summary, edit /usr/share/texmf-var/arch/tlpkg/TeXLive/Arch.pm and remove "langukenglish" from the section of the file shown here:

my @core_colls =
qw/ basic context genericrecommended fontsrecommended langczechslovak
langdutch langfrench langgerman langitalian langpolish langportuguese
langspanish **langukenglish** latex latexrecommended luatex mathextra metapost
texinfo xetex /;

Install .sty files

TeX Live (and teTeX) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Or TeX can not see them. Magic command:

mktexlsr

or

texhash

or

texconfig[-sys] rehash

A command line program to search through these indexes is

kpsewhich

Hence you can check that TeX can find a particular file by running

kpsewhich <filename>

The output should be full path to that file.

Manual Installation

Normally, new .sty files go in /usr/share/texmf-dist/tex/latex/<package name>/*. Create this directory if you do not have it. This directory will automatically be searched when *tex is executed. Further discussion can be found here: https://bbs.archlinux.org/viewtopic.php?id=85757

Using PKGBUILDs

To install a LaTeX package on a global level, you should use a PKGBUILD for the sake of simplifying maintenance. Look at this example.

# Original autor: Martin Kumm <pluto@ls68.de> 
# Maintainer: masterkorp  <masterkorp@gmail.com>    irc: masterkorp at freenode.org
# Last edited: 2nd April 2011

pkgname=texlive-gantt
pkgver=1.3
pkgrel=1
license=('GPL')
depends=('texlive-core')
pkgdesc="A LaTeX package for drawing gantt plots using pgf/tikz"
url="http://www.martin-kumm.de/tex_gantt_package.php"
arch=('any')
install=texlive-gantt.install
source=(http://www.martin-kumm.de/tex/gantt.sty)
md5sums=('e942191eb0024633155aa3188b4bbc06')

build()
{
  mkdir -p $pkgdir/usr/share/texmf/tex/latex/gantt
  cp $srcdir/gantt.sty $pkgdir/usr/share/texmf/tex/latex/gantt
}

And the .install file:

post_install() {
  post_remove
  echo "The file was installed in:"
  kpsewhich gantt.sty
}

post_upgrade() {
  post_install
}

post_remove() {
  echo "Upgrading package database..."
  mktexlsr
}

From the texlive-ganttAUR package in the AUR.