-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Double click on citation should open the LaTeX editor at the respective place #11996
Comments
I’m currently working on a university assignment focused on contributing to open source projects. Could I take this issue? I would be happy to work on it and contribute to the project. Thank you ! |
Welcome to the vibrant world of open-source development with JabRef! Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly. In case you encounter failing tests during development, please check our developer FAQs! Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. ⚠ Note that this issue will become unassigned if it isn't closed within 30 days. 🔧 A maintainer can also add the Happy coding! 🚀 |
Could I know what function is called after clicking the push to external file? |
What do you mean? The "push to applications" functionality? It is not directly related to this wish - you can only learn how things are implemented for a different use case. You did not provide any context or test application - thus it makes difficult to point you to concrete classes. Start reading code at
Curerntly nothing. It is your task to add this functionality. See step 5 in the issue description (the part at "Example:")
Not quite. It is to instruct the opened editor to JUMP to a lline. It seems you never used LaTeX and BibTeX. Here two slides, maybe, they help to understand the goal: Imagine now that someone writes a book and has several .tex files. That person uses JabRef for editing the .bib file. Now, they want to have the text edtor jump to the .tex file where the current citation is used.
Retrieve it similarly to
It is available in |
Sorry. I didn't provided the example. I read the pushEntry function and try to understand what happened. I did some test cases. I open the 'ieee-paper.bib' in 'src\test\resources\pdfs\IEEE'. I select the first article and press the push the button 'Push entry to external application'. Then the 'pushEntries' is called and then the command 'texstudio --insert-cite \cite{Alver2007a}' is runned by terminal. And in this issue, the pushEntries will run 'texstudio --line "$lineno" "$file"' after double clicking the the first entry in the table. But currently after clicking the entry, the pushEntry is not runned. How could I improved it? |
It is exactly the task of this issue to implement running |
How to catch the doulble click? Should I use the javaFx event listener in the LatexCitationTabs? |
I do not know. I would need to try out, too. Searching for "double click" reveals private void handleItemMouseClick(LinkedFileViewModel linkedFile, MouseEvent event) {
if (event.getButton() == MouseButton.PRIMARY && (event.getClickCount() == 2)) {
// Double click -> open
linkedFile.open();
}
} You need to handle it in |
I found the problem. The 'LatexCitationTab' use 'GidPane' to divided schema. Those citations are actually one list in a 'VBox' of 'GridPane'. I found that list works as a 'ReadOnlyListWrapper' but it should works like the table of entries for articles, do nothing while click once and do some actions while double click. But I didn't found the class of 'DoubleClickOnlyListWrapper'. How should I fix it? |
Thanks for merge my contribution to the main branch. |
We have the push-to-application functionality. We also have the "LaTeX citations" functionality. It would be nice if I as user could navigate to the listed TeX file in the LaTeX editor by a double click.
The resulting code will add a method
jumpToLine(Path fileName, int line, int column)
toorg.jabref.gui.push.PushToApplication
.Add
default
empty implementation, to avoid compile errors at the beginning.Hints
TeXstudio
.texstudio --line "$lineno" "$file"
commandPath
contains the path tot he executable.emacsclient +4:3 FILE
)Note: The push to applications functionality is described at https://docs.jabref.org/cite/pushtoapplications.
Example:
src\test\resources\pdfs\IEEE\ieee-paper.tex
Instead of 5, TeXstudio should be opened with
ieee.tex
opened and jumping to line 26.The text was updated successfully, but these errors were encountered: