Contents Previous Next

%%infile

The %%infile macro expands to the source file location on the system. It is useful to make those "see the source of this file" links on HTML pages. Providing such link is a friendly attitude with beginners, so they can use your source as a sample for their own page.

This macro accepts the following formatting directives:

%<char>DescriptionOutput for this User Guide source
%fFile nameuserguide.t2t
%FFile name (without extension) userguide
%eFile extensiont2t
%pAbsolute file path /a/txt2tags/svn/doc/English/userguide/userguide.t2t
%dFile path (directories only) /a/txt2tags/svn/doc/English/userguide
%DFile path (parent dir only) userguide
%%Literal percent char%

Examples:

Source-->Expanded
This Guide parent dir is %%infile(%D). -->This Guide parent dir is userguide.
I do use the %%infile(%e) file extension. -->I do use the t2t file extension.
[See the source %%infile]--> See the source
Converted to XHTML, I'll be %%infile(%F).xhtml -->Converted to XHTML, I'll be userguide.xhtml
Note: The macro is expanded to "-" if the source file is STDIN.

Contents Previous Next