[NTG-context] Re: filename

Hans Hagen ntg-context@ntg.nl
Wed Jun 23 17:09:11 CEST 2004


Patrick Gundlach wrote:

>Hello Hans,
>
>  
>
>>>Well, I don't think you can do this. You can only get the name of the
>>>main TeX file by using \jobname, but thats all. (Hopefully I didn't
>>>miss some secret.) Different approach: put some info in your file with
>>>a macro like \define\thisfile{/path/to/test.tex}. Or you can put some RCS
>>>information in your file for example.
>>> 
>>>      
>>>
>>of course you missed a few secret:
>>
>>\inputfilename
>>\outputfilename
>>\jobfilesuffix
>>    
>>
>
>  
>
>>don't look at the code, some catcode mess is involved
>>    
>>
>
>OK, I didn't. But the above still gives me the name of the main file
>only:
>  
>
there is also \currentfile

>\starttext
>\startlines
>\inputfilename
>\outputfilename
>\jobfilesuffix
>\stoplines
>\input included
>\readfile{included}{}{}
>\stoptext
>
>and in included.tex:
>Included file:
>\startlines
>\inputfilename
>\outputfilename
>\jobfilesuffix
>\stoplines
>
>gives me:
>
>test.tex
>test
>tex
>
>Included file:
>test.tex
>test
>tex
>
>Included file:
>test.tex
>test
>tex
>
>
>Patrick
>  
>


-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------




More information about the ntg-context mailing list