Page 1 of 1

Shortcut key for Cross References

Posted: Wed May 23, 2012 9:02 am
by sverhagen
Hi. I love adding more Cross References to my documents. But I think that the process of doing so is a bit too complicated. I know, it's nothing spectacular that you have to do to add a Cross Reference, but when you do a lot of them, it gets annoying.

1. Expand the DITA menu
2. Expand the Link sub-menu
3. Click "Cross Reference"
(The "Insert Reference" dialog opens)
4. Click on the folder icon
(The "Open" dialog opens)
5. Scroll the folders I'm working on back into view
6. Select the right folder
7. Select the right file
8. Click Open
(The "Open" dialog closes)
9. Confirm the chosen file
10. Confirm the chosen element in the file

...finally done...

What I am after:
- I would love a shortcut key to directly jump to the "Insert Reference" dialog. I've yet failed to set that up using the "Menu Shortcut Keys".
- The "Open" dialog isn't quite right for me. It's a standard Windows file dialog. And I would like something more focused on the project I'm working on. Maybe I'm using things the wrong way -- or I'm essentially posing a feature request, who knows.

Thanks for your help!

Using a licensed XML Author 13.0 on Windows 7.

Re: Shortcut key for Cross References

Posted: Wed May 23, 2012 10:20 am
by Radu
Hi,

I think that your workflow could be improved.
Here are some tips:

1) If you are making a cross reference directly to a topic file (and not to an individual element inside it you can drag and drop from the Project view (or from the DITA Maps Manager view) that topic file (or reference) directly in the Author page and a cross reference will be automatically inserted to it.

2) If you right click in the Author page, we have a contextual menu action called Paste as Link.

How does this work?
You open the target DITA topic (to which you want to reference) in the Author page, you make sure that the element you want to reference to already has an ID.
Select the entire element (either by triple clicking in it or by using the Outline and copy it (Ctrl-C).
Then in the topic where you want to insert the reference use the Paste as Link action.
You also have a Paste as Content Reference action available for inserting a conref.

3) The action to insert a cross reference is also available on the toolbar (there is a drop-down button marked with a small underlined a).

4) If before linking you open the target DITA topic in the editor and then show the Insert Reference dialog, in the URL combo box the first entries in the history list will be the currently opened files.

5)
The "Open" dialog isn't quite right for me. It's a standard Windows file dialog. And I would like something more focused on the project I'm working on. Maybe I'm using things the wrong way -- or I'm essentially posing a feature request, who knows.
In the same Insert Reference dialog the button which allows you to chose the target file is actually a drop down.
In Oxygen 13.2 we added in that drop-down an entry called Search for file. That action allows you to quick search in all the files linked in the Project (and in the DITA Maps Manager) for a file with a certain file name.

6)
I would love a shortcut key to directly jump to the "Insert Reference" dialog. I've yet failed to set that up using the "Menu Shortcut Keys".
Indeed shortcuts for the actions which are specific to a certain vocabulary (DITA in this case) cannot be configured from the Menu Shortcut Keys preferences page.

You should go to the Document Type Association preferences page, edit the DITA document type (or duplicate if you do not have enough administrative privileges in the Oxygen installation directory).
In the Document type edit dialog, go to the Author tab and in it go to the Actions tab. Find the action and edit it, you will be able to specify a keyboard shortcut for it.

Regards,
Radu

Re: Shortcut key for Cross References

Posted: Wed May 23, 2012 9:51 pm
by sverhagen
Hi,


That was a very useful response. Thank you for that.
Radu wrote: 5)
In the same Insert Reference dialog the button which allows you to chose the target file is actually a drop down.
In Oxygen 13.2 we added in that drop-down an entry called Search for file. That action allows you to quick search in all the files linked in the Project (and in the DITA Maps Manager) for a file with a certain file name.
That is a very useful dialog. One downside, though, it does not handle spaces very well, and it needs me to type %20 if the file name has a space in it.
Radu wrote: 6)
You should go to the Document Type Association preferences page, edit the DITA document type (or duplicate if you do not have enough administrative privileges in the Oxygen installation directory).
In the Document type edit dialog, go to the Author tab and in it go to the Actions tab. Find the action and edit it, you will be able to specify a keyboard shortcut for it.
Lovin' it.

Kind regards, Sander.

Re: Shortcut key for Cross References

Posted: Wed May 23, 2012 11:29 pm
by sverhagen
Also, on the subject of links in the Author view: is it possible to toggle the xref locations on and off, in the Author view.

I'm now seeing:
Bla bla %[Topic.dita#Title]bla bla%.

I would like to see:
Bla bla %bla bla%.

Re: Shortcut key for Cross References

Posted: Thu May 24, 2012 9:11 am
by Radu
Hi Sander,
That is a very useful dialog. One downside, though, it does not handle spaces very well, and it needs me to type %20 if the file name has a space in it.
Good observation, we will rectify this.
Also, on the subject of links in the Author view: is it possible to toggle the xref locations on and off, in the Author view.
Yes, it is.
DITA topics edited in the Author page are styled using CSS stylesheets located here:

OXYGEN_INSTALL_DIR\frameworks\dita\css_classed

In the same folder you could create a custom CSS called "hideXrefLinkText.css" with a content like:

Code: Select all

@import "dita.css";

*[class~="topic/link"][href]:before,
*[class~="topic/xref"][href]:before {
content:url("../img/link.png");
}
Then go to the Oxygen Preferences->Document Type Association page and edit the DITA document type.
In the Author tab in the CSS tab add the path to your additional CSS , specify a title to it and set it as alternate.
Then save the preferences.

Then if the topic is opened in the Author page there is a toolbar drop-down button called CSS.
You should find your alternate CSS stylesheet here and if applied it should only show the small icon before xref links.

Regards,
Radu

Re: Shortcut key for Cross References

Posted: Wed Aug 01, 2012 10:24 pm
by sverhagen
Radu wrote:Hi Sander,
That is a very useful dialog. One downside, though, it does not handle spaces very well, and it needs me to type %20 if the file name has a space in it.
Good observation, we will rectify this.
Fixed in 14.0. Great stuff!

Re: Shortcut key for Cross References

Posted: Thu Aug 23, 2012 7:01 pm
by sverhagen
Hi,
Radu wrote:Then if the topic is opened in the Author page there is a toolbar drop-down button called CSS.
You should find your alternate CSS stylesheet here and if applied it should only show the small icon before xref links.
How about using this CSS also in the preview in the Insert Reference screen?

I had a nice screen shot showing how busy this screen is without that CSS applied. But it seems that I cannot add attachments to my posts.

Kind regards, Sander.

Re: Shortcut key for Cross References

Posted: Fri Aug 24, 2012 12:54 pm
by Radu
Hi Sander,

I understand the problem.
The Preview area in the dialogs used to insert conrefs, xrefs uses only the "dita.css". If you make the changes directly there, they should be visible in the Preview area.

Regards,
Radu

Re: Shortcut key for Cross References

Posted: Fri Aug 24, 2012 5:49 pm
by sverhagen
Hi,
Radu wrote:The Preview area in the dialogs used to insert conrefs, xrefs uses only the "dita.css". If you make the changes directly there, they should be visible in the Preview area.
That's good to know. Perhaps for future versions it is possible to use whatever style sheet is set as the first/default one?

Kind regards, Sander.

Re: Shortcut key for Cross References

Posted: Mon Aug 27, 2012 10:12 am
by Radu
Thanks Sander, We'll consider this.

Regards,
Radu