HomeMiscellaneousMiscellaneousMacros
User Manual UDO > The UDO syntax > Miscellaneous Index

Split documents

UDO offers you the commands !include, !input, !vinclude and !rinclude. With these commands you are enabled to split up a document into many files that are included by a main file. Furthermore you can use these commands to include an often used passage that you have to type only once.

This documentation uses this commands intensively. The file udo.u doesn't contain any text and just includes other files. So I have the possibility to find some passages more fast if I have to change the documentation.

You can use !include wherever you want. So you can define macros, definitions or Hyphenation patterns in external files that can be used by other files, too.

For displaying the preformatted contents of a file you can use the !vinclude command (verbatim include). You can use this command e.g. for displaying source files or header files.

If you want to include special commands for a destination format like difficult tables for LaTeX or HTML you can use the !rinclude command (raw include).

Possible examples of use:

  1. When writing large source files you can edit a separate file for each chapter that are included by a main file with !include. Thus you can restructure your text by simply moving one line of the main file.
  2. If you split up your text into several file that are included by a main file you can speed up looking for errors because you can simply switch off some parts of the text by commenting out one line of the main file.
  3. Together with macros you can write standardized texts that you can use for many projects. E.g. you can edit a standard disclaimer where the name of the software is replaced by macros that are defined by the main file.
  4. A documentation can be written by different persons. Each author can test his own file with UDO. If everybody has finished his work all files will be included by a main file.
  5. With !vinclude and !tabwidth you can add source code to your documentation. This is great for a documentation of a source code or a library.

Warning: Avoid constructions like these which cause infinite loops:

a.ui: !include b.ui
b.ui: !include a.ui

or

a.ui: !include b.ui
b.ui: !include c.ui
c.ui: !include a.ui

UDO cannot recognize such overcross references. You get only a (less informative) error message memory allocation failed.


Copyright © www.udo-open-source.org (Contact)
Last updated on May 19, 2014

HomeMiscellaneousMiscellaneousMacros