Open main menu

Changes

2,351 bytes added ,  08:37, 19 November 2021
Created page with "Documentation for \input"
<cd:commandgroup name="input" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\input</tt> inputs external files
</cd:shortdesc>
<cd:variants>
<cd:command category="structure" file="file-ini.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-file.xml" level="document" name="input" variantnumber="1">
<cd:arguments>
<cd:keywords delimiters="braces" ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="cd:file"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
<cd:command category="structure" file="file-ini.mkvi" interfacedate="2020-07-14T09:24" interfacefile="i-file.xml" level="document" name="input" variant="string" variantnumber="2">
<cd:arguments>
<cd:keywords delimiters="none" ordinal="1">
<cd:keywordsdoc>Note: in this format, the argument is terminated by a space character.</cd:keywordsdoc>
<cd:constant type="cd:file"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd:description>
The command <code>\input file</code> is replaced by the content of the text file <code>file</code>.

When no file extension is specified the extension ''.tex'' is assumed.

Unlike the project structure commands such as {{cmd|environment}} and {{cmd|component}}, {{cmd|input}} will not cause ConTeXt to look in parent directories for the specified file (unless of course the given filename is actually a path beginning with <code>../</code> or the equivalent).

On the other hand, {{cmd|input}} will cause ConTeXt to look for the file in all the system's normal input spots.

Typically, {{cmd|input}} is used to access one of ConTeXt's distribution-supplied sample files for demonstration or debugging purposes. For structured usage (inside books and articles) the actual project structure commands are a better match.</cd:description>
<cd:examples></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="file-ini.mkvi" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Structure"></cd:wikipage>
<cd:commandref name="component">to input partial content</cd:commandref>
<cd:commandref name="environment">to input a style settings file</cd:commandref>
<cd:wikipage page="Dummy text">for other ways to create filler text</cd:wikipage></cd:seealso>
</cd:commandgroup>