Include the contents of an external manuscript

include

The "include" pragma is used to insert the contents of an external BLUE-PHRASE file into the manuscript.

Syntax

The syntax for the include pragma consists of:

  • An exclamation point !
  • The keyword include
  • A sourceref containing the name of the external manuscript to include.
!include `target`
include pragma syntax

The target may be an absolute path specifying the target from the file system's root, or a relative path, specifying the target using dot notation (.\filename.blue) or dot-dot notation (..\other-dir\filename.blue).

Examples

Here is what an include pragma looks like within the body of a manuscript.

!blue 2.0            
html {
head {
meta *charset=UTF-8
meta *name=viewport *content='width=device-width, initial-scale=1'
link `/css/std-styles.css` *rel=stylesheet *type=text/css
title Predicting Weather
}
body {
!include `header.blue`
h1 Predicting Weather
p Surface temperature differences in turn cause pressure
differences. Higher altitudes are cooler than lower altitudes,
as most atmospheric heating is due to contact with the Earth's
surface while radiative losses to space are mostly constant.
p Weather forecasting is the application of science and
technology to predict the state of the atmosphere for a
future time and a given location. The Earth's weather system
is a chaotic system; as a result, small changes to one part
of the system can grow to have large effects on the system as
a whole.
p Human attempts to control the weather have occurred throughout
history, and there is evidence that human activities such as
agriculture and industry have modified weather patterns.
!include `footer.blue`
}
script `/js/std-script.js`
}
Sample include pragma

syntax > pragmas > includeInclude the contents of an external manuscript

Q