Getting Started with Text Formats
Summary:
  • The Curl® language combines text formatting with programming functionality.
  • The main categories of text formatting are character formats and paragraph formats.
  • Curl language text formats are similar to HTML tags, and format options are analogous to HTML attributes.
  • Text formats can be defined within a document, or formats from an external file can be included or imported.
This chapter steps you through some of the common tasks you will perform in creating a document.
Curl language text formats can be considered as the equivalent of HTML tags, with the added feature of your being able to define your own text formats. As text formats are analogous to HTML tags, options are analogous to attributes for HTML tags.
The ability to add and/or redefine existing text formats is very convenient if you want to create the equivalent of HTML stylesheets for your documents.

Editing and Viewing a Simple Document

In this section, you begin working with a sample document that illustrates several text formats:
Curl Inc. strongly recommends that you use the Curl Integrated Development Environment (IDE) to edit the Curl® language. The Source Editor colors elements of the Curl language and formats your source code, making it easier for you to read and review.
You can find example documents for this chapter in:
c:\build\jcurl\docs\default\examples\dguide\markup.zip
See Extended Examples for more information about using this .zip file.
Once you have extracted files from the archive, open the file original.curl in the IDE editor. The source code file contains a line of code that looks something like this:
{curl 6.0 applet}
This line is called a herald. The herald indicates that the file contains a Curl applet and specifies the version of the Curl® API required to run the applet. See Heralds for other forms of the herald.
Comments in the code are indicated by ||. See Comments for other forms of comment syntax.
To view the applet in an Internet browser, using the Curl RTE, select Run File on the IDE Run menu. The file modified.curl contains the document as it will be after you have completed the modifications described in Formatting the Document.
When you have completed all these steps, your modified source code should resemble the source code in the example file modified.curl.