summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-what-TDS.html
blob: a6e44a2149f7c65a3279d230635c2d7ff0a5c6e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<head>
<title>UK TeX FAQ -- question label what-TDS</title>
</head><body>
<h3>Which tree to use</h3>
<p/>In almost all cases, new material that you install should go into the
&ldquo;local&rdquo; tree of your (La)TeX installation.  (A discussion of
reasons <em>not</em> to use the local tree appears below.)
<p/>On a Unix(-alike) system, using teTeX or TeX Live, the root
directory will be named something like <i>/usr/share/texmf-local/</i>
or <i>/usr/local/share/texmf/</i>
You can ask such a system where it believes a local tree should be:
<blockquote>
<pre>
kpsewhich -expand-var "\$TEXMFLOCAL"
</pre>
</blockquote><p>
the output being the actual path, for example (on the workstation the
author is using today):
<blockquote>
<pre>
/usr/local/share/texmf
</pre>
</blockquote><p>
<p/>In a MiKTeX installation, the location will in fact typically be
something you specified yourself when you installed MiKTeX in the
first place, but you may find you need to create one.  The MiKTeX
&ldquo;Settings&rdquo; window (
  <code>Start</code>-&gt; 
  <code>Programs</code>-&gt; 
  <code>MiKTeX</code>-&gt; 
  <code>Settings</code>)
has a tab &ldquo;<code>Roots</code>&rdquo;; that tab gives a list of current
TDS roots (they&rsquo;re typically not called
<code>texmf</code>-anything).  If there&rsquo;s not one there with
&ldquo;<code>local</code>&rdquo; in its name, create an appropriate one (see below),
and register it using the window&rsquo;s
&ldquo;<code>Add</code>&rdquo; button.
<p/>The 
<a href="http://docs.miktex.org/faq/maintenance.html">MiKTeX FAQ</a>
suggests that you should create 
&ldquo;<code>C:\Local TeX Files</code>&rdquo;, which is good if you
manage your own machine, but often not even possible in corporate, or
similar, environments ­&ndash; in such situations, the user may have no
control over the hard disc of the computer, at all.
<p/>So the real criterion is that your local tree should be somewhere that
<em>you</em>, rather than the system, control.  Restrictive systems often
provide a &ldquo;home directory&rdquo; for each user, mounted as a network
drive; this is a natural home for the user&rsquo;s local tree.  Other (often
academic) environments assume the user is going to provide a memory
stick, and will assign it a defined drive letter ­&ndash; another good
candidate location.  Note that the semantics of such a tree are
indistinguishable from those of a 
<a href="FAQ-privinst.html">&ldquo;home&rdquo; TEXMF tree</a>.
<p/>There are circumstances when you might not wish to use the &lsquo;local&rsquo; tree:
<ul>
<li> if the package, or whatever, is &ldquo;personal&rdquo; (for example,
  something commercial that has been licensed to you alone, or
  something you&rsquo;re developing yourself), the package should go in your
  <a href="FAQ-privinst.html">&ldquo;home&rdquo; TEXMF tree</a>;
<li> if you <em>know</em> that the package you are installing is a
  replacement for the copy on the TEXMF tree of your (La)TeX
  distribution, you should replace the existing copy in the
  TEXMF tree.
</ul>
The reason one would put things on a local tree is to avoid their
disappearance if the system is upgraded (or otherwise re-installed).
<p/>The reason one might place upgrades the distribution&rsquo;s main tree is to
avoid confusion.  Suppose you were to place the file on the local
tree, and then install a new version of the distribution &mdash; you might
have an effect like:
<ul>
<li> distribution comes with package version n;
<li> you install package version n+1 on the local tree; and
<li> the updated distribution comes with package version n+2.
</ul>
In such a situation, you will find yourself using version
n+1 (from the local tree) <em>after</em> the new
distribution has been installed.
<p/>If you install in the local tree, the only way to avoid such problems
is to carefully purge the local tree when installing a new
distribution.  This is tedious, if you&rsquo;re maintaining a large
installation.
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=what-TDS">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=what-TDS</a>
</body>