Skip to content

Tag Definition: alias

Generated by rlextra version 3.6.13

Attributes

Name

Required?

Default_Value

Values

id

required

None

value

required

None

Can contain
EMPTY

Purpose

Aliases allow you to assign more than one name to a paragraph style. The alias tag has two required attributes - id and value.

Example usage

<stylesheet>
    <paraStyle name="alreadyDefinedStyleName" .../>
    <initialize>
       <alias id="myNewStyleName" value="alreadyDefinedStyleName"/>
    </initialize>
</stylesheet>
<story>
    <para style="myNewStyleName">Example paragraph</para>
</story>

This can be useful in a number of ways.

You can give a more descriptive name to a style. So you can define a number of paragraph styles called things like "ItalicBold" or "DesignerOneParagraphStyleTwo" in the <stylesheet> for your document. You can then assign aliases to these styles using names that describe the role they fill in your document such as "pictureCaption", "abstract", "acknowledgement" and so on.

If at any point you decide to change the style for that kind of paragraph, you can then change it in one alias rather than in every individual paragraph that uses that style.

It's worth noting that you can use an alias to override a default style with a custom style that you have defined. Note below that the para tag in story doesn't even need to have a style referenced:

<stylesheet>
    <paraStyle name="Regular" .../>
    <initialize>
       <alias id="para.defaultStyle" value="Regular"/>
    </initialize>
</stylesheet>
<story>
    <para>Example paragraph</para>
</story>

Example of nesting path from the parent tags to the current tag

<document> ➔ <stylesheet> ➔ <initialize> ➔ <alias>