Markup

Tags

In traditional typesetting systems, markup instructions are used to facilitate more flexible formatting by composition software. The software accepts and outputs normal characters according to the current style setting, but detects markup characters and interprets them as instructions. Such an instruction, or tag, may for example dictate a switch to another font, or signify a line break, but will not itself appear in the presented text:

Are you going to *ITA Scarborough *ROM fair?


  Are you going to Scarborough fair?

Typesetting languages

Most traditional typesetting languages comprise an allowed list of tags, each one with a pre-defined purpose. Of particular interest, in comparing this approach with XML, is that these systems tend to focus on the appearance of the information, and the language comprises a set of instructions for specifying the appearance and location of the text on the page.

Modern word processors and DTP systems hide markup codes from the author by employing a WYSIWYG (What You See Is What You Get) interface. The markup still exists, in one form or another, though it may take the form of a less intelligible (to humans), more efficient machine-readable scheme. It is an interesting exercise (if not enlightening) to open a word-processor document file using a simple text editor. At best, some words or sentences may be recognizable amongst the unintelligible mess.

Macros

Some typesetting languages allow a commonly used sequence of formatting instructions to be grouped and stored, for reference by a single tag whenever they are needed. The macro concept involves the use of named groups of instructions, called macro definitions, and references (macro calls) to these groups:



This technique introduces the concept of generic coding, because the macro name is likely to reflect its intended use, not the style of the following text. A macro called '*TITLE' has an obvious meaning: it is only necessary to identify a title in the document, and apply this macro to it, not to remember and apply a series of style tags. The document author need not be concerned with either specifying or understanding the formatting codes held in the macro definition. In addition, the author need not be concerned with the final appearance of the title. Most modern word processors and DTP packages have 'stylesheet' definition facilities, which can be considered an equivalent concept.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.130.24