Cross references "title" issue + other minor questions

Post here questions and problems related to editing and publishing DITA content.
zuza
Posts: 22
Joined: Fri May 13, 2016 5:34 pm

Cross references "title" issue + other minor questions

Post by zuza »

Hello,

I am using oXygen Editor 21.1 and have some questions/feature requests.

Q1. When inserting a cross reference to a figure from Author mode, the editor "helpfully" inserts the figure caption between the <xref> and </xref>.
There are 2 issues with this:
  • If the caption changes, the cross reference will still show the old caption.
  • If we want to show only Figure number as cross reference, the <xref>Caption</xref> will still show Caption instead of Figure X in the PDF.
It's probably the same for tables.
How can I disable this behaviour?

Q2. Is there a setting that allows default 1.3 references, meaning #./<local_element_id> instead of #<topic_id>/<local_element_id>?

Q3. I would also like to be able to change the default element for a keyref. Inserting a keyref in Author mode always chooses <ph>. If I choose <keyword> instead, I would like that to be the default choice at least for the current project, not only for the current file. This would really be a time saver.

Q4. I often use "surround with tags" when reviewing content. It would be useful if the shortcut Ctrl+/ would work across topics.
For example, in topic A, I select a filename and surround it with <filepath>. Afterwards, I can do that easily to all other occurences in topic A using Ctrl+/.
When moving on to topic B, Ctrl+/ is not "active" so I would first need to do a "surround with tags" before I can use Ctrl+/.
Not a major thing, but it would be nice to have a tick box for someone who wants to enable this.

Many thanks,
Ozana
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Cross references "title" issue + other minor questions

Post by Radu »

Hi Ozana,

Please see some answers below:
Q1. When inserting a cross reference to a figure from Author mode, the editor "helpfully" inserts the figure caption between the <xref> and </xref>.
There are 2 issues with this:
If the caption changes, the cross reference will still show the old caption.
If we want to show only Figure number as cross reference, the <xref>Caption</xref> will still show Caption instead of Figure X in the PDF.
It's probably the same for tables.
How can I disable this behaviour?
From what I tested we do not insert the figure title inside the xref link. We just show it there to help you during editing but in the DITA XML content the <xref> element has no text inside. You can switch the topic to the Text editing mode after inserting the cross reference to check this out.
There is a transformation scenario parameter called "args.figurelink.style" which may help you control what gets shown.
Q2. Is there a setting that allows default 1.3 references, meaning #./<local_element_id> instead of #<topic_id>/<local_element_id>?
Yes, in the "Preferences->DITA" page there is a checkbox called "Use "." instead of ID...."
Q3. I would also like to be able to change the default element for a keyref. Inserting a keyref in Author mode always chooses <ph>. If I choose <keyword> instead, I would like that to be the default choice at least for the current project, not only for the current file. This would really be a time saver.
I understand, you are not the first one to ask for this and I will add your vote to the current internal issue. We'll update this forum thread when we have a fix for this.
My opinion on this is that it's mostly not necessary:
post43869.html#p43869
Q4. I often use "surround with tags" when reviewing content. It would be useful if the shortcut Ctrl+/ would work across topics.
For example, in topic A, I select a filename and surround it with <filepath>. Afterwards, I can do that easily to all other occurences in topic A using Ctrl+/.
When moving on to topic B, Ctrl+/ is not "active" so I would first need to do a "surround with tags" before I can use Ctrl+/.
Not a major thing, but it would be nice to have a tick box for someone who wants to enable this.
I understand the use case and agree with you. We have an internal issue added for this, I added your comments on it and we'll notify you when this gets done.
Maybe as a workaround if you surround with "filepath" quite often you can define for it a code template in the Oxygen Preferences->"Editor / Content Completion / Code Templates" page with the content

Code: Select all

<filepath>${selection}</filepath>
. You can also assign a keyboard shortcut to the code template or find it when pressing ENTER in the Author visual editing mode.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
zuza
Posts: 22
Joined: Fri May 13, 2016 5:34 pm

Re: Cross references "title" issue + other minor questions

Post by zuza »

Thanks, Radu.

I already have ticked the box "Use "." instead of ID....".

It doesn't work for text mode (sorry, should have said that from the start).



I'm really confused now about how the figure title got inside the figure link, I'll investigate more and let you know.


Best regards,
Ozana
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Cross references "title" issue + other minor questions

Post by Radu »

Hi Ozana,

About:
It doesn't work for text mode (sorry, should have said that from the start).
I do not understand, in the text editing mode there are no special actions to insert cross references, you just type away in the attribute value.
Or do you mean that if you have an xref like this (where | marks the caret position):

Code: Select all

<xref href="#|"></xref>
and I press Ctrl-space Oxygen could also propose you the "./" entry?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
zuza
Posts: 22
Joined: Fri May 13, 2016 5:34 pm

Re: Cross references "title" issue + other minor questions

Post by zuza »

Hi Radu,

It's like in your example, except that I never need to press Ctrl-space for suggestions.

So after I type #, one of the 2 will happen:
- either the editor offers suggestions for what to insert (not including #.)
or
- the editor autocompletes with the topic ID.

I can't predict when it will autocomplete and when it will just offer suggestions.

So yes, it would ne nice to have #. in the list of suggestions. When autocomplete happens, it should be with #. if the box is ticked in the Preferences panel.


I hope that makes sense.

Thanks

Ozana
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Cross references "title" issue + other minor questions

Post by Radu »

Hi Ozana,

Makes sense. Usually the editor auto-completes when it would have only one choice to show you (in this case the #topicID). Once we'll also add the "#./" to the list of choices it will not auto complete anymore because it will have two choices to show you.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply