Using external LaTeX editor and typesetting

Hi there

Brand new to DT, so bare with me, if the answer is obvious.

I write a lot of LaTeX and use DT as a container/DB for these files. When I edit a tex file, my LaTeX editor is typesetting to a pdf, and is placing the pdf file in the same directory as the tex file. It seems to me that DT has no clue about this newly created file, and when I inspect the folder structure, it seems that DT places pdf files in its own folder apart from tex files. This makes me come to the conclusion that I use the application in a wrong way.

What would be a “smart” way of handling this?

Thank you in advance for any input :pray:

Correct. DEVONthink has “no clue” about a newly created file unless you have put it into a folder which you have indexed into DEVONthink, and you updated the index. That being said, I use LaTeX a lot (out of Scrivener) and I don’t think there is much point indexing those working folders into DEVONthink.

This really has nothing to do with using a LaTeX editor. What you need to do is move/copy the newly created PDF into DEVONthink–by drag and drop, import, global inbox … whatever.

Perhaps re-read the outstanding “DEVONthink Manual” about indexing and importing. Important to understand indexing before going to far with it as there may be “gotcha’s” to those uninformed.


Hi rmschne

Thank you for your reply. I understand importing and indexing. The LaTeX files lives inside a folder structure that makes sense to have imported into DT. Perhaps I need to rethink that part.

I could import the pdf file into DT, but the workflow with first locating the file, importing the file and then deleting the file (from the wrong directory) seems like a wrong path.

Have a nice day

I’ll try to provide a possible explanation for the “problem” you’re experiencing. As you said

This “same directory” is in fact somewhere in the DT database package. What happens here is that your LaTeX editor is modifying DT’s database behind its (DT’s, that is) back. Which is never a good idea.

Since you didn’t import the file, DT doesn’t know of it. So, that’s that.

That may or may not be the case, but it shouldn’t concern you. DT’s internal structure and organization is exactly that: internal. You should not fiddle around with it nor rely on it remaining the same with every update. Treat it as you would a private API.

  • Tell your LaTeX editor to put the PDF it generates in a different folder, outside of DT. Or into DT’s global inbox. Then set up a smart rule to move the PDF wherever you want it in the database.
  • Or: Execute File/Update indexed objects after your LaTeX editor produced the PDF inside the DT folder structure. That might help DT to see the newly added file.
  • Or: Do not import the LaTeX files, but index them. But that might incur other difficulties when synchronizing across different machines.
1 Like

Can’t disagree. But then I’d never do that. :wink:

  • Drag and Drop to the Global Inbox will essentially delete the file.
  • Drag and Drop to a folder already indexed will also essentially delete the file
  • I have a Hazel rule pointing to the TEX folder looking for new *.PDF files and when noticed, Hazel moves the file to a new target (not DEVONthink, but somewhere else). You could do same with Hazel. I hazily recall Finder has ways to automatically do stuff which files, but I forget. Sorry.
1 Like

Ouch. I didn’t catch that from @jakob’s post. If true, not good, as you posted.

Thank you for a detailed explanation. Just to clarify: The above was just an observation, and I would never try to tame any applications db to fit my needs :slight_smile:

Thank you (both) for your input. My LaTeX editor can’t handle typesetting to a different folder. I will move all my tex files out of DT :wave:

While indexing must be carefully considered, I’m curious why you aren’t trying that approach.

PS: Welcome to the forums @jakob :slight_smile:


Perhaps I should reconsider. My workflow is as following, and I thought indexing would give me more headaches than benefits.

I teach for a living, and use a laptop in class and a desktop at home. They both are Macs and have DT installed. I work on the same files from laptop and from desktop on a daily basis. That means that files has to be in sync all the time. I find DT useful for this, although the previous iCloud solution worked fine too. I like the search capabilities that DT has to offer, which is far superior to the Finder.

Assignments are created in MS Word and pdf and are handed over to the students. This is campus rule and can’t be changed! For every assignment I create, I have to create a solution for the tasks in the assignment. I like to make these in LaTex, and the created pdf files are handed over to the students later on. This means that for each assignment, I have a folder containing a word file, tex file(s) and pdf files. If I use images those are here as well.

Now the “problem”: I would like to make changes to the text file sometimes and create a new pdf file. My tex editor creates the pdf file in the same folder as the tex file, which is a problem when the folder has been imported to DT. I could move everything outside of DT and index the folders instead, but I’m afraid that I will loose the sync capabilities between macs in regards to the DT databases. Do you think it could work, or am I using DT for a different task, than it was designed for?

I apologise for my written english and hope my description makes sense :slight_smile:

Thanks in advance

Your English is quite understandable!

There are plenty of teachers who use DEVONthink for syllabi, coursework, student information, etc.

That shouldn’t have any ill effect on syncing as indexed files can be synced.

Check out the In & Out > Sync > Indexing & Sync section covered in the Help and manual.

Thank you BLUEFROG. It actually seems to work just fine :slight_smile:

Is this the way to do it:

  • Export the desired folders from DT to iCloud Drive
  • Tell DT to index those folders

I noticed DT creates a file in each folder named DEVONtech_storage. Searching this forum tells me that the file contains metadata for the file. Are those files needed when using the index feature? I haven’t made any metadata changes to the files. I can live with the files just fine, but will I get in trouble by leaving them?

After indexing the folders the Modified attribute for each folder has changed. I suspect the creation of the DEVONtech_storage is causing this. I would normally like to keep created date and modified date of my folders until I decide to change them, but I can live with this if I have to.

Roger out, Jakob

The storage file isn’t needed in this particular instance.

You can change the modification date, if desired.
Also, this shouldn’t happen with files you add to the Folder folder in the future.

@BLUEFROG I have +500 folders so changing dates manually will take some time. I did try to drag and drop from DT to Finder, and that preserves the dates and doesn’t make the DEVONtech_storage. Can I use that method, or will I mess something up?

Thanks in advance for input

I am under comparable circumstances to you. FWIW …

  • I do not use DT as a tool to sync documents between computers. I rely on tools that are designed by first principle to do syncing.
  • When I must sync to have files accessible in two different platforms, I always designate one or the other platform a MASTER local resource. I always strive to keep the local master updated on a rigorous schedule (i.e. via daily syncs).
  • I always choose to INDEX folders (or files) that are actively being modified from some other application. I choose to IMPORT folders (or files) only when I do not expect to actively modify them by some other application.
  • When I index, I avoid mucking about with the folder and file structure that DT establishes because this will also muck about those same structures at the Finder level. IOW, for indexed files, the Finder and external applications have the authority to make changes, and DT is only permitted to watch the results.
  • When I import, I recognize that I have thereby severed any connection between what happens to that folder or file outside DT and what happens to the folder or file inside DT. The two systems are (blissfully) ignorant of each other. I also recognize in this case that DT does not follow a “Finder equivalent” approach to store the folders and files. IOW, I cannot expect to go as easily by path to MyCourse/MyCourse21/homework/homwork01KEY.pdf in DT as I can in the Finder.

By specific example, consider a course MyCourse that I taught last year and am teaching this year in the same semester. When I set up DT for MyCourse, I will import the folder MyCourse/MyCourseF21 from Fall 2021. I will at the same time index the folder MyCourse/MyCourseF22.

So … in short …

You are relying on DT to do something that it was not designed to do at the robustness level that you demand.

I would investigate the cloud storage options that your university or institute provide. When you would be in the US, I would in fact insist that your university explicitly prohibits you from using any cloud resource that they do not sanction as a means to store files that pertain to student records, and I would caution that this prohibition should be taken as a warning to you to avoid the same for all work-related documents. By specific example, I am exceptionally careful to avoid iCloud for anything except a temporary transit box for any file that I create associated with my university-related work. I use the university-sanctioned Google drive instead.

Yes. And the search function does not care whether the files are indexed or imported.


1 Like

@DrJJWMac Thank you for a very detailed explanation of your setup and thoughts. Very much appreciated.

I must be missing a very fundamental concept of DT here. I was under the impression that it was perfectly fine to change files imported into DT with other apps (IE Word, Excel, Pages etc…). In fact when I do so, DT picks up on the changes immediately. If this is not the case, I have to rethink my use of DT completely. Earlier responds in this thread, warns me about adding new files into DT’s database behind DT, and that makes perfectly sense.

I couldn’t agree more here, but I only keep my own (rightfully) files in my cloud. Any files associated with students are stored in campus cloud.

/ jakob

Frankly, it is fundamental not to do that. If you can remember where you read that idea, and if that text is controllable by DEVONtechnologies, that can be repaired.

What you can do with imported files is open them with the “open with” feature or double click the file if your default macOS apps setup, to work with the file in these other apps and the files will automagically go back into the DEVONthink database. I and others do that all the time.

DEVONthink works within and well with the Apple Mac “ecosystem”.

FYI, I don’t keep much stuff in a “cloud sync location” unless I need it to “share” with another computer or device. I don’t consider any “cloud” sync service a backup, which sadly some do.


That is exactly what I do, and what I meant by “change files with other apps”. I was referring to the concept of not importing files that change over time.

I don’t use cloud for backup but for syncing between my Macs. So far iCloud Drive has been working very well for that purpose. My backups are handled by backup software :slight_smile:

Thank you for your contribution to my question :pray: