Forgive my candid question, I am probably missing a whole philosophical idea here...

My question

How can I handle to change names in my very large document (~1000 sub documents) to prevent errors ?

For instance, my TikZpoorNamediagram.tex ( I have plenty of them) could be used 2 or three times in different parts of the document. If I decide (as a legit cleaning process) to rename it Diagram.tikz, here comes the mess.


As mentioned so many times (like here), the question of splitting and naming .tex and folders (chapter1, chapter1/images/ ...) the right way are crucial, especially for very large documents. It requires to be rigorous and follow the same logic.

However, I underestimated how key it was when I started to write, and courses after courses I accumulated 1000 files, poorly named, but I end up with a long document in which it takes ages to find and correct my errors.

I use the snapshot package and it generates an extremely useful .dep(endency) file (here, here) containing all the files and packages related to the main.tex. (bundledoc seems to be the only case to use this .dep (?))

I keep track on an excel spreadsheet (a bad word here) but how could I get more out of .dep to actually manage name changing in my project ?

I am not a programmer but how could I have more balance between the flexibility of the file system based on names and the one of a Database where indexing is different.

PS : I use TexMaker on windows.

  • 3
    Is your question ultimately about string-replace in your .tex files? If so, isn't it a matter for your text editor or shell, rather than TeX-specific? – ShreevatsaR May 13 '20 at 1:46
  • @ShreevatsaR My question is about string replacement in all subfiles indeed. But I would prefer the answer to be independent from my text editor. Directly related to it is the question of the management of big files and the fact that the great flexibility of name indexing of LaTeX vs indexing from a database (that enables versioning, name changing, name moving form a folder to another...) etc. – JeT May 13 '20 at 10:22
  • It takes hard work to make it easy to use. I can't see a way of avoiding the effort of applying rigorousness to a data structure. With a spreadsheet, you can use the concatenate function to create numbered commands with \csname ...\endcsname{...} (e.g., fn001, or fn1) whose value is the filename (foo.tex), and replace the name with the command, so the filenames become variables, in effect (foo.tex is replaced by \csname fn1\endcsname). Then your document becomes a sequence of numbers (vars), re-arranging becomes trivial, the master list is in one spot, ... etc. Planning and design. – Cicada May 13 '20 at 13:17
  • You might consider using shortcuts (links) so that a file can have multiple names in multiple directories. Ultimately this will complicate your file situation even more, but it could solve your immediate problem. – John Kormylo May 13 '20 at 15:50
  • Thank you all. Using TeXlive allows the string search in all subfiles. Very useful. I'll try other solutions but I am a bit frustrated not to be able to manage a project as with a database since editors have everything to keep track of the file structure. – JeT May 15 '20 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.