[oXygen-user] Hiding keyref text in xrefs (in Author mode)

oXygen XML support support at oxygenxml.com
Wed Aug 12 05:20:52 CDT 2020


Hello Franz-Joseph,

Of course. In your alternate CSS file you could add something like the 
following:

   *[keyref]*:hover*:before,
   *[keyref][href]*:hover*:before{
       content: url("../../img/link_keyref.png") *"[" attr(keyref) "]"*;
   }

This will display the value of the "keyref" attribute for any key 
reference. The downside is that the text starts hopping a bit...

Best wishes,
Sorin Carbunaru

On 8/12/2020 11:57 AM, Franz-Josef Knelangen wrote:
>
> Hi Sorin,
>
> cool trick. Would it be possible to hide the keyref label AND display 
> it when you hover over the PNG?
>
> Greetings,
>
> Franz-Josef
>
>
> *AKG Software Consulting GmbH
> Franz-Josef Knelangen*
>
>
> Uhlandstraße 12
> 79423 Heitersheim
> Germany
>
> Tel.: +49 (0)7634 5612-611
> Fax: +49 (0)7634 5612-300
> E-Mail: _fjk at akgsoftware.de_
> Internet: www.akgsoftware.de <http://www.akgsoftware.de>
>
> Geschäftsführer: Dipl.-Ing. Artur K. Günther, Dipl.-Ing. Arno 
> Brüggemann, Dipl.-Ing. (FH) Bernhard Feser, Dipl.-Ing. Jens Günther
> Sitz der Gesellschaft: Heitersheim, HRB 310383 (Amtsgericht Freiburg)
>
> *Von:* oXygen-user <oxygen-user-bounces at oxygenxml.com> *Im Auftrag von 
> *oXygen XML support
> *Gesendet:* Mittwoch, 12. August 2020 10:44
> *An:* oxygen-user at oxygenxml.com
> *Betreff:* Re: [oXygen-user] Hiding keyref text in xrefs (in Author mode)
>
> Externe E-Mail: Vorsicht beim Öffnen von Anhängen und Klicken auf Links!
>
> Hello Yves,
>
> This comes from frameworks\dita\css\core\-conrefs.css, where we have 
> the following rule:
>
>     @media oxygen{
>       *[keyref]:before,
>     *[keyref][href]:before{
>           link: oxy_concat("", attr(keyref, keyref));
>           content: url("../../img/link_keyref.png") *"[" attr(keyref)
>     "]"*;
>     text-decoration: none;
>       }
>       ...
>     }
>
> The elegant way of dealing with this would be to create an alternate 
> CSS 
> (https://www.oxygenxml.com/doc/versions/22.0/ug-editor/glossary/alternate-css-style.html) 
> that contains only this rule, but without the blue text ("[" 
> attr(keyref) "]"), and then activate this CSS from the Styles dropdown 
> that is found in the toolbar area when opening a file in the Author 
> mode. If you want to get that key name back, you need to deactivate 
> this alternate CSS. You should find enough information about this in 
> the userguide.
>
> You could, of course, remove the blue text directly from -conrefs.css, 
> but then it would not be that easy to render the key name again. You 
> would have to write the blue text again...
>
> All the best wishes,
> Sorin Carbunaru
> Oxygen XML Editor
>
> On 8/11/2020 3:00 PM, Yves Barbion wrote:
>
>     Hi group
>
>     When I insert a xref to a DITA topic with a key, I see the
>     following in Author mode:
>
>     <p><xref>[keyref_text]My cross-reference display text</xref></p>
>
>     The keyref_text makes it a bit difficult to read my
>     cross-reference display text, so I would like to hide it when I'm
>     working in Author mode. Is there a way to do this?
>
>     Thanks
>
>     Yves
>
>
>
>     _______________________________________________
>
>     oXygen-user mailing list
>
>     oXygen-user at oxygenxml.com  <mailto:oXygen-user at oxygenxml.com>
>
>     https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20200812/481d65e8/attachment.html>


More information about the oXygen-user mailing list