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 December 4, 2008 at 5:45 am
How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 4, 2008 at 5:45 amParticipants 6Replies 7Last Activity 14 years, 4 months agoHi 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.mag3737 December 4, 2008 at 5:51 pm
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 4, 2008 at 5:51 pm1. Save a backup copy of the following file:
C:Program FilesXMetaL 5.1AuthorDITAXACstasktask_ditabase.ctm2. 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.
santhoshkumarr December 5, 2008 at 3:48 am
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 5, 2008 at 3:48 amHi 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.Su-Laine Yeo December 5, 2008 at 7:11 pm
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 5, 2008 at 7:11 pmThe 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. Su-Laine Yeo December 6, 2008 at 1:12 am
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 6, 2008 at 1:12 amOops, 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. santhoshkumarr December 8, 2008 at 5:03 am
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 8, 2008 at 5:03 amThis 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 thetag. I havent done:
Editing the macro's
On_ElementList_Insert
On_ElementList_Change
On_ElementList_Surround
On_ElementList_Insert_NoRequiredKindly let me know if I had to modify any other file.
Regards,
Santhosh.mag3737 December 8, 2008 at 4:12 pm
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 8, 2008 at 4:12 pmYou 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.
Derek Read December 9, 2008 at 8:45 pm
Reply to: How do I modify which elements are inserted when pressing Enter in DITA Tasks?
December 9, 2008 at 8:45 pmThe 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.
-
AuthorPosts
- You must be logged in to reply to this topic.