Appendix D. Theme Tags
188
D.23. Alignment and language direction
Tag
Description
%al
Align the text left
%aL
Align the text left, or to the right if RTL language is in use
%ac
Centre the text
%ar
Align the text right
%aR
Align the text right, or to the left if RTL language is in use
%ax
The next tag should follow the set language direction. When
prepended to a viewport declaration, the viewport will be
horizontally mirrored if the user language is set to a RTL
language. Currently the %Cl, %V and %Vl tags support this.
%Sr
Use as a conditional to define options for left to right, or right
to left languages. %?Sr<RTL|LTR>
All alignment tags may be present in one line, but they need to be in the order left –
centre – right. If the aligned texts overlap, they are merged.
Example:
%ax%V(...)
D.24. Conditional Tags
Tag
Description
%?xx<true|false>
If / Else: Evaluate for true or false case
%?xx<alt1|alt2|
alt3|...|else>
Enumerations: Evaluate for first / second / third / . . . / last
condition
%if(tag,
operator,
operand, [option
count])
Allows very simple comparisons with other tags.
tag
: the tag to check against.
operator
: the comparison to perform - possible options are
=, !=, >, >=, <, <=
operand
: either a second tag, a number, or text.
[option count]
: optional parameter used to select which pa-
rameter of a tag to use when the tag has multiple options, e.g.
%?pv<a|b|c|d>
%and(tag1, tag2,
..., tagN)
Logical “and” operator. Will be evaluate to true if all the tag
parameters are true.
%or(tag1, tag2,
..., tagN)
Logical “or” operator. Will be evaluate to true if any of the
tag parameters are true.
Examples of the %if tag:
The Rockbox manual
(version 3.14)
Sansa Clip v2