Libraries and References

The functionality in any document depends upon which libraries are referenced. A reference is an entry shown in the Document Explorer that indicates that the specified library is loaded into the current document. Libraries serve as a container for definitions of objects, commands and functionality.

When a document references a library, the corresponding library and the functionality within that library are added to the document under the Libraries section of the Document Explorer. Because most of the functionality for expression creation and manipulation is contained within libraries, there is almost always at least one library referenced in every document. By default, the Math.eql library is referenced in all new documents. Library files have the .eql file extension.

The list of references and the corresponding libraries is displayed in the Document Explorer. To view the Document Explorer, select View > Document Explorer from the main menu or press Shift + F2.

The distinction between libraries and references exists because referencing a single library can result in multiple libraries being loaded into the document. This happens because libraries can also contain references to additional libraries.

For example, the base libraries are:

  • Basics.eql
  • Core.eql
  • Math.eql
  • Trig.eql
  • Calc.eql

Each of the libraries in the this list builds on the functionality in the previous library. That is, the Calc.eql library references the Trig.eql file, Trig.eql references Math.eql, and so on. So adding a single reference to Calc.eql in a new document will result in 5 libraries being listed in the Document Explorer. All of the other libraries are added automatically.

When the Calc.eql file is referenced in a document, the Calc.eql library and all the libraries referenced by the Calc.eql library are listed in the Libraries section, while only Calc.eql is listed under References.

Typically, if you are going to create new objects and functionality, you should create them in a new library. New functionality for a document can be added directly in the Document Explorer, but if you take that approach, that functionality is only available in the current document. Creating new functionality in a separate library makes it easy to make that functionality available to other documents.

Libraries can be loaded either from a local directory or from an online location. See the Library Locations and References topic for more details.

In addition to libraries loaded based on the references in the document, the Libraries list also includes an Autogenerated Objects library. This library includes object definitions for built in functions, types, namespaces, and colors. It also includes an object definition for each of the libraries that are currently loaded in the document. The Autogenerated Objects library is populated during the build process.

Libraries can be located on a local drive or they can be located online. Online libraries can't be edited. If you want to change or extend the functionality of the existing libraries, you can almost always do that by creating your own library and extending or overriding the existing functionality.