Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Given something like:
[bibliography] - [[[prag]]] Andy Hunt & Dave Thomas. The Pragmatic Programmer: From Journeyman to Master. Addison-Wesley. 1999. When running a converter over it, the sequence of the AST traversal is pretty much List, ListItem, Bibref. Whereas this is good for most cases, for LEanpub this will cause an issue as it requires the anchor to be on a line of it's own i.e we need to generate something that is roughly like below {#prag} * Andy Hunt & Dave Thomas. The Pragmatic Programmer: From Journeyman to Master. Addison-Wesley. 1999. There is a good chance that the parent node did something the equivalent of '* ' + node.content. My dilemma is how to solve this problem. I'm not sure whether Iit helps to traverse AST at this point to try to inject the necessary line above at that point. Is there maybe a way of discovering that a list is a bibliography list, so that generation behaviour can be changed? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
You can see in the DocBook 5 converter that the bibliography list must be handled in a special way: The one thing that doesn't give you is the bibref for the entry. I've had it on my list to check for this when traversing blocks and promoting it to the list item node. Perhaps now is the time to follow up on an issue for it. See https://github.com/asciidoctor/asciidoctor/issues/1361 Until then, you can just extract the pattern (e.g., [[[prag]]]) from the start of the list item text to get at the id. Cheers, -Dan On Wed, Jun 3, 2015 at 9:46 AM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote: Given something like: ... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thanks. I see you raised https://github.com/asciidoctor/asciidoctor/issues/1361.
I have worked around it for now by checking whether the list or the section has style='bibliography' and then parsing much as you've mentioned. |
Free forum by Nabble | Edit this page |