How to use macro in a link?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to use macro in a link?

Lerk
Hello.

I'm trying to make a structure like in a different aerospace standarts, which looks like:

1. Header
1.1 Sub-header
1.1.1 First point
1.1.2 Second
1.1.3 Something you may missed in 1.1.1


And that could be created like this:

:xrefstyle: short

[[link-to-header]]
== Header

[[link-to-subheader]]
=== Sub-header

{counter2:point:0}

<<link-to-subheader>>.{counter:point} First point
<<link-to-subheader>>.{counter:point} Second point
<<link-to-subheader>>.{counter:point} Something you may missed in 1.1.1



But the main problem is to create link.

I tried following(actually, i tried much more, but none helped):

anchor:link-to-pos-in-a-list[<<link-to-subheader>>.{counter:point}]

<<link-to-subheader>>.{point}                First point
<<link-to-subheader>>.{counter:point} Second point
<<link-to-subheader>>.{counter:point} Something you may missed in <<link-to-pos-in-a-list>>


And in such way link is produced like a : <<link-to-subheader>>.1 instead of 1.1.1

I am using v1.5.6 to create PDF.

PS. Such style works with macros, for example:
:number-in-a-list: <<link-to-subheader>>.{point}

And using it like {number-in-a-list} will give us 1.1.1 where 1.1 is a link, and .1 is a plain text, which is a bit confusing in pdf but pretty good on a paper sheet.


Any ideas how to solve this?