jabref
jabref copied to clipboard
Allow relative paths for LaTeX aux file (group definition by cited entries)
Is your suggestion for improvement related to a problem? Please describe. I have some groups defined by the citations in a LaTeX auxiliary file. However, the path to the auxiliary file needs to be an absolute path. Thus, it only works in one computer. (I synchronise my library in several computers via ownCloud).
Describe the solution you'd like Allow relative paths when defining groups from aux files
The following should already work:
- Library Properties -> LaTeX File directory. Here you can use a relative directory to your aux directory
- In the group dialog, if you then select the aux file, it will be stored as relative to the above directory
But I just see that there is a paramter which takes the username into account
While it is a bit unclear, I believe the LaTeX File directory is also user-specific.
refs. JabRef's documentation and https://github.com/JabRef/jabref/issues/4736.
Ahh, I did not know those Path definitions in the Library Properties. They seem to take user and computer name into account. At least they are stored as follows in my bib-file:
@Comment{jabref-meta: fileDirectoryLatex-USER-COMPUTER:PATH;}
I will check it in January with the computer at the university. But that should solve my problem. Thanks a lot!
(I was a bit confused, because in the JabRef preferences the following option can be checked: "Search and store files relative to library file location". I could not find the equivalent for the LaTeX files)
Just to check, is this issue solved?
Sorry for my delay answering. I completely forgot about it. I tried the suggestion from Siedlerchr, but it does not work (JabRef 5.7--2022-06-15--cb5fe60). If I use an absolute path for the LaTeX File directory, then I can use a relative Path in the group dialog. That makes sense. Unfortunately, the group remains empty. However, if I remove the LaTeX File directory and use an absolute path in the group dialog, the group is populated correctly. But this solution only works on one computer.
I think this is due to a bug -- cf. #9990
@jorgman1 If these files still exist and it is still relevant, can you please check whether the username set correctly for your second host in the bib file:
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
and that it is not
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostB:C:\\Path\\B;}
Using the latest version (JabRef 5.10--2023-06-15--710e1f2) I still have an error. The username is set correctly only for one host, the second host does not save a username:
@Comment{jabref-meta: fileDirectoryLatex--HostB:PathB;} @Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:PathA;}
Moreover, when I try to edit the group and select an Aux file, I get an error (on both hosts, even if the LaTeX file directory is not set). This error is new. Error_log.txt
I think we need to get all entries and check which belongs to the username @calixtus @koppor Did you recently refactored anything regarding the file listener?
No, I remember looking at it, when I discovered that we have a DummyFileMonitor, but I don't think anyone refactored it for quite some time.
Maybe related to the change of getUser to getUserAndHost?
Maybe related to the change of getUser to getUserAndHost?
The issue occurred before. Need to investigate.