Difference between revisions of "Command/input"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \input")
 
 
Line 20: Line 20:
 
   </cd:command>
 
   </cd:command>
 
</cd:variants>
 
</cd:variants>
<cd:description>
+
<cd:description>The command <code>\input file</code> is replaced by the content of the text file <code>file</code>.
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.
 
When no file extension is specified the extension ''.tex'' is assumed.
Line 37: Line 36:
 
<cd:commandref name="component">to input partial content</cd:commandref>
 
<cd:commandref name="component">to input partial content</cd:commandref>
 
<cd:commandref name="environment">to input a style settings file</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:wikipage page="Dummy text">for other ways to create filler text</cd:wikipage>
 +
<cd:commandref name="getbuffer">to 'input' buffer content</cd:commandref></cd:seealso>
 
</cd:commandgroup>
 
</cd:commandgroup>

Latest revision as of 08:39, 19 November 2021


\input

Summary

The command \input inputs external files

Settings

\input{...}
{...}file

Settings string

\input ...
... file

OptionExplanation
Note: in this format, the argument is terminated by a space character.

Description

The command \input file is replaced by the content of the text file file.

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

Unlike the project structure commands such as \environment and \component, \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 ../ or the equivalent).

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

Typically, \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.

Examples

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: