Docbook 5 Author mode: way to add indexterm elements?

I have been using Author XML for months now to make a docbook book. Really loving it. It's very powerful and makes me productive. However, I am surprised to find that there's not a Docbook toolbar button or context menu option to create an indexterm element. An indexterm is necessary to build a decent index for your book. http://www.docbook.org/tdg5/en/html/indexterm.singular.html usually it looks like this: <indexterm> <primary>Abraham Lincoln </primary> <secondary>Gettysburg Address </secondary> </indexterm> I am having to drop out of Author mode into XML mode to add <indexterm> every two paragraphs or so. Am I missing this feature or is it something which the developers just haven't gotten around to yet? Thanks. Robert Nagle

Hello, We just didn't implement an Insert Indexterm action yet. We will add it in a future version of Oxygen. Regards, Sorin On 6/17/2010 11:58 PM, Robert Nagle wrote:
I have been using Author XML for months now to make a docbook book. Really loving it. It's very powerful and makes me productive.
However, I am surprised to find that there's not a Docbook toolbar button or context menu option to create an indexterm element. An indexterm is necessary to build a decent index for your book. http://www.docbook.org/tdg5/en/html/indexterm.singular.html
usually it looks like this:<indexterm> <primary>Abraham Lincoln </primary> <secondary>Gettysburg Address</secondary> </indexterm>
I am having to drop out of Author mode into XML mode to add <indexterm> every two paragraphs or so.
Am I missing this feature or is it something which the developers just haven't gotten around to yet?
Thanks.
Robert Nagle

