DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion How do I modify which elements are inserted when pressing Enter in DITA Tasks?

  • santhoshkumarr

    How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    Participants 6
    Replies 7
    Last Activity 12 years, 6 months ago

    Hi Derek,

    Could you please help me with this issue:

    In a Task topic file, when I add a “step” element i don't want the “stepresult” element to add automatically. How do i fix this in XMetaL DITA?

    Best Regards,
    Santhosh.

    Reply

    mag3737

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    1. Save a backup copy of the following file:
    C:Program FilesXMetaL 5.1AuthorDITAXACstasktask_ditabase.ctm

    2. Open it in any text editor.

    3. Find the line of code that looks like this (below).  In my copy of XMetaL it's at line# 1769.  (This is XMetaL Author Enterprise 5.1, but I fiddle all the time and I don't remember if I have made other changes to my CTM before.)  Also note that this is a single line of text:

    ]]>

    4. Change it to this:

    ]]>

    5. Restart XMetaL.

    You'll probably have to re-do this procedure whenever you upgrade your version of XMetaL, as the installer will probably overwrite it.

    Reply

    santhoshkumarr

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    Hi Tom,

    Thanks for your reply. I followed the steps you provided and edited the code in the CTM file. However, this didn't work. Do I have to make similar changes in any other XMetaL config files?

    Warm Regards,
    Santhosh.

    Reply

    Su-Laine Yeo

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    The CTM changes that Tom described above change the behavior for elements inserted through the Element List or the Insert menu. They don't change the behavior for elements inserted when you press the Enter key.

    It is possible to change the CTM in order to have the element not appear in elements that are inserted with the Enter key. I've tried this and don't recommend doing it though. As I recall, when you press the Enter key, the insertion point will go into a place that's not optimal, (i.e. not the next element) and pressing Enter again is also not optimal. We need to overhaul the whole area of Enter key behavior in elements in a future release.

    Reply

    Su-Laine Yeo

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    Oops, when I said, “They don't change the behavior for elements inserted when you press the Enter key” what I should have said was, “They don't change the behavior when you press the Enter key after typing in a element.”

    Tom's changes above do change the behavior for wherever the element is inserted.

    Reply

    santhoshkumarr

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    This didnt work when I tried with the the “Insert” key. Let me explain what I have done and what I haven't:

    I have done:
    Edited the task_ditabase.ctm file, changed the Minitemplate. Removed the tag.

    I havent done:
    Editing the macro's
    On_ElementList_Insert
    On_ElementList_Change
    On_ElementList_Surround
    On_ElementList_Insert_NoRequired

    Kindly let me know if I had to modify any other file.

    Regards,
    Santhosh.

    Reply

    mag3737

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    You should not have to modify anything except the CTM for this change.  I'm following up with you in email.  Once we have solved your problem, if there is any further clarification necessary, I'll post back here to the forum for everyone's information.

    Reply

    Derek Read

    Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?

    The best we can do in this case is to modify the CTM file. This is something we can support. In addition to this however, the DITA functionality includes a feature we refer to as “smart insert”. This is implemented via script and we do not support clients making modifications to the scripts at this time, nor are there any config files or other means for modifying this behavior. This feature might be getting in the way in this instance.

    In the future we hope to extend this functionality to give you more flexibility in configuring these settings and allow you to override the smart insert behavior to get it to do exactly what you want.

    When (and even if) that work will be done we cannot say at this time as such a feature will be competing with all the others we are working on.

    Reply

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

Lost Your Password?

Products
Downloads
Support