7 The \sourceinputbase command

If you want to present to the reader a certain view of the source code, relative and absolute path names may be not enough for the \sourceinput command. In this case you can use the command:

\sourceinputbase{ pathname}

It defines a global path prefix for all \sourceinput commands which follow in the same file. You can reset this path prefix by calling \sourceinputbase{ } with a zero length argument. Like the \sourceinput command, the \sourceinputbase command must be in its own line and may be preceded only by whitespace. This command has file scope.

Notice that automatic references between nested code sequences (see section 8.2) will work only if the code sequences have been included with the same path prefix. This is because of the algorithm which automatically generates the labels for nested code sequences. It uses the pathname of the file from which a code sequence has been included as a part of the generated label name.



Volker Simonis 2003-03-05