Hello, First, you don't have to go to Text mode just to input a few elements, you can already do this in Author mode. Press Enter(or Ctrl+Space) at the appropriate location in the editor and a small window appears with the list of elements that can be inserted at that location. You can filter the elements in this list by typing the starting characters of the element you are looking for. e.g. press Enter when the caret is inside a "para" element, then type 'ind' and the list is filtered and the only visible element in the list remains "indexterm". Press Enter on that element and it will be inserted in the editor and the caret will be positioned inside it. Press Enter again and you can simply navigate with the arrow keys and choose "primary" Second, the actions you see on the DocBook toolbar can be configured and customized. So if you want you can create your own custom action that introduces an "indexterm". This isn't that difficult to do: 1. Go to Options -> Preferences -> Document Type Association, select the DocBook 4/5, Edit it, you will be asked if you want to duplicate it, say Yes. 2. In the Document type editing dialog go to the 'Author' tab from the tab group located below, and from the list from the left click on Actions. 3. You should see a list of actions, add a new one(+ sign). 4. In the action editing dialog, specify an ID, and a name, a description could also be useful. 5. Press the Choose button from the row with the label "invoke the operation" 6. From the Operation list choose either InsertOrReplaceFragmentOperation or SurroundWithFragmentOperation. The main difference is that the former operation will replace the selection while the latter will surround it with the fragment provided. 7. Edit(double-click) the fragment argument from the argument list and type there the fragment you want to insert. e.g: <indexterm xmlns="http://docbook.org/ns/docbook"> <primary></primary> <secondary></secondary> </indexterm> Note: xmlns="http://docbook.org/ns/docbook" is needed for DocBook 5 8. Back in the Document type editing dialog select Toolbar from the list on the left in the same Author tab. 9. Select your action from the list of 'Available actions' on the left and a destination in the 'Current actions' tree on the right(will be added after it if it's an action) and press the 'Add as sibling' button between the lists. 10. OK in all dialogs and you should already see the action you just added on the toolbar when you open a Docbook document. Let me know if you need further information. Regards, Adrian Adrian Buza Oxygen XML Editor support Robert Nagle wrote:
I have been using Author XML for months now to make a docbook book. Really loving it. It's very powerful and makes me productive.
However, I am surprised to find that there's not a Docbook toolbar button or context menu option to create an indexterm element. An indexterm is necessary to build a decent index for your book. http://www.docbook.org/tdg5/en/html/indexterm.singular.html
usually it looks like this: <indexterm> <primary>Abraham Lincoln </primary> <secondary>Gettysburg Address </secondary> </indexterm>
I am having to drop out of Author mode into XML mode to add <indexterm> every two paragraphs or so.
Am I missing this feature or is it something which the developers just haven't gotten around to yet?
Thanks.
Robert Nagle _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Adrian, Thanks for the help. Your how-to has opened a whole new world of productivity for me! By the way, although your instructions were pretty clear, I didn't initially see the Choose button (it's on the right in the middle of the same dialog in the OPERATIONS section), but once I figured that out, the rest of it was a breeze. (More here http://www.oxygenxml.com/doc/ug-oxygen/dg-author-settings.html#dg-configurin... ) (Yes, having a button already preconfigured would be helpful). One question: I don't fully understand the implications of creating a duplicate Document Type association. Where do these customizations go? And do they migrate during upgrades? rj On Fri, Jun 18, 2010 at 5:10 AM, Adrian Buza <adrian@sync.ro> wrote:
Hello,
First, you don't have to go to Text mode just to input a few elements, you can already do this in Author mode. Press Enter(or Ctrl+Space) at the appropriate location in the editor and a small window appears with the list of elements that can be inserted at that location. You can filter the elements in this list by typing the starting characters of the element you are looking for. e.g. press Enter when the caret is inside a "para" element, then type 'ind' and the list is filtered and the only visible element in the list remains "indexterm". Press Enter on that element and it will be inserted in the editor and the caret will be positioned inside it. Press Enter again and you can simply navigate with the arrow keys and choose "primary"
Second, the actions you see on the DocBook toolbar can be configured and customized. So if you want you can create your own custom action that introduces an "indexterm". This isn't that difficult to do:
1. Go to Options -> Preferences -> Document Type Association, select the DocBook 4/5, Edit it, you will be asked if you want to duplicate it, say Yes. 2. In the Document type editing dialog go to the 'Author' tab from the tab group located below, and from the list from the left click on Actions. 3. You should see a list of actions, add a new one(+ sign). 4. In the action editing dialog, specify an ID, and a name, a description could also be useful. 5. Press the Choose button from the row with the label "invoke the operation" 6. From the Operation list choose either InsertOrReplaceFragmentOperation or SurroundWithFragmentOperation. The main difference is that the former operation will replace the selection while the latter will surround it with the fragment provided. 7. Edit(double-click) the fragment argument from the argument list and type there the fragment you want to insert. e.g: <indexterm xmlns="http://docbook.org/ns/docbook"> <primary></primary> <secondary></secondary> </indexterm> Note: xmlns="http://docbook.org/ns/docbook" is needed for DocBook 5 8. Back in the Document type editing dialog select Toolbar from the list on the left in the same Author tab. 9. Select your action from the list of 'Available actions' on the left and a destination in the 'Current actions' tree on the right(will be added after it if it's an action) and press the 'Add as sibling' button between the lists. 10. OK in all dialogs and you should already see the action you just added on the toolbar when you open a Docbook document.
Let me know if you need further information.
Regards, Adrian
Adrian Buza Oxygen XML Editor support
Robert Nagle wrote:
I have been using Author XML for months now to make a docbook book. Really loving it. It's very powerful and makes me productive.
However, I am surprised to find that there's not a Docbook toolbar button or context menu option to create an indexterm element. An indexterm is necessary to build a decent index for your book. http://www.docbook.org/tdg5/en/html/indexterm.singular.html
usually it looks like this: <indexterm> <primary>Abraham Lincoln </primary> <secondary>Gettysburg Address </secondary> </indexterm>
I am having to drop out of Author mode into XML mode to add <indexterm> every two paragraphs or so.
Am I missing this feature or is it something which the developers just haven't gotten around to yet?
Thanks.
Robert Nagle _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- Robert Nagle 12777 Ashford Point Dr #1417 Houston, Texas 77082 713 893 3424 htpt://www.robertnagle.info

Robert, I guess that Choose button is a bit too far to the right since the dialog is so wide, maybe we could move it to the left of the text field. Regarding your question, there are two types of document types: internal and external. The internal document types are saved in the Oxygen options. If you only need the document types on one machine and also if you modify them frequently this is the simplest way to keep them since the options are imported automatically in the new version when upgrading. The external document types have to be saved in the file system in the [oxygen-installation-folder]/frameworks folder(usually in a dedicated sub-folder similar to the predefined frameworks). This complicates things a little in Windows Vista or 7 since Oxygen is usually installed in "Program Files" which is "off limits" if the application doesn't have elevated rights(Run as administrator). External document types are useful when you need to deploy the same document types on many machines and know that they will be rarely if ever modified by their users. Be careful if you edit(or overwrite) some of the predefined document types(frameworks) because they will be lost(deleted and overwritten) when upgrading. I would recommend duplicating rather than just making modifications to an existing document type. Not to mention that you can't restore a predefined document type to its defaults without reinstalling/upgrading. If you look in Options -> Preferences -> Document Type Association you will see a combo with the 'User role'. The 'Content author' user role(default) can only create and save internal document types and so doesn't allow creating/modifying the external kind. The 'Developer' user role can create/modify both internal and external document types. Again, be aware that any modifications made to a predefined document type will be lost after an upgrade. So in conclusion, if you switch the 'User role' to 'Developer' the storage option: internal/external will be activated in the document type editing dialog and you can save the document type in a framework file in the [oxygen-installation-folder]/frameworks folder should you need to. Best wishes, Adrian Adrian Buza Oxygen XML Editor support Robert Nagle wrote:
Adrian,
Thanks for the help. Your how-to has opened a whole new world of productivity for me!
By the way, although your instructions were pretty clear, I didn't initially see the Choose button (it's on the right in the middle of the same dialog in the OPERATIONS section), but once I figured that out, the rest of it was a breeze.
(More here http://www.oxygenxml.com/doc/ug-oxygen/dg-author-settings.html#dg-configurin... )
(Yes, having a button already preconfigured would be helpful).
One question: I don't fully understand the implications of creating a duplicate Document Type association. Where do these customizations go? And do they migrate during upgrades?
rj
On Fri, Jun 18, 2010 at 5:10 AM, Adrian Buza <adrian@sync.ro> wrote:
Hello,
First, you don't have to go to Text mode just to input a few elements, you can already do this in Author mode. Press Enter(or Ctrl+Space) at the appropriate location in the editor and a small window appears with the list of elements that can be inserted at that location. You can filter the elements in this list by typing the starting characters of the element you are looking for. e.g. press Enter when the caret is inside a "para" element, then type 'ind' and the list is filtered and the only visible element in the list remains "indexterm". Press Enter on that element and it will be inserted in the editor and the caret will be positioned inside it. Press Enter again and you can simply navigate with the arrow keys and choose "primary"
Second, the actions you see on the DocBook toolbar can be configured and customized. So if you want you can create your own custom action that introduces an "indexterm". This isn't that difficult to do:
1. Go to Options -> Preferences -> Document Type Association, select the DocBook 4/5, Edit it, you will be asked if you want to duplicate it, say Yes. 2. In the Document type editing dialog go to the 'Author' tab from the tab group located below, and from the list from the left click on Actions. 3. You should see a list of actions, add a new one(+ sign). 4. In the action editing dialog, specify an ID, and a name, a description could also be useful. 5. Press the Choose button from the row with the label "invoke the operation" 6. From the Operation list choose either InsertOrReplaceFragmentOperation or SurroundWithFragmentOperation. The main difference is that the former operation will replace the selection while the latter will surround it with the fragment provided. 7. Edit(double-click) the fragment argument from the argument list and type there the fragment you want to insert. e.g: <indexterm xmlns="http://docbook.org/ns/docbook"> <primary></primary> <secondary></secondary> </indexterm> Note: xmlns="http://docbook.org/ns/docbook" is needed for DocBook 5 8. Back in the Document type editing dialog select Toolbar from the list on the left in the same Author tab. 9. Select your action from the list of 'Available actions' on the left and a destination in the 'Current actions' tree on the right(will be added after it if it's an action) and press the 'Add as sibling' button between the lists. 10. OK in all dialogs and you should already see the action you just added on the toolbar when you open a Docbook document.
Let me know if you need further information.
Regards, Adrian
Adrian Buza Oxygen XML Editor support
Robert Nagle wrote:
I have been using Author XML for months now to make a docbook book. Really loving it. It's very powerful and makes me productive.
However, I am surprised to find that there's not a Docbook toolbar button or context menu option to create an indexterm element. An indexterm is necessary to build a decent index for your book. http://www.docbook.org/tdg5/en/html/indexterm.singular.html
usually it looks like this: <indexterm> <primary>Abraham Lincoln </primary> <secondary>Gettysburg Address </secondary> </indexterm>
I am having to drop out of Author mode into XML mode to add <indexterm> every two paragraphs or so.
Am I missing this feature or is it something which the developers just haven't gotten around to yet?
Thanks.
Robert Nagle _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (3)
-
Adrian Buza
-
Robert Nagle
-
Sorin Ristache