Overriding the xrefstyle for only one link

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Overriding the xrefstyle for only one link

Jeremie Bresson
The "xrefstyle" feature is really great (new with Asciidoctor 1.5.6.1, see http://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text )

We use "xrefstyle = short" and this correspond to what we need for almost all cases.
In some cases, we would prefer to have the full or the basic xrefstyle. I was hoping that I could write:

----
See xref:sec-helloworld[xrefstyle="full"] to get more information
----

But this do not seems to work.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overriding the xrefstyle for only one link

mojavelinux
Administrator
For the first version, I decided not to allow this just so we could focus on getting the mechanics of the reference text itself working. This is something we can now consider adding in a future version.

The first problem we're going to run into though, which I discovered when trying to use xref for another purpose, is that the xref macro does not support attributes. This is an inherited behavior from mimicking AsciiDoc Python. But I think that if linkattrs is set (which in 1.6.0 we want to make the default), then the xref macro should support attributes. Then, we can honor the xrefstyle setting.

Please feel free to open an issue to track this.

Cheers,

-Dan

On Wed, Aug 9, 2017 at 11:23 PM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The "xrefstyle" feature is really great (new with Asciidoctor 1.5.6.1, see http://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text )

We use "xrefstyle = short" and this correspond to what we need for almost all cases.
In some cases, we would prefer to have the full or the basic xrefstyle. I was hoping that I could write:

----
See xref:sec-helloworld[xrefstyle="full"] to get more information
----

But this do not seems to work.



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Overriding-the-xrefstyle-for-only-one-link-tp5820.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overriding the xrefstyle for only one link

mojavelinux
Administrator
In reply to this post by Jeremie Bresson
But I like the idea ;)

On Wed, Aug 9, 2017 at 11:26 PM, Dan Allen <[hidden email]> wrote:
For the first version, I decided not to allow this just so we could focus on getting the mechanics of the reference text itself working. This is something we can now consider adding in a future version.

The first problem we're going to run into though, which I discovered when trying to use xref for another purpose, is that the xref macro does not support attributes. This is an inherited behavior from mimicking AsciiDoc Python. But I think that if linkattrs is set (which in 1.6.0 we want to make the default), then the xref macro should support attributes. Then, we can honor the xrefstyle setting.

Please feel free to open an issue to track this.

Cheers,

-Dan

On Wed, Aug 9, 2017 at 11:23 PM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The "xrefstyle" feature is really great (new with Asciidoctor 1.5.6.1, see http://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text )

We use "xrefstyle = short" and this correspond to what we need for almost all cases.
In some cases, we would prefer to have the full or the basic xrefstyle. I was hoping that I could write:

----
See xref:sec-helloworld[xrefstyle="full"] to get more information
----

But this do not seems to work.



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Overriding-the-xrefstyle-for-only-one-link-tp5820.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overriding the xrefstyle for only one link

Jeremie Bresson
Loading...