Hi Eduardo, The sectnum attribute is only available in section titles (as it says http://www.methods.co.nz/asciidoc/userguide.html#X60), not in the text within the section.
To be honest I'm not sure how to handle this except by doing something external to asciidoc or to change the code of asciidoc.py. Cheers Lex On 23 September 2014 23:40, Eduardo Santana <[email protected]> wrote: > Hi, I'm using github issues to get feedback from readers. > > I would like to make a Feedback link to create a new issue on gitgub and > automatic fills the issue's title and body with some info: > > - The current section/chapter where the link was placed > - The current version of the book > > Here's what I'm doing so far: > > I have created an attribute {cap} that holds the chapter number. Every time > I create a chapter I replace its value. And I also have an {edition}, for > the current version of the book. > > The first challenge is to create the link: > > https://github.com/asciidoc/asciidoc/issues/new?title=your+title+here&body=Description+your+feedback+here > > This can be done like this: > > link:https://github.com/asciidoc/asciidoc/issues/new?title=your+title+here&body=Description+your+feedback+here[Give > us your feedback here] > > So far, so good. Now it's time to add attributes: > > // For the entire book > :gitrepo: https://github.com/asciidoc/asciidoc > :edition: myEdition > // For each chapter > :chapter: chapter1 > > TIP: > link:{gitrepo}/issues/new?title={chapter}+your+title+here&body=Current+edition%3A+{edition}%0AType+your+feedback+here%3A[Give > us your feedback about this chapter]. > > > That's it. I can override the chapter attribute and include the TIP box at > the end of eacher chapter. (http://www.url-encode-decode.com/urlencode can > help to encode text to use inside links. I'm using the uft-8 encoding.) > > But how can I get the current chapter/section name (and number) to put in a > link like this? > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/asciidoc. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
