-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Feat: Add definition links for TeX Files #14260
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
Conversation
| 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}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment would be nice why this is necessary. I would have assumed that the code also can cover multiline \cite statements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
koppor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to move fast here...
* 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 <[email protected]>
* 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)
* 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 <[email protected]>
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)