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

FR: Use paragraph number for citation #1364

Open
DominiqueSite opened this issue Jul 26, 2024 · 1 comment
Open

FR: Use paragraph number for citation #1364

DominiqueSite opened this issue Jul 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@DominiqueSite
Copy link

Is your feature request related to a problem? Please describe.
There is currently no usable citation feature, which is an essential feature for academic usage.

Describe the solution you'd like
The common recommendation for citing EPUBs is to use paragraph numbering; i.e. counting the paragraphs from the beginning of the section/chapter:

It would also be great to have an option in the Layout>Paragraph settings to enable "Show paragraph numbers" for adding paragraph numbers next to the text.

Describe alternatives you've considered
Location numbers are not usable for citation as they can only be referenced by a reader with access to the same EPUB and may be inconsistent (depending on the EPUB viewer and the layout settings).
CFIs are usable only in EPUBs, which suffices for hyperlinking but is inadequate for citation purposes (e.g. the reader of an academic paper might only have the paperback edition of a cited book).

Additional context
"Authored pages" would be best for citation purposes, but are often not available.

@DominiqueSite DominiqueSite added the enhancement New feature or request label Jul 26, 2024
@johnfactotum
Copy link
Owner

Paragraph counts can be problematic both because of the lack of a precise definition (e.g., how would you count lists?) and because books are often poorly marked up (e.g. many use <p> for headings, or <div> for paragraphs). So the count can be ambiguous and may not match how one would count in the print edition. (It's worth noting that, you can use the CFI as a paragraph count of sorts, as it basically shows an element count.)

Practically, I suppose it should just do whatever Calibre does in its "Reference Mode", which simply enumerates all the <p> elements: https://github.com/kovidgoyal/calibre/blob/6d4114f4738d5b8807ce726337156607c7ff7fed/src/pyj/read_book/referencing.pyj#L15-L16

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

No branches or pull requests

2 participants