XMetaL Tips and Tricks

XMetaL Community Forum XMetaL Tips and Tricks Mapping Bold, Italic, and Underline toolbar buttons to attributes

  • Su-Laine Yeo

    Mapping Bold, Italic, and Underline toolbar buttons to attributes

    Participants 1
    Replies 0
    Last Activity 12 years, 8 months ago

    You can configure XMetaL to map the B, I, and U (Bold, Italic, and Underline) toolbar buttons to particular elements, by editing the .CTM file for your customization. For example, the following code in the .CTM file says that is the element type for bold, for italic, and for underline:

    [code]
       
          b
       

       
          i
       

       
          u
       

     
    [/code]

    In some schemas, formatting is expressed as attributes rather than as elements. For example, bold may be expressed as , italic as  , and underline as  .

    If your schema does this, you can still use the B, I, and U toolbar buttons to insert the appropriate markup, however it cannot be done through the .CTM file, and it requires scripting. 

    XMetaL Author 6.0 has an example of such a script for DocBook documents. To see it, click Help > Samples > Anatomy and Physiology (Docbook) and use the B, I, and U toolbar buttons there. The code behind it is in the docbookxi.js file and the  docbookxi.mcr file in C:Program FilesXMetaL 6.0AuthorRulesDocBook5.0xi. You are free to copy this code for any other customization in XMetaL.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support