1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="tex-path" xreflabel="Setting the PATH for TeX Live">
|
---|
9 | <?dbhtml filename="tex-path.html"?>
|
---|
10 |
|
---|
11 |
|
---|
12 | <title>Setting the PATH for TeX Live</title>
|
---|
13 |
|
---|
14 | <para>
|
---|
15 | Upstream prefers to install in <filename
|
---|
16 | class="directory">/usr/local</filename> but the BLFS editors regard that as
|
---|
17 | inconvenient, and think using <filename
|
---|
18 | class="directory">/opt/texlive</filename> is more appropriate. Originally
|
---|
19 | BLFS used a full binary install to bootstrap the source install, so the
|
---|
20 | same prefix is used for both.
|
---|
21 | </para>
|
---|
22 |
|
---|
23 | <para>
|
---|
24 | Before starting to build TeX Live, set up your PATH so
|
---|
25 | that the system can properly find the files. If you set up your login
|
---|
26 | scripts as recommended in <xref linkend='postlfs-config-profile'/>, update
|
---|
27 | the needed paths by creating the
|
---|
28 | <filename>texlive.sh</filename> script. The programs are always
|
---|
29 | installed in an <ARCH>-linux subdirectory and on 32-bit x86 this is
|
---|
30 | always i386-linux. For x86_64 and i?86 we can generate this as $TEXARCH:
|
---|
31 | </para>
|
---|
32 |
|
---|
33 | <note>
|
---|
34 | <para>
|
---|
35 | If upgrading from a previous year's version, you should manually
|
---|
36 | edit <filename>texlive.sh</filename> to ensure that the version for
|
---|
37 | the year you wish to use is the only TeX present (some people need to
|
---|
38 | keep multiple years available to ensure there are no regressions in
|
---|
39 | their documents).
|
---|
40 | </para>
|
---|
41 | </note>
|
---|
42 |
|
---|
43 | <!-- EOF should NOT be in double quotes, we want it to evaluate $TEXARCH -->
|
---|
44 | <!-- this is also in texlive.xml -->
|
---|
45 | <para>Now, create the texlive.sh script as the &root; user:</para>
|
---|
46 |
|
---|
47 | <screen role="root"><userinput>TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/')
|
---|
48 |
|
---|
49 | cat > /etc/profile.d/texlive.sh << EOF
|
---|
50 | <literal># Begin texlive setup
|
---|
51 | TEXLIVE_PREFIX=/opt/texlive/&texlive-year;
|
---|
52 | export TEXLIVE_PREFIX
|
---|
53 |
|
---|
54 | pathappend \$TEXLIVE_PREFIX/texmf-dist/doc/info INFOPATH
|
---|
55 | pathappend \$TEXLIVE_PREFIX/bin/$TEXARCH
|
---|
56 |
|
---|
57 | TEXMFCNF=\$TEXLIVE_PREFIX/texmf-dist/web2c
|
---|
58 | export TEXMFCNF
|
---|
59 |
|
---|
60 | # End texlive setup</literal>
|
---|
61 | EOF
|
---|
62 |
|
---|
63 | unset TEXARCH</userinput></screen>
|
---|
64 |
|
---|
65 | <note>
|
---|
66 | <para>
|
---|
67 | The backslashes before the dollar signs in the script above are to
|
---|
68 | facilitate a copy/paste operation. The backslashes should not
|
---|
69 | appear in the actual script.
|
---|
70 | </para>
|
---|
71 | </note>
|
---|
72 |
|
---|
73 | <para>
|
---|
74 | The new paths can be immediately activated by running:
|
---|
75 | </para>
|
---|
76 |
|
---|
77 | <screen><userinput>source /etc/profile</userinput></screen>
|
---|
78 |
|
---|
79 | <para>
|
---|
80 | You should now proceed either to <xref linkend="tl-installer"/> for
|
---|
81 | a binary installation of texlive, or to <xref linkend="texlive"/> to begin
|
---|
82 | installing from source.
|
---|
83 | </para>
|
---|
84 |
|
---|
85 | </sect1>
|
---|