q

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

Description

This tag aligns the last line of the paragraph. Please note that all other line but the last one are aligned with a tag >pa..<.

Parameters and typographical expressions

1.Alignment mode. 0 means justified, 1 centred, 2 right and 3 left.

2.Application mode. 1 means apply also on lines with soft-return, 0 means only on lines with hard return.

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.

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. May be globalized, by appending the >default< tag after, but only before any printable character.

Remarks

If you are using this tag in a variable style, assuming the first parameter of the style is paragraph alignment >pa...<, you can optimize the usage by the following syntax:

>pa #1<>q (#1=0) ? 3: #1<

This solution uses the GNML conditional expressions, and the part related to >q..< tag should be read as follows:

>tagname (test) ? Return_value_when_test=True : Return_value_when_test=False<

(#1=0)    this is a test, i.e If #1 is 0; it can return true (it means #1=0) or false (it means #1<>0)

?             this  sign delimits the part of test and the part of reactions to test

3             REACTION ON TRUE: if the test returns true, e.g. #1=0 i.e. justified, return 3 as parameter for q, i.e. make it LEFT

:               this delimits reaction on TRUE from reaction of FALSE

#1           REACTION ON FALSE: if the test returns false, e.g. #1 is not 0, then return the value which is the same as first parameter, e.g. centred for centred and so on.