writes

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 14:39

Description

This tag inserts a typographical variable of string type in text (See GNML variables for the list of variables), or a custom string attribute values, for edition and page objects (GN4-1808, available since 2.0.1977.x, see Custom edition/page/text attributes in tags for details), or a substring (available since the version 2.4).

Parameters and typographical expressions

A GNML variable of string type or a custom string attribute value.

The starting character (the first one has the index 0) - since the GN4 version 2.4. If skipped, it starts from the first character.

The number of characters - since the GN4 version 2.4. If skipped, it displays the entire string.

Note: The entire edition, page and text objects set of "value kind" attributes (ie: no reference) are available as string justification variables, prefixed, for edition attributes, by "ed_" for page attributes, by "pg_", for text attributes, by tx_, therefore named as "ed_attrName", "pg_attrName", "tx_attrName (case sensitive), for example:

>writes ed_descName<

>writes pg_descName<

>writes pg_id<

>writes tx_id<

Other available variables are:

TextName

Name of text

TextDesc

Description of text

ENumberName

Name of edition number and edition name

PageSectionName

Name of the page's section.

PageZoneName

Name of the page's zone.

About substringing

You can extract just a substring from writes. Added two optional parameters to display a substring of the provided variable. The two parameters are the starting char (starting from 0) and the length. For example suppose that the section name is "Economy", the command >writes Page Section Name,0,4< will display "Econ". This is useful when computing extra attributes with custom values with Tag Scripts.dll, a single attribute can be done instead of multiple.

Tag Effects

Effects are visible in the WYSIWYG pane of the Articles main tab or on a page on the Pages main tab. However, because this tag may change the way how the text lines are justified, its effect is indirectly visible in the source pane of the Articles or Pages main tab.

The type and scope

Can be inserted anywhere in text. Local for the paragraph where is inserted, therefore effects cease on the end of that paragraph. Cannot be globalized.

See also Variable Insertion in Text >writei..<.