Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
generalites:erreurs:command_already_defined [2020/12/12 17:19] – Guillemets en chevrons dbitouzegeneralites:erreurs:command_already_defined [2021/01/12 23:29] (Version actuelle) – Suppression après fusion avec "generalites/erreurs/c/command_already_defined". jejust
Ligne 1: Ligne 1:
-====== Package reports « command already defined » ====== 
- 
- 
-You load a pair of packages, and the second reports that one of the 
-commands it defines is already present.  For example, both the 
-[[ctanpkg>txfonts|txfonts]] and [[ctanpkg>amsmath|amsmath]] define a command ''\iint'' 
-(and ''\iiint'' and so on); so 
- 
-<code latex> 
-... 
-\usepackage{txfonts} 
-\usepackage{amsmath} 
-</code> 
-produces a string of error messages of the form: 
- 
-<code latex> 
-! LaTeX Error: Command \iint already defined. 
-               Or name \end... illegal, see p.192 of the manual. 
-</code> 
-As a general rule, things that [[ctanpkg>amsmath|amsmath]] defines, it defines 
-well; however, there is a good case for using the [[ctanpkg>txfonts|txfonts]] 
-version of ''\iint'' --- the associated ''tx'' fonts have a 
-double integral symbol that doesn't need to be "faked" in the way 
-[[ctanpkg>amsmath|amsmath]] does.  In the case that you are loading several 
-symbol packages, every one of which defines the same symbol, you are 
-likely to experience the problem in a big way (''\euro'' is a common 
-victim). 
- 
-There are similar cases where one package redefines another's command, 
-but no error occurs because the redefining package doesn't use 
-''\newcommand'' Often, in such a case, you only notice the change 
-because you assume the definition given by the first package.  The 
-[[ctanpkg>amsmath|amsmath]]--[[ctanpkg>txfonts|txfonts]] packages are just such a pair; 
-[[ctanpkg>txfonts|txfonts]] doesn't provoke errors. 
- 
-You may deal with the problem by saving and restoring the command. 
-Macro programmers may care to do this for themselves; for the rest of 
-us, there's the package [[ctanpkg>savesym|savesym]].  The sequence: 
- 
-<code latex> 
-\usepackage{savesym} 
-\usepackage{amsmath} 
-\savesymbol{iint} 
-\usepackage{txfonts} 
-\restoresymbol{TXF}{iint} 
-</code> 
-does the job; restoring the [[ctanpkg>amsmath|amsmath]] version of the command, 
-and making the [[ctanpkg>txfonts|txfonts]] version of the command available as 
-''\TXFiint''. 
- 
-Documentation of [[ctanpkg>savesym|savesym]] doesn't amount to much: the only 
-commands are ''\savesymbol'' and ''\restoresymbol'', as noted above. 
- 
- 
------ 
- 
-//Source:// [[faquk>FAQ-alreadydef|Package reports "command already defined"]] 
- 
-{{htmlmetatags>metatag-keywords=(LaTeX,errors) 
-metatag-og:title=(Package reports "command already defined") 
-metatag-og:site_name=(FAQ LaTeX francophone) 
-}} 
  
2_programmation/erreurs/command_already_defined.1607793580.txt.gz · Dernière modification : 2020/12/12 17:19 de dbitouze
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0