Feat: Add definition links for TeX Files#14260
Merged
Merged
Conversation
koppor
reviewed
Nov 9, 2025
Comment on lines
-58
to
+65
| Arguments.of(UNRESOLVED, "\\cite[pre][post]{UnresolvedKey}"), | ||
| Arguments.of(UNRESOLVED, "\\cite*{UnresolvedKey}"), | ||
| Arguments.of(UNRESOLVED, "\\parencite[post]{UnresolvedKey}"), | ||
| Arguments.of(EINSTEIN_C, "\\citep{Einstein1920c}"), | ||
| Arguments.of(EINSTEIN_C, "\\autocite{Einstein1920c}"), | ||
| Arguments.of(EINSTEIN_C, "\\Autocite{Einstein1920c}"), | ||
| Arguments.of(DARWIN, "\\blockcquote[p. 28]{Darwin1888}{some text}"), | ||
| Arguments.of(DARWIN, "\\textcquote[p. 18]{Darwin1888}{blablabla}") | ||
| Arguments.of(UNRESOLVED, 17, 30, "\\cite[pre][post]{UnresolvedKey}"), | ||
| Arguments.of(UNRESOLVED, 7, 20, "\\cite*{UnresolvedKey}"), | ||
| Arguments.of(UNRESOLVED, 17, 30, "\\parencite[post]{UnresolvedKey}"), | ||
| Arguments.of(EINSTEIN_C, 7, 20, "\\citep{Einstein1920c}"), | ||
| Arguments.of(EINSTEIN_C, 10, 23, "\\autocite{Einstein1920c}"), | ||
| Arguments.of(EINSTEIN_C, 10, 23, "\\Autocite{Einstein1920c}"), | ||
| Arguments.of(DARWIN, 20, 30, "\\blockcquote[p. 28]{Darwin1888}{some text}"), | ||
| Arguments.of(DARWIN, 19, 29, "\\textcquote[p. 18]{Darwin1888}{blablabla}") |
Member
There was a problem hiding this comment.
Future work: rewrite to CsvSource
| Path path = Path.of(""); | ||
| LatexParserResult latexParserResult = new LatexParserResult(path); | ||
| matchCitation(path, 1, citeString, latexParserResult); | ||
| String[] citeStrings = citeString.split(System.lineSeparator()); |
Member
There was a problem hiding this comment.
Comment would be nice why this is necessary. I would have assumed that the code also can cover multiline \cite statements
Member
Author
There was a problem hiding this comment.
hm never thought of multiline citation, but this would neither work for both methods because \n is not included in the pattern as far as i understand and for the second method the parsing is done line by line.
Maybe futurework to make this better?
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Nov 9, 2025
* add support for latex citation definitions and refactor citation handling logic * enhance LSP range utility and modularize definition handling functions * improve citation and range handling across parser and definition providers * fix formatting * fix jbang * update associated tests * update associated tests2 --------- Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Siedlerchr
added a commit
that referenced
this pull request
Nov 10, 2025
* main: Fix calling JBang command (#14282) .jbang scripts should not be included inside themselves (#14278) Fix typos (#14277) Refactor importDatabase for better readability (#14274) fix jbang (#14276) Feat: Add definition links for TeX Files (#14260) Update preventing module commits (#14273) Fix JabKitLuancher Rename packages in jabkit to start with org.jabref.toolkit to avoid split packages between jabkit and jabgui (#14052). (#14271) Add doi-to-bibtex to examples and JabKit (#14244)
merlinymy
pushed a commit
to merlinymy/jabref
that referenced
this pull request
Nov 19, 2025
* add support for latex citation definitions and refactor citation handling logic * enhance LSP range utility and modularize definition handling functions * improve citation and range handling across parser and definition providers * fix formatting * fix jbang * update associated tests * update associated tests2 --------- Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes palukku#53
Added ctrl + click and ctrl + hover for .tex files.
Steps to test
Start the jabls server and after that checkout the last version of https://github.com/JabRef/lsp-vscode-extension and start it.
After that you should see that after opening your bibfile you can ctrl + click or hover to go to/see the definition.
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)