[oXygen-user] Docbook 5 Author mode: way to add indexterm elements?

Robert Nagle
Fri Jun 18 20:18:52 CDT 2010


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-configuring-actions-menus-toolbar
)

(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 <> 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
>> 
>> 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



More information about the oXygen-user mailing list