Skip to content

Add support for TeXworks#10953

Merged
Siedlerchr merged 17 commits into
JabRef:mainfrom
vladdobre:#3197-TeXworks
Mar 4, 2024
Merged

Add support for TeXworks#10953
Siedlerchr merged 17 commits into
JabRef:mainfrom
vladdobre:#3197-TeXworks

Conversation

@vladdobre

Copy link
Copy Markdown
Contributor

We have added the PushToTeXworks class, which is an implementation of AbstractPushToApplication. This class contains the code for pushing an entry to TeXworks. A call to this class has been added in PushToApplications. In JabRefPreferences we have added the option of TeXworks with PushToApplications.TEXWORKS.

image

The icon is set to the default one, as it is mentioned here ("Add an icon (ask maintainers for licensed/free svg) to the JabRefIcon ttf font (This will be a task for JabRef maintainers) in the meantime use a simple default icon") that maintainers will update the default icon.

Closes #3197

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Blezie and others added 12 commits February 26, 2024 15:44
Co-Authored-By: JohannBiorck <85625348+johannbiorck@users.noreply.github.com>
Co-Authored-By: JohannBiorck <85625348+johannbiorck@users.noreply.github.com>
Co-Authored-By: JohannBiorck <85625348+johannbiorck@users.noreply.github.com>
Co-Authored-By: JohannBiorck <85625348+johannbiorck@users.noreply.github.com>
Co-Authored-By: LACHIRI ILIAS <67273129+lachiri-ilias@users.noreply.github.com>
Updated changelong to reflect changes.
Co-Authored-By: Vlad Dobre <29517124+vladdobre@users.noreply.github.com>
Co-Authored-By: Kr1st1an-F <100246316+kr1st1an-f@users.noreply.github.com>
…rite JabRef#3197

Co-Authored-By: Vlad Dobre <29517124+vladdobre@users.noreply.github.com>
Co-Authored-By: Kr1st1an-F <100246316+kr1st1an-f@users.noreply.github.com>
@koppor

koppor commented Mar 1, 2024

Copy link
Copy Markdown
Member

When trying out and switching to TeXWorks, I get an exception

image

Would it be possible to set a default path? On Windows, it seems that following file contains the link to the .exe file

%APPDATA%\Microsoft\Windows\Start Menu\Programs\MiKTeX\TeXworks.lnk

For the other apps, there are sensible defaults!

@Siedlerchr

Copy link
Copy Markdown
Member

In the prefs we have some autodetect logic

defaults.put(PUSH_TEXSTUDIO_PATH, OS.getNativeDesktop().detectProgramPath("texstudio", "TeXstudio"));

@vladdobre

vladdobre commented Mar 1, 2024

Copy link
Copy Markdown
Contributor Author

This is a bit weird. I thought the we used the autodetect logic correctly.

https://github.com/JabRef/jabref/pull/10953/files#diff-42a07fbc47ff359873a26e31184338ddf82ddcecf188dac16da1ef103eae3833R547

We tried reseting the settings to the defaults but it still finds the path. My default path is in Program Files (x86).

@koppor

koppor commented Mar 2, 2024

Copy link
Copy Markdown
Member

I have MikTeX installed somewhere else. OK for me that I manually need to set the path

However when I click Save in the preferences, there should be a check. If the binary could not be found, user should be asked to navigate to the options.

koppor
koppor previously requested changes Mar 4, 2024

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the TODO with the icon. Can you work on this?

Comment thread src/test/java/org/jabref/gui/push/PushToTeXworksTest.java Outdated
Comment thread src/test/java/org/jabref/gui/push/PushToTeXworksTest.java Outdated
Comment thread src/test/java/org/jabref/gui/push/PushToTeXworksTest.java Outdated
Comment thread src/test/java/org/jabref/gui/push/PushToTeXworksTest.java Outdated
Comment thread src/test/java/org/jabref/gui/push/PushToTeXworksTest.java Outdated
Comment thread src/test/java/org/jabref/gui/push/PushToTeXworksTest.java Outdated
Comment thread src/main/java/org/jabref/gui/push/PushToTeXworks.java Outdated
Comment thread src/main/java/org/jabref/gui/push/PushToTeXworks.java Outdated
@lachiri-ilias

Copy link
Copy Markdown
Contributor

I have MikTeX installed somewhere else. OK for me that I manually need to set the path

However when I click Save in the preferences, there should be a check. If the binary could not be found, user should be asked to navigate to the options.

We couldn't find this behavior for the other editors, maybe this should be a separate issue ?

Comment thread src/main/java/org/jabref/gui/push/PushToTeXworks.java Outdated
Comment thread src/main/java/org/jabref/gui/push/PushToTeXworks.java Outdated
@koppor koppor mentioned this pull request Mar 4, 2024
@koppor

koppor commented Mar 4, 2024

Copy link
Copy Markdown
Member

@calixtus will continue working on this PR today. Some architecture changes etc. For instance, at @Override, the JavaDoc should to to the "parent" (i.e., the interface in this case).

@koppor

koppor commented Mar 4, 2024

Copy link
Copy Markdown
Member

@Siedlerchr Siedlerchr enabled auto-merge March 4, 2024 19:29
@Siedlerchr Siedlerchr dismissed koppor’s stale review March 4, 2024 19:38

Carl finished

@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 4, 2024
Merged via the queue into JabRef:main with commit 43eb3ef Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JR doesn't send citation commands to TeXworks

6 participants