1,391 bytes added
, 08:34, 23 May 2012
{{Reference
|name=continueifinputfile
|attributes=
}}
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\continueifinputfile<span class="first">{...}</span></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">{...}</td>
<td>filename</td>
</tr>
</table>
== Description ==
* If this file is being processed because it was included in another file, stop.
* If ConTeXt was invoked on this file specifically, continue.
* Commonly used to place a test/example section at the end of a module file.
== Example ==
<texcode>
% We write a module, and put it in mymodule.mkiv
%D This module provides the wonderfully useful \mycommand
\define\mycommand#1%
{\tex{mycommand} turns your \quote{#1} into something useful.}
% Everything above was part of the module definitions.
% Everything below is part of the documentation PDF,
% which we only produce if the user runs ConTeXt on this
% file specifically.
\continueifinputfile{mymodule.mkiv}
\starttext
\section{Examples of using \tex{mycommand}}
% ....
\section{On the implementation of \tex{mycommand}}
% ....
\section{Credits}
\stoptext
</texcode>
== See Also ==
* {{cmd|jobname}} simply expands to the name (sans extension) of the file ConTeXt was invoked on.
[[Category:Command/Internals|continueifinputfile]]