I am currently trying to write a book containing multiple chapters, with each chapter saved in a separate tex file. In each chapter, I have similar sections with label "sec:introduction", "sec:methods", "sec:conclusions", etc. When combining these chapters with \input command, I got error message saying labels are "multiply defined". I am wondering if it is possible to somehow let latex compiler realize that they are in different files and will not conflict with each other in any references (denoted by \ref)? I know changing these labels altogether would be a choice, but there are other multiply defined labels related to equations, figures, etc which could take a while to fix.
Any suggestions would be greatly appreciated, thank you!
\label{and\ref{to\label{xand\ref{xin a document so that document has a unique set of labels starting x it should just be a single edit in your editor it doesn't matter how many things are labelled – David Carlisle Mar 21 '20 at 20:03\inputthat locally redefines\labeland\refto be unique. The downside is that you can't\ref\labels from a different file. (I didn't know good search terms here, but I think something like this https://tex.stackexchange.com/q/365799/35864.) But a search-and-replace to make sure the labels are unique in the source is probably the best way here. – moewe Mar 21 '20 at 20:07