LaTeX forum ⇒ GeneralCommands confilct

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
Posts: 25
Joined: Wed Dec 02, 2009 1:41 am

Commands confilct

Postby drpartha » Sun Dec 13, 2009 6:26 am

We often use several \usepackage in our documents. If there is a command say \partha defined in two packages, how does LaTeX find out or decide which \partha to use ? Does LaTeX give a error if there is such a conflict ? How do we find ou which two packages are conflicting ?


Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Postby josephwright » Sun Dec 13, 2009 10:39 am

If the people who write the packages have used \newcommand, then an error will come up when the second definition is given. This is because \newcommand checks first to see if a definition exists before it does its work. On the other hand, if everything is done with \def then there will be no error: TeX is quite happy to overwrite definitions. Luckily, most people use \newcommand at least for user functions, so you should get errors in most clashing cases.
Joseph Wright

Return to “General”

Who is online

Users browsing this forum: No registered users and 12 guests