Debian Codegraph @

texmf-dist/tex/latex/base/texsys.cfg

raw
1 % \subsection{texsys.cfg}
2 %
3 % This file contains the site specific definitions of the four macros\\
4 % |\@currdir|, |\input@path|, |\filename@parse| and |\@TeXversion|.
5 %
6 % As distributed it only contains comments, however this `empty'
7 % file will work on many systems because of the automatic tests built
8 % into |ltdirchk.dtx|. You \emph{are} allowed to edit this file to add
9 % definitions of these macros appropriate to your system.
10 %
11 %
12 % The macros that must be defined are:
13 %
14 % \DescribeMacro{\@currdir}
15 % |\@currdir|\meta{filename}\meta{space} should expand to a form of the
16 % filename that uniquely refers to the `current directory' if this is
17 % possible. (The expansion should also end with a space.) on UNIX,
18 % this is |\def\@currdir{./}|. For more exotic operating systems you may
19 % want to make |\@currdir| a macro with arguments delimited by |.|
20 % and/or \meta{space}. If the operating system has no concept of
21 % directory structure, this macro should be defined to be empty.
22 %
23 %
24 % \DescribeMacro{\input@path}
25 % If the primitive |\openin| searches the same directories as the
26 % primitive |\input|, then it is possible to tell (using |\ifeof|)
27 % whether a file exists before trying to input it. For systems like
28 % this, |\input@path| should be left undefined.
29 %
30 % If |\openin| does not `follow' |\input| then |\input@path| must be
31 % defined to be a list of directories to search for input files. The
32 % format for each directory is as for |\@currdir|, normally just a
33 % prefix is required, but it may be a macro with space-delimited
34 % argument. That is, if \meta{dir} is an entry in the input path,
35 % \TeX will try to load the expansion of
36 %
37 % \meta{dir}\meta{filename}\meta{space}
38 %
39 % So either \meta{dir} should be defined as a macro with argument
40 % delimited by space, or it should just expand to a directory name,
41 % including the final directory separator, so that it may be
42 % concatenated with the \meta{filename}. This means that for UNIX-like
43 % syntax, each \meta{dir} should end with a slash, |/|. One exception to
44 % this rule is that the input path should \emph{always} contain the
45 % empty directory |{}| as this will allow `full pathnames' to be used,
46 % and the `current directory' to be searched.
47 %
48 % |\input@path| should expand to a list of such directories, each in a
49 % |{}| group.
50 %
51 %
52 % \begin{sloppypar}
53 % \DescribeMacro{\filename@parse}
54 % After a call of the form: |\filename@parse{|\meta{filename}|}|, the
55 % three macros |\filename@area|, |\filename@base|, |\filename@ext| should
56 % be defined to be the `area' (or directory), basename and
57 % extension respectively. If there was no extension specified in
58 % \meta{filename}, |\filename@ext| should be |\let| to |\relax| (so this
59 % case may be tested with |\@ifundefined{filename@ext}| and, perhaps a
60 % default extension substituted).
61 % \end{sloppypar}
62 %
63 % Normally one would not need to define this macro in |texsys.cfg| as
64 % the automatic tests can supply parsers that work with UNIX and VMS
65 % syntax, as well as a basic parser that will cover many other cases.
66 % However some operating systems may need a `hand produced' parser
67 % in which case it should be defined in this file.
68 %
69 % The UNIX parser also works for most MSDOS \TeX\ versions.
70 % Currently if the UNIX or VMS parser is not used, |\filename@parse| is
71 % defined to always return an empty area, and to split the argument into
72 % basename and extension at the first `|.|' that occurs in the name.
73 % Parsers for other formats may be defined in |texsys.cfg|,
74 % in which case they will be used in preference to the default
75 % definitions.
76 %
77 %
78 % \DescribeMacro{\@TeXversion}
79 % You should not need to set this macro in |texsys.cfg|. \LaTeX\
80 % tests to set this automatically. See the comments in the opening
81 % section of \texttt{ltdirchk.dtx}.
82 %
83 %
84 % The following sections give examples of definitions which might
85 % work on various systems. These are currently mainly untested as I only
86 % have access to a few systems, all of which do not need this file as
87 % the automatic tests work. All the code is commented out.
88 %
89 % \subsection{UNIX (web2c)}
90 % This implementation does make |\openin| and |\input| look in the same
91 % places. Acceptable settings are made by |ltdirchk.dtx|, and so this
92 % file may be empty. The definitions below are therefore just for
93 % information.
94 % \begin{macrocode}
95 %\def\@currdir{./}
96 %\let\input@path\@undefined
97 % \end{macrocode}
98 %
99 % \subsection{UNIX (other)}
100 % Apparently some commercial UNIX implementations have different paths
101 % for |\openin| and |\input|. For these one could use definitions like
102 % the following (with whatever directories are used at your site):
103 % note that the directory names should end with |/|.
104 % \begin{macrocode}
105 % \def\@currdir{./}
106 % \def\input@path{%
107 % {/usr/local/lib/tex/inputs/distrib/}%
108 % {/usr/local/lib/tex/inputs/contrib/}%
109 % {/usr/local/lib/tex/inputs/local/}%
110 % }
111 % \end{macrocode}
112 %
113 % \subsection{MSDOS (emtex)}
114 % This implementation does make |\openin| and |\input| look in the same
115 % places. Acceptable settings are made by |ltdirchk.dtx|, and so this
116 % file may be empty. The definitions below are therefore just for
117 % information.
118 % \begin{macrocode}
119 % \def\@currdir{./}
120 % \let\input@path\@undefined
121 % \end{macrocode}
122 %
123 % \subsection{MSDOS (other)}
124 % Some PC implementations have different paths
125 % for |\openin| and |\input|. For these one could use definitions like
126 % the following (with whatever directories are used at your site):
127 % note that the directory names should end with |/|.
128 % This assumes the implementation uses UNIX style |/| as the directory
129 % separator.
130 % \begin{macrocode}
131 % \def\@currdir{./}
132 % \def\input@path{%
133 % {c:/tex/inputs/distrib/}%
134 % {c:/tex/inputs/contrib/}%
135 % {c:/tex/inputs/local/}%
136 % }
137 % \end{macrocode}
138 %
139 % \subsection{VMS (DECUS \TeX, PD VMS 3.6)}
140 % This implementation does make |\openin| and |\input| look in the same
141 % places. Acceptable settings are made by |ltdirchk.dtx|, and so this
142 % file may be empty. The definitions below are therefore just for
143 % information.
144 % \begin{macrocode}
145 % \def\@currdir{[]}
146 % \let\input@path\@undefined
147 % \end{macrocode}
148 %
149 % \subsection{VMS (???)}
150 % Some VMS implementations have different paths
151 % for |\openin| and |\input|. For these one could use definitions like
152 % the following:
153 % \begin{macrocode}
154 % \def\@currdir{[]}
155 % \def\input@path{%
156 % {tex_inputs:}%
157 % {SOMEDISK:[SOME.TEX.DIRECTORY]}%
158 % }
159 % \end{macrocode}
160 %
161 % \subsection{MACINTOSH (OzTeX 1.6)}
162 % This implementation does make |\openin| and |\input| look in the same
163 % places. Acceptable settings are made by |ltdirchk.dtx|, and so this
164 % file may be empty. The definitions below are therefore just for
165 % information.
166 % \begin{macrocode}
167 % \def\@currdir{:}
168 % \let\input@path\@undefined
169 % \end{macrocode}
170 %
171 % \subsection{MACINTOSH (other)}
172 % Some Macintosh implementations have different paths
173 % for |\openin| and |\input|. For these one could use definitions like
174 % the following (with whatever folders are used on your machine):
175 % note that the directory names should end with |:|, and they should
176 % contain {\em no\/} spaces.
177 % \begin{macrocode}
178 % \def\@currdir{:}
179 % \def\input@path{%
180 % {Hard-Disk:Applications:TeX:TeX-inputs:}%
181 % {Hard-Disk:Applications:TeX:My-inputs:}%
182 % }
183 % \end{macrocode}
184 %
185 % \subsection{FAKE EXAMPLE}
186 % This example is for an operating system that has filenames of the
187 % form |<area>name| For maximum compatibility with macro sets,
188 % you want |name.ext| to be mapped to |<ext>name|.
189 % and |<area>name.ext| to be mapped to |<area.ext>name|.
190 % |\input| does this mapping automatically, but |\openin| does not, and
191 % does not look in the same places as |\input|.
192 % |<>name| is the desired `current directory' syntax.
193 %
194 % the following code would possibly work:
195 % \begin{macrocode}
196 % \def\@dir#1#2 {%
197 % \@d@r{#1}#2..\@nil}
198 % \def\@d@r#1#2.#3.#4\@nil{%
199 % <\ifx\@dir#1\@dir\else#1\ifx\@dir#3\@dir\else.\fi\fi#3>#2 }
200 %
201 % \def\@currdir{\@dir{}}
202 % \def\input@path{%
203 % {\@dir{area.one}}%
204 % {\@dir{area.two}}%
205 % }
206 % \end{macrocode}