Open main menu

Changes

758 bytes added ,  08:36, 1 November 2021
no edit summary
<cd:keywords delimiters="braces" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:true">ConTeXt code that is included before the inclusion, when the file is found</cd:constant>
</cd:keywords>
<cd:keywords delimiters="braces" ordinal="3">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:false">ConTeXt code that is executed when the file is not found</cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>The command <!-- code>\readfile {filename}{true code}{false code}</code> is replaced by the long description content of the command goes here --text file <code>filename</code>, if it exists. The <code>{true code}</code> is processed before actual inclusion happens. If <code>filename</code> does not exist, the <code>{false code}</code> is processed. When no file extension is specified, the extension <code>.tex</code> is assumed. Similar to the case with project structure commands such as {{cmd|environment}}, {{cmd|readfile}} causes ConTeXt to look in ancestor directories for the specified file.  During execution of the <code>{true code}</code>, the actual found file name is stored in <code>\readfilename</code>. 
</cd:description>
<cd:examples></cd:examples>