I am creating a section in my macro using the create_section function and providing a custom id. The section is created without problems, it is also correctly numbered and I can create working cross references using the id.
What I am trying to figure out, is how to create a reference to a section using its number, e.g. "Section 1.2" (asciidoctor-pdf with xrefstyle short). If I don't supply a reftext, I get just the id in brackets. I've also noticed that I get a warning about a possible invalid reference, even when the cross reference comes after the section.