Suppose someone wants to create multiple LaTeX documents capable of referencing the internal references of the other documents. Is there a way to do this that avoids hard-coding the label of the other document?
As an example, suppose an instructor has two sets of lecture notes: A.pdf and B.pdf corresponding to two classes they teach "A" and "B". Each time they teach class A they update A.pdf, possibly adding new items with labels (e.g., Lemma 1.2.3 might change to Lemma 1.2.5). Then they should be able to go over to B.pdf, which might reference Lemma 1.2.3 in A.pdf, recompile B.pdf and have the original reference to Lemma 1.2.3 now say Lemma 1.2.5. They shouldn't have to actually write "1.2.3" anywhere in the .tex source and then change it to "1.2.5" before recompiling B.pdf. This type of hard-coding is fine when you are referencing an already-published document, but is there a natural way to avoid it in this situation?