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
composition:texte:renvois:les_references_croisees_sont_fausses [2018/12/03 23:56] jejustcomposition:texte:renvois:les_references_croisees_sont_fausses [2021/01/11 22:25] (Version actuelle) – Traduction de l'article anglais. yannick.tanguy
Ligne 1: Ligne 1:
-====== LaTeX gets cross-references wrong ======+====== Pourquoi ma référence croisée n'est pas correcte? ======
  
- +Parfoismalgré de multiples exécutions de <latex>\LaTeX</latex>les références croisées restent tout simplement faussesIl est ici probable que vous avez placé l'étiquette avant que les données de l'étiquette ne soient définies. Ainsi, si l'étiquette enregistre la référence d'une commande ''\caption'', la commande ''\label'' doit apparaître //après// la commande ''\caption'', ou en faire partieVoici ici deux exemples corrects :
-Sometimeshowever many times you run LaTeX, the cross-references +
-are just wrong A likely reason is that you have placed the label +
-before the data for the label was set; if the label is recording a +
-''\caption'' commandthe ''\label'' command must appear +
-//after// the ''\caption'' commandor be part of itFor example:+
  
 <code latex> <code latex>
 \begin{figure} \begin{figure}
-  <the illustration itself> +  ... la figure ... 
-  \caption{My figure} +  \caption{Ma figure} 
-  \label{myfig}+  \label{mafig}
 \end{figure} \end{figure}
 </code> </code>
-is correct, as is 
- 
  
 <code latex> <code latex>
 \begin{figure} \begin{figure}
-  <the illustration itself> +  ... la figure ... 
-  \caption{My figure+  \caption{Ma figure \label{mafig}}
-    \label{myfig}}+
 \end{figure} \end{figure}
 </code> </code>
  
-whereasin+Par contrel'exemple suivant ne fonctionnera pas bien et l'étiquette indiquera le numéro de la section (ou autre) : 
  
 <code latex> <code latex>
 \begin{figure} \begin{figure}
-  <the illustration itself> +  ... la figure ... 
-  \label{myfig+  \label{mafig
-  \caption{My figure}+  \caption{Ma figure}
 \end{figure} \end{figure}
 </code> </code>
-the label will report the number of the section (or whatever) in which 
-the surrounding text resides, or the like. 
  
-You canwith the same malign effectshield the ''\caption'' command +Vous pouvezavec les mêmes conséquences fâcheusesprotéger la commande ''\caption'' de sa commande ''\label'' associéeen enfermant la légende dans un environnement qui lui est propreEn voici une illustration :
-from its associated ''\label'' commandby enclosing the caption in an +
-environment of its own This effect will be seen with:+
  
 <code latex> <code latex>
 \begin{figure} \begin{figure}
-  <the illustration itself> +  ... la figure ... 
-  \caption{A Figure}+  \caption{Ma figure}
 \end{figure} \end{figure}
-\label{myfig}+\label{mafig}
 </code> </code>
-where the ''\label'' definitely //is// after the ''\caption'', 
-but because the ''figure'' environment closed before the 
-''\label'' command, the ''\caption'' is no longer "visible". 
  
-In summarythe ''\label'' must be //after// the command that +Icila commande ''\label'' est bien après la commande ''\caption'', mais parce que l'environnement ''figure'' s'est fermé avant la commande ''\label'', ''\caption'' n'est plus « visible » de ''\label''.
-defines it (e.g., ''\caption'')and if the ''\caption'' is inside +
-an environmentthe ''\label'' must be in there too.+
  
 +En résumé, la commande ''\label'' doit être //après// la commande qui la définit (par exemple, ''\caption''), et si la commande ''\caption'' est à l'intérieur d'un environnement, la commande ''\label'' doit y figurer également.
  
 ----- -----
Ligne 63: Ligne 47:
  
 {{htmlmetatags>metatag-keywords=(LaTeX,errors) {{htmlmetatags>metatag-keywords=(LaTeX,errors)
-metatag-og:title=(LaTeX gets cross-references wrong)+metatag-og:title=(Pourquoi ma référence croisée n'est pas correcte)
 metatag-og:site_name=(FAQ LaTeX francophone) metatag-og:site_name=(FAQ LaTeX francophone)
 }} }}
  
3_composition/texte/renvois/les_references_croisees_sont_fausses.1543881375.txt.gz · Dernière modification : 2018/12/03 23:56 de jejust
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0