-
-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xrefstyle is ignored for docbook backend #3736
Comments
You are correct that the xrefstyle is currently relevant for the HTML backend only. We got the idea originally from the xrefstyle attribute in DocBook, so its reasonable to assume we can support it there too. If you know which values this attribute is supposed to add, I'd be happy to add them to the converter. I will also accept a PR to update the DocBook converter if that's simpler. Looking for your input.
I think you meant "xrefstyle" attribute. |
Btw, the correct syntax here would be:
|
No, I meant
While:
So it seems that
Sorry, I did not quite understand the question. I expected the content of
Yeah, totally understand. Unfortunately, I cannot provide any estimates on when I would be able to prepare one. |
Oh, I see. Hmm, technically, we don't know this information. In the DocBook output, it's the toolchain that fills in these values (including the numbers of sections). So we don't even have the information for what the text would be. We have it in the HTML converter since the converter itself has to resolve these values. It seems to me xrefstyle is the better attribute to use because it allows the DocBook toolchain to fulfill the request based on its internal reference tables (assuming the toolchain honors that attribute). |
Oh, I see. Hmm. I did a quick search on how One possible approach is to set docbook's |
I'll +1 this as a needed feature. I use short xrefstyle extensively, but I also need to export to docx frequently for my collaborators. The docbook -> pandoc pipeline is the most straightforward way to do this and requires the least manual tweaking afterward. Unfortunately this issue has forced me to stop using <> syntax and listing everything as an xref with a manual label. This basically means that I can't used the auto numbering tables and figures feature of Asciidoctor which is a huge inconvenience. |
There's still no clear path forward, so I wouldn't know what code to change if I wanted (and had time) to change it. I'll restate what I said above:
If it's important to you, please step forward to propose a change. Here's information about the xrefstyle in DocBook: http://www.sagehill.net/docbookxsl/CustomXrefs.html |
Apologies, I was not trying to sound impatient. I don't have a strong understanding of docbook. As a workaround I've been trying to change |
I see references to xrefstyle in the DocBook stylesheets by running this search: https://github.com/docbook/xslt10-stylesheets/search?q=xrefstyle However, I think I got stuck where you are. If I understand what the output needs to be, updating this converter to generate that is relatively straightforward. The hard work is figuring out what it should be. And I just don't know. |
Aha! Using this:
I got this when using the DocBook toolchain with the FOP/PDF output format:
So it appears this does work. We just need to translate the xrefstyle keyword that we use into a select command in the DocBook output. The next step is to figure out what those select commands should be in each case. Here's a proposal:
However, We won't be able to tune it quite as much as we can with the HTML output, but this should at least give a close approximation. |
Hey, just stumbled across this issue while trying to figure out how to link to numbered items. Any thoughts on if the proposed select commands are a viable path forward? |
Take this
input.adoc
file:Here is how it is rendered:
This is expected. Then I convert it to docbook:
And here is the output:
This is not expected. As you can see, all
xref
elements look exactly the same. The information aboutxrefstyle
is lost. I would expect to seeendterm
attribute set in docbook.The text was updated successfully, but these errors were encountered: