Storing Additional Files into attachment folders - LaTeX
Suppose I have attached a file to an item. Zotero automatically creates a new folder with an arbitrary name, for e.g. X49JSXMY.
Suppose I decide to manually copy additional files into this folder (using my OS file explorer an not zotero).
Is it safe ? I mean, can these additional files be altered by zotero (even after sync with the cloud or software update)?
Why I want to do that ?
Because I use LaTeX to generate some reports as pdf. Then, I save these report using zotero by creating a proper item and attach the pdf file to it. I would like to store the LaTeX files used to generate this pdf in the same folder as the pdf. Doing so, I can generate a new pdf with my LaTeX files if I want to and it will directly update the pdf in my zotero library.
So, my goal is to find a way to "link" my LaTeX files to the "automatically generated folder" where the final pdf is stored...
Suppose I decide to manually copy additional files into this folder (using my OS file explorer an not zotero).
Is it safe ? I mean, can these additional files be altered by zotero (even after sync with the cloud or software update)?
Why I want to do that ?
Because I use LaTeX to generate some reports as pdf. Then, I save these report using zotero by creating a proper item and attach the pdf file to it. I would like to store the LaTeX files used to generate this pdf in the same folder as the pdf. Doing so, I can generate a new pdf with my LaTeX files if I want to and it will directly update the pdf in my zotero library.
So, my goal is to find a way to "link" my LaTeX files to the "automatically generated folder" where the final pdf is stored...
Upgrade Storage
@dstillman I understand that it is not a good practice to put additional files and I will definitely try to find another way to do what I want.
But, to be sure I understand well how zotero deals with files during sync, when you say :
> the files would be deleted during sync if the PDF was modified elsewhere
do you mean that if the the two pdf (one in the web library and one locally on my computer which I modify/erase manually without using zotero) are not the same, the local one would be deleted during sync ?
On more question if I may (not related to your last comment), is there any difference for the library "sync process" if the file has been modified by zotero desktop app or manually by the user with the OS file explorer ? Or the "sync process" just compare the files metadata or something without checking some kind of zotero desktop app log to check the history of modifications...
Zotero never ceases to amaze me with its power!
(the sync process seems to be very challenging with multiple users...)
Admittedly each file would get its own (arbitrarily-named) folder (different to the PDF's folder). So finding everything from *outside* Zotero is a little more problematic, if you need to do that. But you can right-click Show File on the attachment file to get to the file you want in your OS. Also, if you have file syncing turned ON, those files will be uploaded to Zotero servers (and thus count against your online file storage quota).
Alternatively, you could add the other files as "linked" files, from a folder elsewhere on your computer (either all in a single folder, or in a sub-folder [eg by parent name] under that folder hierarchy). That way they would be easier to find from outside Zotero, and not get file-synced.
1. I store all my LaTeX files related to a pdf in a folder and the "main.tex" LaTex file is "stored" into Zotero as a linked file and I use the "Show File" feature to access the folder.
2. When I need theses LaTeX files to be saved on the cloud, I create a zip file and attach it to the item.
This is not completely satisfying for me because it is a lot of manual steps (create the LaTeX folder and attach it, create the zip file and attach it, attach the pdf) and I work a lot on a terminal and so I have to do "Show File" and then copy the path or open manually a terminal in this folder (I do that for all multi-files projects, e.g. with python, matlab, markdown, etc.).
A good feature for me would be to have, in addition to "Show File", a "Open a terminal in file location" and "copy location path" options.
My dream would be to have Zotero as a command line tool and be able to directly cd to a folder of a program project (e.g. with the following citation citation key : MyProgram), with something like : $zotero cd MyProgram
But I will not ask for this feature because it is a completely different tool and not "just" a bibliographic assistant.
BTW, I use Zotero as a the main interface for accessing all the files on my computer, not only document and program, but everything! I try to not navigate through folders and sub-folders with a file explorer but use Zotero instead in order to quickly find a file with the powerful research bar along with the tag management. Zotero is my main file explorer ;)
However, I tried and I didn't get it to work.
But the main thing I wanted to say here is that once you know the storage folder for the PDF related item, you can have the tex files in an special folder (for example a git project you could sync through some Git repository such as Codeberg) and the pdflatex or whatever instruction, AUCTEX or latexmk allow to save the pdf file in a different directory from the tex files directory, which would be the one in the Zotero storage.
Regarding, this, ideally, Zotero should integrate in some way an Office reader (such as Emacs Docview, if not Libre Office integrated [https://forums.zotero.org/discussion/105841/fr-libre-office-embedded-into-zotero]), since many supplementary files are .docx/.odt or spreadsheets, and also a media player for Audio Recordings, Podcasts, Films, etc.