asciidoctor-lists
asciidoctor-lists copied to clipboard
Feature request: show page number
When using asciidoctor-lists with asciidoctor-pdf, could you add the ability to show the page numbers? Ideally, it would be great if the asiidoctor-lists content were to be formatted similarly to the table of contents.
I'm creating the PDF via this command line. asciidoctor-pdf -n -o out.pdf -r asciidoctor-lists lists.adoc
And my source is: lists.adoc.txt
Thank you. Just wanted to add I really like your project as well.
@gregorypeckdom I think that the feature you recommended, is a good idea. However, unfortunately paid work is keeping me busy, but pull requests are welcome! :)
I am also interested in this feature and ready to invest some time, but I have no clue how to get the page number.
But I found this which could be helpful: https://docs.asciidoctor.org/pdf-converter/latest/extend/use-cases/#access-page-number-from-inline-macro
Hello, @Alwinator thank you for creating this extension. It's unfortunate that it doesn't match the style of the ToC.
I have presented an alternative: https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/111#issuecomment-1448455956 https://github.com/bai-yi-bai/asciidoctor-pdf-list-of-figures/blob/main/LoF/lof_extension_render_like_toc.rb
@bai-yi-bai Thank you, it would be cool if you could create a pull request. Maybe that you can show it in your format (as an optional feature).
@Alwinator I sent you a message on the zulipchat, let's continue discussing there.
Hi @Alwinator and @bai-yi-bai First of all, many thanks to your contributions, very much appreciated! I would like to follow up on this open issue, is there a different library that may be used, which allows to display page numbers for a list of figures / tables / listings?
I have tried your asciidoctor-lists library but it does not seem to print any page numbers.
Best regards Jan
@j-ruch, yes there is. At the end of 2023 I expanded upon the code. I included a link from my GitHub's readme.md file to AsciiDoctor-PDF-LoFTE.
https://gitlab.com/baiyibai/asciidoctor-pdf-lofte
Hi @bai-yi-bai Thanks a lot for your message. I tested your project and it seems to work. However, the formatting of my ToC sort of changed now, the toc-levels are reduced to 1 instead of 2. I will probably look into this when I find the time.
Additionally, is it possible to change the occurence of the LoFTE from the beginning to the end of the document?
@j-ruch you're welcome, and I want to say thank you as well. Thanks to you, I discovered that there were open issues on my GitLab project... I assumed that issues would automatically be assigned to me. I just made a small fix to remove an extra ||.
Regarding your questions, try adjusting the entry.level setting in the code; you might also need to adjust your theme. As far as placement of the LoFTE, these lists hook into the ToC, so wherever you define the ToC is where they will "live". If you'd like, feel free to message me on the zulipchat or if you have further questions, open an issue on my GitLab and @ me.
To try to steer this back to the original topic. I'd just like to mention that I plan to begin migrating to AsciiDoctor-WebPDF at some point next year and I will likely invest my own effort to make sure that these lists are usable.