when I use logseq in one computer with user name is userA, the annotate pdf path is /User/userA/Zotero/…, while I switch to another computer with user name is userB, the pdf path in the note is falied, I think it should use relative path for all attachments…
For example, Computer 1 is Windows , and computer 2 is Mac, they have different Zotero data path.
The annotation file (with filename of “hls XXX…” ) created on Mac can not be opened on Windows.
See:
PS: I noticed that someone also suggested this request.
Please explain this in more detail - what does subst achieve? I still see an absolute path, so this would not work across devices if the paths are different, eg because one is a Windows machine (in the office) one is a Mac (in the lab) and one is a linux laptop.
subst create a virtual drive that maps to a folder on a physical disk, on Windows. This would not work on macOS or Linux, unless you implement the equivalent workaround for each operating system.
Thanks for the explanation - unfortunately a windows only solution does not work for me. This needs to work cross-platform which is why zettlrs approach, which achieves this sees the most promising: Relative path for Zotero data directory - #4 by menelic
Just want to say that this would also be VERY useful to me. I’d love to store everything that I reference in Zotero and see it within logseq across computers, but without access to relative paths I’m just not sure how its possible on mac.
I use windows at Lab and Mac at home, and the PDFs of zotero are located on Zotero’s default storage folder, e.g., \Users\username\Zotero for Mac, and these PDFs in Logseg can be opened correctly, but the pdf annotations are broken because the absolute path is used in file-path of the hls page.
I am looking forward to a solution that does not need to change the storage setting and hope developers resolve it as soon as possible.
Greatly appreciate the work of the developers.
Although it is not directly related to the original request, I would like to suggest a solution for resolving conflicting paths on multiple machines. Logseq offers the option to create multiple Zotero setting profiles, which enables you to use different profiles on various devices to configure the correct pdf path.
That just enables you to open files on different machines.
However, the annotations store with absolute file path of the pdf instead of a relative Zotero path of it.
subst may help for user with multiple windows machines. However, the virtual disk will be cleaned after rebooting. If you prefer a permanent virtual disk, you should download psubst from github and use psubst.
I second this feature! It is useful not only for Zotero, but in general to store your PDFs out of logseq.
To me, this makes sense when you have a ton of pdfs that are replicated anyway between your machines because you use a cloud drive to store them (eg: Dropbox, OneDrive…) Storing those pdfs out of the logseq graph saves you space when syncinc logseq (specially with mobile, which does not support pdf annotation anyway).
Annotating pdfs out of logseq works if you provide the absolute path to the pdf, for example:
![Title of the pdf](/absolute/path/to/name_of_the_pdf_file.pdf)
but this path is not portable among machines. If you instead change it for a relative path like this:
![Title of the pdf](../../OneDrive/Path/name_of_the_pdf_file.pdf)
then the pdf cannot be open anymore, because logseq insists on prepending assets/ to it, and then complains that the file assets/OneDrive/Path/name_of_the_pdf_file.pdf does not exist.
Why logseq does this? What would be the undesirable side effects of removing that “prepend assets” behaviour? Is there any workaround to “fool” logseq into not to make this url transformation? I tried even this:
![Title of the pdf](file:///../../OneDrive/Path/name_of_the_pdf_file.pdf)
but still logseq is not “fooled” and prepends the assets/ to the path.
What about instead of supporting relative paths in Logseq for Zotero, instead allow setting: Zotero linked attachment base directory and Zotero data directory
Then for the links we could use a variable style reference like so: ![Title of the pdf](file:///$zotero/path/in/dir/to/pdf/pdf-file.pdf)
or maybe something like this ![Title of the pdf](zotero:///path/in/dir/to/pdf/pdf-file.pdf)
I have a similar issue, however, for me relative paths would not fix the problem since the paths are very different on different devices (which include my phone!). I would like to be able to set the zotero data directory on a per device basis or something similar, so that I can set a different path for my phone and two laptops each.
Use Zotero plugin the better bibtex auto export the xx.bib file, and the bib file path is assets/storages/logseq-citation-manager/xx.bib,
Use Soft link zotfile folder(I use OneDriver sync) to logseq/assets/.
This step is very important, and we will use this path as the relative path later on
# mac ln -s
# window mklink /D
My file path is logseq/assets/zotfile/
And you should make the zotfile/ into .gitignore, not sync, different platform os, different file, Although the same filename.
3. setting for logseq plugin logseq-citation-manager