Skip to content
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

Feature request: show page number #14

Open
gregorypeckdom opened this issue Oct 21, 2022 · 9 comments
Open

Feature request: show page number #14

gregorypeckdom opened this issue Oct 21, 2022 · 9 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gregorypeckdom
Copy link

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.

@Alwinator Alwinator added enhancement New feature or request good first issue Good for newcomers labels Oct 23, 2022
@Alwinator
Copy link
Owner

@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! :)

@rdmueller
Copy link

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

@bai-yi-bai
Copy link

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:
asciidoctor/asciidoctor-extensions-lab#111 (comment)
https://github.com/bai-yi-bai/asciidoctor-pdf-list-of-figures/blob/main/LoF/lof_extension_render_like_toc.rb

@Alwinator
Copy link
Owner

@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).

@bai-yi-bai
Copy link

@Alwinator I sent you a message on the zulipchat, let's continue discussing there.

@j-ruch
Copy link

j-ruch commented Sep 1, 2024

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

@bai-yi-bai
Copy link

@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

@j-ruch
Copy link

j-ruch commented Sep 2, 2024

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?

@bai-yi-bai
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants