[Prev]

3.10 Including other files into document

File inclusion facilty of PlainDoc is a very powerful way to assemble large documents from smaller bits and pieces. Typically you would have one .pd file for each chapter and then a master document that pulls them all together.

To include a file you simply enclose its name in double angle brackets (n.b. we had to insert a space between the angle brackets to prevent their special interpretation here).

  < <path.ext> >
  < <includerange: path.ext: start-end> >

The includerange tag allows you to include only selected lines from the other file. Line numbers are zero based (i.e. first line is 0) and both must be specified, however it's ok for the end to be out of range, e.g. use 9999 to include everything until the end of the file.

Generally all includes are processed in a special preprocessing step before other tags and formatting are processed.


[Prev | Next]
.