General coding rules and guidelines

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

The general coding rules and guidelines when creating GNML styles are:

Include in the style all the GNML tags that may be globalized, to avoid that a global style, applied on some previous point of text, changes inadvertently the formatting of your style.

Include in the style all the GNML tags that may be defaulted. Do not rely on format default settings - they may be changed, compromising in that way the functioning of your style.

In all GNML styles always include the measurement unit in typographical values. It makes the styles independent of later changes of default measurement units in EdAdmin4.

Use only straight quotation marks withing tags.

Do not put paragraph marks in the paragraph styles - they can cause various typographical problems.

Don't create styles that contain end of paragraph signs: they cause troubles in text justification.

Try not to use the globalizing tag >default< in your styles. Try to work with chained style (<same style>) in paragraph styles instead. See Define chaining of paragraph styles.

Don't forget to add XML coding to each style. If you are not sure what to put, select what you believe it's most suitable from the XML output drop-down list, and then click Write tag.

Test your styles in TED, in a text that contains headline boxes and body columns, or in FRED, in a sample page.