diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-filename.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-filename.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-filename.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-filename.html index 447d2c60315..d62c51c2451 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-filename.html +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-filename.html @@ -1,26 +1,26 @@ <head> <title>UK TeX FAQ -- question label filename</title> </head><body> -<h3>What’s the name of this file</h3> +<h3>What’s the name of this file</h3> <p/>One might want this so as to automatically generate a page header or -footer recording what file is being processed. It’s not easy… +footer recording what file is being processed. It’s not easy… <p/>TeX retains what it considers the name of the <em>job</em>, only, in the primitive <code>\</code><code>jobname</code>; this is the name of the file first handed to TeX, stripped of its directory name and of any extension -(such as <code>.tex</code>). If no file was passed (i.e., you’re using +(such as <code>.tex</code>). If no file was passed (i.e., you’re using TeX interactively), <code>\</code><code>jobname</code> has the value <code>texput</code> -(the name that’s given to <code>.log</code> files in this case). +(the name that’s given to <code>.log</code> files in this case). <p/>This is fine, for the case of a small document, held in a single file; most significant documents will be held in a bunch of files, and TeX makes no attempt to keep track of files input to the -<em>job</em>. So the user has to keep track, himself — the only way +<em>job</em>. So the user has to keep track, himself — the only way is to patch the input commands and cause them to retain details of the file name. This is particularly difficult in the case of Plain TeX, since the syntax of the <code>\</code><code>input</code> command is so peculiar. <p/>In the case of LaTeX, the input commands have pretty regular syntax, and the simplest <a href="FAQ-patch.html">patching techniques</a> can be used on them. -<p/>If you’re not inputting things from a file that’s already been input, +<p/>If you’re not inputting things from a file that’s already been input, the job is almost trivial: <blockquote> <pre> @@ -38,7 +38,7 @@ input: it starts pointing at the base file of your document <code>\</code><code>input{</code><em>file</em><code>}</code>. <p/>Most ordinary users will quickly become irritated with the simplicity of of the <code>\</code><code>ThisFile</code> mechanism above. The following code is more -cunning: it maintains details of the files you’ve ‘come through’ to +cunning: it maintains details of the files you’ve ‘come through’ to get to where you are, and it restores <code>\</code><code>ThisFile</code> to what the previous file was before returning. <blockquote> @@ -74,10 +74,10 @@ To do the same for <code>\</code><code>include</code>, we need the simple additi </blockquote><p> Both examples of patching <code>\</code><code>input</code> assume you always use LaTeX syntax, i.e., always use braces around the argument. -<p/>The <i>FiNK</i> (“File Name Keeper”) package provides a +<p/>The <i>FiNK</i> (“File Name Keeper”) package provides a regular means of keeping track of the current file name (with its extension), in a macro <code>\</code><code>finkfile</code>. If you need the unadorned file -name (without its ‘<code>.tex</code>’), use the commands: +name (without its ‘<code>.tex</code>’), use the commands: <blockquote> <pre> \def\striptexext#1.tex{#1} |