4 %% This file contains the site specific definitions of the macros
5 %% |\@currdir|, |\input@path| and |\filename@parse|.
7 %% As distributed it only contains comments, however this `empty'
8 %% file will work on many systems because of the automatic tests built
9 %% into |dircheck.dtx|. You \emph{are} allowed to edit this file to add
10 %% definitions of these macros appropriate to your system.
12 %% David Carlisle 1994/12/17
15 % The macros that must be defined are:
17 % \DescribeMacro{\@currdir}
18 % |\@currdir|\meta{filename}\meta{space} should expand to a form of the
19 % filename that uniquely refers to the `current directory' if this is
20 % possible. (The expansion should also end with a space.) on UNIX,
21 % this is |\def\@currdir{./}|. For more exotic operating systems may
22 % want to make |\@currdir| a macro with arguments delimited by |.|
23 % and/or \meta{space}. If the operating system has no concept of
24 % directory structure, this macro should be defined to be empty.
27 % \DescribeMacro{\input@path}
28 % If the primitive |\openin| searches the same directories as the
29 % primitive |\input|, then it is possible to tell (using |\ifeof|)
30 % whether a file exists before trying to input it. For systems like
31 % this, |\input@path| should be left undefined.
33 % If |\openin| does not `follow' |\input| then |\input@path| must be
34 % defined to be a list of directories to search for input files. The
35 % format for each directory is as for |\@currdir|, normally just a
36 % prefix is required, but it may be a macro with space-delimited
37 % argument. That is, if \meta{dir} is an entry in the input path,
38 % TeX will try to load the expansion of
40 % \meta{dir}\meta{filename}\meta{space}
42 % So either \meta{dir} should be defined as a macro with argument
43 % delimited by space, or it should just expand to a directory name,
44 % including the final directory separator, so that it may be
45 % concatenated with the \meta{filename}. This means that for UNIX-like
46 % syntax, each \meta{dir} should end with a slash, |/|. One exception to
47 % this rule is that the input path should \emph{always} contain the
48 % empty directory |{}| as this will allow `full pathnames' to be used,
49 % and the `current directory' to be searched.
51 % |\input@path| should expand to a list of such directories, each in a
54 % \DescribeMacro{\filename@parse}
55 % After a call of the form: |\filename@parse{|\meta{filename}|}|, the
56 % three macros |\filename@area|,|\filename@base|,|\filename@ext| should
57 % be defined to be the `area' (or directory), basename and
58 % extension respectively. If there was no extension specified in
59 % \meta{filename}, |\filename@ext| should be |\let| to |\relax| (so this
60 % case may be tested with |\@ifundefined{filename@ext}| and, perhaps a
61 % default extension substituted).
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 willcover 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.
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
77 % The following sections give examples of definitions which might
78 % work on various systems. These are currently mainly untested as I only
79 % have access to a few systems, all of which do not need this file as
80 % the automatic tests work. All the code is commented out.
82 % \section{UNIX (web2c)}
83 % This implementation does make |\openin| and |\input| look in the same
84 % places. Acceptable settings are made by |dircheck.dtx|, and so this
85 % file may be empty. The definitions below are therefore just for
89 %\let\input@path\@undefined
92 % \section{UNIX (other)}
93 % Apparently some commercial UNIX implementations have different paths
94 % for |\openin| and |\input|. For these one could use definitions like
95 % the following (with whatever directories are used at your site):
96 % note that the directory names should end with |/|.
101 % {/usr/local/lib/tex/inputs/distrib/}%
102 % {/usr/local/lib/tex/inputs/contrib/}%
103 % {/usr/local/lib/tex/inputs/local/}%
107 % \section{MSDOS (emtex)}
108 % This implementation does make |\openin| and |\input| look in the same
109 % places. Acceptable settings are made by |dircheck.dtx|, and so this
110 % file may be empty. The definitions below are therefore just for
114 % \let\input@path\@undefined
117 % \section{MSDOS (other)}
118 % Some PC implementations have different paths
119 % for |\openin| and |\input|. For these one could use definitions like
120 % the following (with whatever directories are used at your site):
121 % note that the directory names should end with |/|.
122 % This assumes the implementation uses UNIX style |/| as the directory
128 % {c:/tex/inputs/distrib/}%
129 % {c:/tex/inputs/contrib/}%
130 % {c:/tex/inputs/local/}%
134 % \section{VMS (???)}
135 % This implementation does make |\openin| and |\input| look in the same
136 % places. Acceptable settings are made by |dircheck.dtx|, and so this
137 % file may be empty. The definitions below are therefore just for
141 % \let\input@path\@undefined
144 % \section{VMS (???)}
145 % Some VMS implementations have different paths
146 % for |\openin| and |\input|. For these one could use definitions like
153 % {[SOME.TEX.DIRECTORY]}%
157 % \section{MACINTOSH (OzTeX 1.6)}
158 % This implementation does make |\openin| and |\input| look in the same
159 % places. Acceptable settings are made by |dircheck.dtx|, and so this
160 % file may be empty. The definitions below are therefore just for
164 % \let\input@path\@undefined
167 % \section{MACINTOSH (other)}
168 % Some Macintosh implementations have different paths
169 % for |\openin| and |\input|. For these one could use definitions like
170 % the following (with whatever folders are used on your machine):
171 % note that the directory names should end with |:|, and they should
172 % contain {\em no\/} spaces.
177 % {Hard-Disk:Applications:TeX:TeX-inputs:}%
178 % {Hard-Disk:Applications:TeX:My-inputs:}%
182 % \section{FAKE EXAMPLE}
183 % This example is for an operating system that has filenames of the
184 % form |<area>name| For maximum compatability with macro sets,
185 % you want |name.ext| to be mapped to |<ext>name|.
186 % and |<area>name.ext| to be mapped to |<area.ext>name|.
187 % |\input| does this mapping automatically, but |\openin| does not, and
188 % does not look in the same places as |\input|.
189 % |<>name| is the desired `current directory' syntax.
191 % the following code would possibly work:
194 % \@d@r{#1}#2..\@nil}
195 % \def\@d@r#1#2.#3.#4\@nil{%
196 % <\ifx\@dir#1\@dir\else#1\ifx\@dir#3\@dir\else.\fi\fi#3>#2 }
198 % \def\@currdir{\@dir{}}