Fix: Comprehensive page navigation for crossref entries in both internal and external viewers (#8128)#15504
Fix: Comprehensive page navigation for crossref entries in both internal and external viewers (#8128)#15504Sherry0121-AC wants to merge 39 commits intoJabRef:mainfrom
Conversation
Review Summary by QodoAdd comprehensive page navigation for crossref entries across all platforms
WalkthroughsDescription• Implement logical-to-physical PDF page translation for crossref entries • Add page number support across all desktop platforms (Windows, macOS, Linux) • Enable internal and external viewers to navigate to correct pages in parent PDFs • Support crossref fallback when child entries lack direct file attachments Diagramflowchart LR
A["Child Entry with crossref"] -->|resolve parent| B["Parent Entry"]
B -->|extract pages field| C["Parse Page Number"]
C -->|PDF with labels| D["PdfPageLabelResolver"]
D -->|logical to physical| E["Physical Page Number"]
E -->|pass to OS| F["Platform-specific Viewer"]
F -->|Windows| G["SumatraPDF/-page"]
F -->|macOS| H["Adobe/Skim/Browser"]
F -->|Linux| I["Evince/Okular/Zathura"]
File Changes1. jabgui/src/main/java/org/jabref/gui/actions/ActionHelper.java
|
Code Review by Qodo
|
fe94d90 to
969f699
Compare
…21-AC/jabref into fix-8128-crossref-pages
…21-AC/jabref into fix-8128-crossref-pages
koppor
left a comment
There was a problem hiding this comment.
For what is this PR? University credits or GSoC?
jabgui/src/main/java/org/jabref/gui/desktop/os/NativeDesktop.java
Outdated
Show resolved
Hide resolved
calixtus
left a comment
There was a problem hiding this comment.
Very quick first look and some preliminary comments
…21-AC/jabref into fix-8128-crossref-pages
Related issues and pull requests
Closes #8128
Closes #8128
PR Description
This PR fixes the issue where opening sub-entries (e.g.,
@InCollection) via thecrossreffield failed to navigate to the correct start page in external and internal viewers. By implementing a logical-to-physical page translation layer and optimizing the navigation pipeline, JabRef now correctly targets the intended page, gracefully handling PDF front-matter offsets when present. This ensures a consistent and accurate research experience across all desktop platforms.Steps to test
@Bookentry in JabRef and link a local PDF file to it.(Optional but recommended: Use a PDF with roman-numeral front matter to verify the new logical-to-physical page translation feature).
@InCollectionentry. Setcrossrefpointing to the parent book's citation key, and set thepagesfield to a specific range (e.g.,186--206).Screenshots:



![External Viewer Jump]
Screenshots: The external browser successfully navigating to physical page 200 (logical page 186) after pressing F4.
![Internal Viewer Jump]



Screenshots: The internal document viewer accurately resolving the parent file and jumping to the correct page.
Known Limitations
Checklist